From 7ff82d908f7829c9e40f547336ddc1d08979f808 Mon Sep 17 00:00:00 2001 From: MueezKhan246 Date: Thu, 29 Aug 2024 14:27:57 +0500 Subject: [PATCH 1/2] feat: altered decrypted_secret to be encrypted and made credentials nullable --- .../migrations/0018_auto_20240829_0910.py | 29 +++++++++++++++++++ .../sap_success_factors/models.py | 8 +++-- 2 files changed, 34 insertions(+), 3 deletions(-) create mode 100644 integrated_channels/sap_success_factors/migrations/0018_auto_20240829_0910.py diff --git a/integrated_channels/sap_success_factors/migrations/0018_auto_20240829_0910.py b/integrated_channels/sap_success_factors/migrations/0018_auto_20240829_0910.py new file mode 100644 index 000000000..2545b2eef --- /dev/null +++ b/integrated_channels/sap_success_factors/migrations/0018_auto_20240829_0910.py @@ -0,0 +1,29 @@ +# Generated by Django 3.2.23 on 2024-08-29 09:10 + +from django.db import migrations, models +import fernet_fields.fields + + +class Migration(migrations.Migration): + + dependencies = [ + ('sap_success_factors', '0017_auto_20240823_0936'), + ] + + operations = [ + migrations.AlterField( + model_name='sapsuccessfactorsenterprisecustomerconfiguration', + name='decrypted_secret', + field=fernet_fields.fields.EncryptedCharField(blank=True, default='', help_text='The encrypted OAuth client secret. It will be encrypted when stored in the database.', max_length=255, null=True, verbose_name='Encrypted Client Secret'), + ), + migrations.AlterField( + model_name='sapsuccessfactorsenterprisecustomerconfiguration', + name='key', + field=models.CharField(blank=True, default='', help_text='OAuth client identifier.', max_length=255, null=True, verbose_name='Client ID'), + ), + migrations.AlterField( + model_name='sapsuccessfactorsenterprisecustomerconfiguration', + name='secret', + field=models.CharField(blank=True, default='', help_text='OAuth client secret.', max_length=255, null=True, verbose_name='Client Secret'), + ), + ] diff --git a/integrated_channels/sap_success_factors/models.py b/integrated_channels/sap_success_factors/models.py index 4cf8e7e73..6ed925744 100644 --- a/integrated_channels/sap_success_factors/models.py +++ b/integrated_channels/sap_success_factors/models.py @@ -79,7 +79,8 @@ class SAPSuccessFactorsEnterpriseCustomerConfiguration(EnterpriseCustomerPluginC blank=True, default='', verbose_name="Client ID", - help_text=_("OAuth client identifier.") + help_text=_("OAuth client identifier."), + null=True ) decrypted_key = EncryptedCharField( @@ -120,10 +121,11 @@ class SAPSuccessFactorsEnterpriseCustomerConfiguration(EnterpriseCustomerPluginC blank=True, default='', verbose_name="Client Secret", - help_text=_("OAuth client secret.") + help_text=_("OAuth client secret."), + null=True ) - decrypted_secret = models.CharField( + decrypted_secret = EncryptedCharField( max_length=255, blank=True, default='', From d9153777392188967b909369d3f2f84bbb98971a Mon Sep 17 00:00:00 2001 From: MueezKhan246 Date: Thu, 29 Aug 2024 14:28:59 +0500 Subject: [PATCH 2/2] refactor: updated build version --- CHANGELOG.rst | 4 ++++ enterprise/__init__.py | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index ea71bd8db..65e714cc6 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -17,6 +17,10 @@ Unreleased ---------- * nothing unreleased +[4.23.14] +---------- +* feat: altered decrypted_secret to be encrypted and made credentials nullable + [4.23.13] ---------- * feat: added encrypted columns for user credentials for SAP config diff --git a/enterprise/__init__.py b/enterprise/__init__.py index e308c2e8d..eedfeb528 100644 --- a/enterprise/__init__.py +++ b/enterprise/__init__.py @@ -2,4 +2,4 @@ Your project description goes here. """ -__version__ = "4.23.13" +__version__ = "4.23.14"