-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added fields for holding encrypted data in database for blackboard #1907
Merged
MueezKhan246
merged 20 commits into
master
from
MueezKhan/Encryption-Fields-Added-To-BlackboardConfig
May 7, 2024
Merged
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
5eebfbe
feat: added fields for holding encrypted data in database for blackboard
MueezKhan246 6ad3968
Merge branch 'master' of https://github.com/openedx/edx-enterprise in…
MueezKhan246 313b04b
refactor: removing conflict issues from utils file
MueezKhan246 4ddea10
refactor: removed unused import
MueezKhan246 5f3cb08
refactor: removing unnecessary pass statement
MueezKhan246 e440722
Merge branch 'master' of https://github.com/openedx/edx-enterprise in…
MueezKhan246 4f1aa45
refactor: resolved migration issues
MueezKhan246 df42385
Merge branch 'master' of https://github.com/openedx/edx-enterprise in…
MueezKhan246 48b4f06
refactor: removed redundant line at the end of file
MueezKhan246 0b46f2c
Merge branch 'master' of github.com:openedx/edx-enterprise into Mueez…
MueezKhan246 fa3b473
Merge branch 'master' of github.com:openedx/edx-enterprise into Mueez…
MueezKhan246 1c8198f
Merge branch 'master' into MueezKhan/Encryption-Fields-Added-To-Black…
MueezKhan246 f1c37bd
Merge branch 'master' of github.com:openedx/edx-enterprise into Mueez…
MueezKhan246 6a4813b
test: updating test case for blackboard global config model
MueezKhan246 41357fa
Merge branch 'MueezKhan/Encryption-Fields-Added-To-BlackboardConfig' …
MueezKhan246 44eb27a
refactor: removing trailing space
MueezKhan246 8ab0a56
refactor: disabling lint warning for unused schema editor
MueezKhan246 5859701
refactor: disabling unused-argument
MueezKhan246 633f51e
Merge branch 'master' of github.com:openedx/edx-enterprise into Mueez…
MueezKhan246 4d6eb66
refactor: updated changelog file
MueezKhan246 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
integrated_channels/blackboard/migrations/0020_auto_20240422_1709.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Generated by Django 3.2.23 on 2024-04-22 17:09 | ||
|
||
from django.db import migrations | ||
import fernet_fields.fields | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('blackboard', '0019_delete_historicalblackboardenterprisecustomerconfiguration'), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name='blackboardenterprisecustomerconfiguration', | ||
name='decrypted_client_id', | ||
field=fernet_fields.fields.EncryptedCharField(blank=True, default='', help_text='The API Client ID (encrypted at db level) provided to edX by the enterprise customer to be used to make API calls to Degreed on behalf of the customer.', max_length=255, verbose_name='API Client ID encrypted at db level'), | ||
), | ||
migrations.AddField( | ||
model_name='blackboardenterprisecustomerconfiguration', | ||
name='decrypted_client_secret', | ||
field=fernet_fields.fields.EncryptedCharField(blank=True, default='', help_text='The API Client Secret (encrypted at db level) provided to edX by the enterprise customer to be used to make API calls to Degreed on behalf of the customer.', max_length=255, verbose_name='API Client Secret encrypted at db level'), | ||
), | ||
] |
15 changes: 15 additions & 0 deletions
15
integrated_channels/blackboard/migrations/0021_auto_20240423_1057.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Generated by Django 3.2.23 on 2024-04-23 10:57 | ||
|
||
from django.db import migrations | ||
from integrated_channels.blackboard.utils import populate_decrypted_fields_blackboard | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('blackboard', '0020_auto_20240422_1709'), | ||
] | ||
|
||
operations = [ | ||
migrations.RunPython(populate_decrypted_fields_blackboard, reverse_code=migrations.RunPython.noop), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
""" | ||
Utilities for Blackboard integrated channels. | ||
""" | ||
|
||
|
||
def populate_decrypted_fields_blackboard(apps, schema_editor=None): # pylint: disable=unused-argument | ||
""" | ||
Populates the encryption fields in Blackboard config with the data previously stored in database. | ||
""" | ||
BlackboardEnterpriseCustomerConfiguration = apps.get_model( | ||
'blackboard', 'BlackboardEnterpriseCustomerConfiguration' | ||
) | ||
|
||
for blackboard_enterprise_configuration in BlackboardEnterpriseCustomerConfiguration.objects.all(): | ||
blackboard_enterprise_configuration.decrypted_client_id = blackboard_enterprise_configuration.client_id | ||
blackboard_enterprise_configuration.decrypted_client_secret = blackboard_enterprise_configuration.client_secret | ||
blackboard_enterprise_configuration.save() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we remove these two fields from here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sameenfatima78 i planned to create a separate PR for removing these and feature flag, like done for other integrated channels