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

[Feat] Allow AWS SECRETS MANAGER instead of storing AES Encrypted in db #3616

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

aluferraz
Copy link
Contributor

@aluferraz aluferraz commented Dec 1, 2024

This pull request introduces a significant security enhancement by providing an option to migrate away from storing AES-encrypted sensitive data directly in our database. Instead, it allows us to leverage AWS Secrets Manager to securely store, manage, and retrieve our application's secrets.

Key Highlights of this Change:

Improved Security: Sensitive data is now protected by AWS Secrets Manager's enterprise-grade security features, including encryption at rest and in transit, strict access controls, and auditing capabilities.
Compliance Alignment: This shift enhances our alignment with various regulatory compliance standards that recommend or mandate the use of dedicated secret management solutions for sensitive data.
Simplified Key Management: No longer will we need to manage AES encryption keys within our application, reducing operational overhead and potential security risks associated with key mismanagement.
Audit Trail: Traceble log of credentials

image image

@aluferraz
Copy link
Contributor Author

@HenryHengZJ any thoughts on this feature ? It can be toggled using env. vars.

##AWS Secrets Manager
# AWS_ACCESS_KEY_ID=<your-access-key>
# AWS_SECRET_ACCESS_KEY=<your-secret-key>
# USE_AWS_SECRETS_MANAGER=true
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd prefer to have more generic name that can be reused in future for Azure Key Vault, Okta and other else.

Perhaps: SECRET_MANAGER_PROVIDER, the value can be aws, azure, etc

Also, search for the variable STORAGE_TYPE, you can similar references and other places that we need to declare these env variables as well

# AWS_ACCESS_KEY_ID=<your-access-key>
# AWS_SECRET_ACCESS_KEY=<your-secret-key>
# USE_AWS_SECRETS_MANAGER=true
# CACHE_CREDENTIALS=true
Copy link
Contributor

Choose a reason for hiding this comment

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

All other 3rd party providers should provide caching: https://docs.aws.amazon.com/encryption-sdk/latest/developer-guide/data-key-caching.html#:~:text=In%20general%2C%20use%20data%20key,NET.

For security purpose, I prefer not to cache it in the application, but rather on your key vault side

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.

2 participants