feat(kms): Implement GetParametersForImport, ImportKeyMaterial, and DeleteImportedKeyMaterial - #10183
Open
tjhall13-nutrien wants to merge 1 commit into
Open
Conversation
…eleteImportedKeyMaterial Adds support for importing key material into KMS keys with EXTERNAL origin: - CreateKey with Origin=EXTERNAL creates a key in PendingImport state - GetParametersForImport returns an RSA wrapping public key and import token - ImportKeyMaterial decrypts wrapped key material and activates the key - DeleteImportedKeyMaterial removes key material, returning key to PendingImport - encrypt/decrypt guard against None key_material (KMSInvalidStateException) Supported wrapping algorithms: RSAES_OAEP_SHA_256, RSAES_OAEP_SHA_1 Supported wrapping key specs: RSA_2048, RSA_3072, RSA_4096 RSA_AES_KEY_WRAP variants are not yet implemented. Error handling: - UnsupportedOperationException for non-EXTERNAL keys - KMSInvalidStateException for invalid key states or missing key material - InvalidImportTokenException for wrong/missing import tokens - InvalidCiphertextException for failed RSA decryption
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Implements support for importing key material into KMS keys with EXTERNAL origin.
Changes
CreateKeywithOrigin=EXTERNALcreates a key inPendingImportstate (no auto-generated key material)GetParametersForImportreturns an RSA wrapping public key and import tokenImportKeyMaterialdecrypts wrapped key material and activates the keyDeleteImportedKeyMaterialremoves key material, returning key toPendingImportSupported
RSAES_OAEP_SHA_256,RSAES_OAEP_SHA_1RSA_2048,RSA_3072,RSA_4096Not implemented
RSA_AES_KEY_WRAP_SHA_256/RSA_AES_KEY_WRAP_SHA_1(hybrid wrapping)Potential Breaking Changes