AWS kms documentation change
Summary
Added SAP ABAP code example for ReEncrypt operation
Security assessment
Adds cryptographic operation example but doesn't address vulnerabilities. Error cases (disabled key, incorrect key) are standard API behaviors.
Diff
diff --git a/kms/latest/developerguide/example_kms_ReEncrypt_section.md b/kms/latest/developerguide/example_kms_ReEncrypt_section.md index 3af9549f7..c0dc10b86 100644 --- a//kms/latest/developerguide/example_kms_ReEncrypt_section.md +++ b//kms/latest/developerguide/example_kms_ReEncrypt_section.md @@ -236,0 +237,38 @@ There's more on GitHub. Find the complete example and learn how to set up and ru +SAP ABAP + + +**SDK for SAP ABAP** + + +###### Note + +There's more on GitHub. Find the complete example and learn how to set up and run in the [AWS Code Examples Repository](https://github.com/awsdocs/aws-doc-sdk-examples/tree/main/sap-abap/services/kms#code-examples). + + + TRY. + " iv_source_key_id = 'arn:aws:kms:us-east-1:123456789012:key/1234abcd-12ab-34cd-56ef-1234567890ab' + " iv_destination_key_id = 'arn:aws:kms:us-east-1:123456789012:key/5678dcba-56cd-78ef-90ab-5678901234cd' + " iv_ciphertext_blob contains the encrypted data + oo_result = lo_kms->reencrypt( + iv_sourcekeyid = iv_source_key_id + iv_destinationkeyid = iv_destination_key_id + iv_ciphertextblob = iv_ciphertext_blob + ). + MESSAGE 'Ciphertext reencrypted successfully.' TYPE 'I'. + CATCH /aws1/cx_kmsdisabledexception. + MESSAGE 'The key is disabled.' TYPE 'E'. + CATCH /aws1/cx_kmsincorrectkeyex. + MESSAGE 'Incorrect source key for decryption.' TYPE 'E'. + CATCH /aws1/cx_kmsnotfoundexception. + MESSAGE 'Key not found.' TYPE 'E'. + CATCH /aws1/cx_kmskmsinternalex. + MESSAGE 'An internal error occurred.' TYPE 'E'. + ENDTRY. + + + + * For API details, see [ReEncrypt](https://docs.aws.amazon.com/sdk-for-sap-abap/v1/api/latest/index.html) in _AWS SDK for SAP ABAP API reference_. + + + +