AWS code-library documentation change
Summary
Added SAP ABAP code example demonstrating how to grant read access to an AWS user using PutObjectAcl operation
Security assessment
The change documents proper implementation of S3 object ACLs (security feature) but doesn't address a specific vulnerability. It shows how to securely grant access using email identifiers, improving awareness of access control mechanisms.
Diff
diff --git a/code-library/latest/ug/s3_example_s3_PutObjectAcl_section.md b/code-library/latest/ug/s3_example_s3_PutObjectAcl_section.md index b9ea87b10..eedbceab4 100644 --- a//code-library/latest/ug/s3_example_s3_PutObjectAcl_section.md +++ b//code-library/latest/ug/s3_example_s3_PutObjectAcl_section.md @@ -199,0 +200,32 @@ 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/s3#code-examples). + + + TRY. + " Example: Grant read access to an AWS user + " iv_grantread = '[email protected]' + lo_s3->putobjectacl( + iv_bucket = iv_bucket_name + iv_key = iv_object_key + iv_grantread = iv_grantread ). + MESSAGE 'Object ACL updated.' TYPE 'I'. + CATCH /aws1/cx_s3_nosuchbucket. + MESSAGE 'Bucket does not exist.' TYPE 'E'. + CATCH /aws1/cx_s3_nosuchkey. + MESSAGE 'Object key does not exist.' TYPE 'E'. + ENDTRY. + + + + * For API details, see [PutObjectAcl](https://docs.aws.amazon.com/sdk-for-sap-abap/v1/api/latest/index.html) in _AWS SDK for SAP ABAP API reference_. + + + +