Skip to content
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 encrypted credentials column in sap configuration #2208

Conversation

MueezKhan246
Copy link
Contributor

Description:
Added encryption fields to the model of SAP config.

JIRA:
https://2u-internal.atlassian.net/jira/software/c/projects/ENT/issues/ENT-8972

Copy link
Member

@sameeramin sameeramin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good but according to this docs you need to register a signal as well to copy data from old fields to the new ones

@MueezKhan246
Copy link
Contributor Author

@sameeramin signal is not implemented as what i understood from the doc was that it is needed to implemented if is updated regularly.

'if there is a Django admin page or other form and it is used regularly to create/update rows:
Register a signal handler to the model to update the new field whenever the old field changes or a new row is created.'
cc. @sameenfatima78

Copy link
Member

@sameeramin sameeramin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍🏼

Copy link
Member

@sameenfatima78 sameenfatima78 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good just added on suggestion

Comment on lines 474 to 477
if instance.key != instance.decrypted_key:
instance.encrypted_key = instance.key
if instance.secret != instance.decrypted_secret:
instance.encrypted_secret = instance.secret
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as per discussion in call, please update to refer model attributes here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sameenfatima78 updated.

@MueezKhan246
Copy link
Contributor Author

@sameenfatima78 i removed the fields from serializer as i was unable to confirm that the endpoint was public through DataDog. i will be adding those in follow up PR.

@MueezKhan246 MueezKhan246 merged commit 08ca882 into master Aug 26, 2024
9 checks passed
@MueezKhan246 MueezKhan246 deleted the MueezKhan/Added-Encrypted-Credentials-Column-In-SAP-Configuration branch August 26, 2024 16:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants