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

Add option to enforce kms key_id upon decrypting with AwsKmsCryptographicMaterialsProvider #171

Closed
wants to merge 1 commit into from

Conversation

nappelson
Copy link

@nappelson nappelson commented Jul 12, 2021

Issue #, if available: #14

Description of changes: Add parameter that allows users to enforce the usage of kms key_id upon decryption. By default, AWS KMS uses the metadata attached to ciphertext encrypted with symmetric keys to determine which CMK to use for decryption. This leads to the interesting behavior where a user constructs an AwsKmsCryptographicMaterialsProvider with a CMK that was not used to encrypt the original data and they are still able to decrypt the data.

By adding this parameter, we can support users that would like to ensure they are decrypting with the intended key.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Check any applicable:

  • Were any files moved? Moving files changes their URL, which breaks all hyperlinks to the files.

@lavaleri
Copy link
Contributor

lavaleri commented Jul 15, 2021

Hi @nappelson,

Thank you for your pull request. We are aware of the gap in this API, and we have plans to improve it in a future API update. We cannot accept this PR due to our own plans to fix this, and because we need to maintain API parity between the Python and Java versions of the DynamoDB Encryption Client. For updates on this, please keep an eye on #176 .

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