Skip to content

Commit

Permalink
Merge branch 'master' into kiram15/ENT-9184
Browse files Browse the repository at this point in the history
  • Loading branch information
kiram15 committed Sep 6, 2024
2 parents 89dd15f + cba67ec commit d1992d6
Show file tree
Hide file tree
Showing 7 changed files with 60 additions and 1 deletion.
8 changes: 8 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,14 @@ Unreleased
----------
* nothing unreleased

[4.25.3]
----------
* feat: added encrypted client secret for SAP config

[4.25.2]
----------
* feat: added migration file for removing char field decrypted_secret

[4.25.1]
----------
* feat: removed char field decrypted_secret references
Expand Down
2 changes: 1 addition & 1 deletion enterprise/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
Your project description goes here.
"""

__version__ = "4.25.1"
__version__ = "4.25.3"
2 changes: 2 additions & 0 deletions enterprise/signals.py
Original file line number Diff line number Diff line change
Expand Up @@ -473,3 +473,5 @@ def update_decrypted_credentials(sender, instance, **kwargs): # pylint: disa
"""
if instance.key != instance.decrypted_key:
instance.decrypted_key = instance.key
if instance.secret != instance.decrypted_secret:
instance.decrypted_secret = instance.secret
1 change: 1 addition & 0 deletions integrated_channels/sap_success_factors/admin/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ class SAPSuccessFactorsEnterpriseCustomerConfigurationAdmin(DjangoObjectActions,
"key",
"decrypted_key",
"secret",
"decrypted_secret",
"sapsf_user_id",
"user_type",
"has_access_token",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Generated by Django 3.2.23 on 2024-09-04 14:20

from django.db import migrations


class Migration(migrations.Migration):

dependencies = [
('sap_success_factors', '0019_auto_20240902_1418'),
]

operations = [
migrations.RemoveField(
model_name='sapsuccessfactorsenterprisecustomerconfiguration',
name='decrypted_secret',
),
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Generated by Django 3.2.23 on 2024-09-04 14:35

from django.db import migrations
import fernet_fields.fields


class Migration(migrations.Migration):

dependencies = [
('sap_success_factors', '0020_remove_sapsuccessfactorsenterprisecustomerconfiguration_decrypted_secret'),
]

operations = [
migrations.AddField(
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'),
),
]
12 changes: 12 additions & 0 deletions integrated_channels/sap_success_factors/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,18 @@ class SAPSuccessFactorsEnterpriseCustomerConfiguration(EnterpriseCustomerPluginC
help_text=_("OAuth client secret.")
)

decrypted_secret = EncryptedCharField(
max_length=255,
blank=True,
default='',
verbose_name="Encrypted Client Secret",
help_text=_(
"The encrypted OAuth client secret."
" It will be encrypted when stored in the database."
),
null=True
)

user_type = models.CharField(
max_length=20,
choices=USER_TYPE_CHOICES,
Expand Down

0 comments on commit d1992d6

Please sign in to comment.