-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
KMS: Add support for RSA_AES_KEY_WRAP_SHA_256
in import key material
#12888
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
Conversation
LocalStack Community integration with Pro 2 files ± 0 2 suites ±0 4m 32s ⏱️ - 1h 41m 37s Results for commit bb01c4a. ± Comparison against base commit 71c610e. This pull request removes 4223 and adds 2 tests. Note that renamed tests count towards both.
♻️ This comment has been updated with latest results. |
Test Results (amd64) - Integration, Bootstrap 5 files 5 suites 17m 45s ⏱️ Results for commit bb01c4a. ♻️ This comment has been updated with latest results. |
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.
Nice work, I have two smaller comments to address but otherwise changes look good 👍
Motivation
This PR adds support for the wrapping algorithm
RSA_AES_KEY_WRAP_SHA_256
in theImportKeyMaterial
, which raises:KMSInvalidStateException: An error occurred (KMSInvalidStateException) when calling the ImportKeyMaterial operation: Unsupported padding, requested wrapping algorithm:'RSA_AES_KEY_WRAP_SHA_256'
This algorithm is defined by AWS as a hybrid encryption scheme, that combines encrypting the key material with an AES symmetric key that is generated, and encrypting the AES symmetric key with the public wrapping key and the
RSAES_OAEP_SHA_256
wrapping algorithm.Changes
RSA_AES_KEY_WRAP_SHA_256
in theimport_key_material
method._decrypt_wrapped_key_material(...)
now handles both RSA-only and hybrid RSA+AES key wrapping formats.test_import_key_rsa_aes_wrap_sha256
to validate the implementation.References:
Closes: #10921