fmorg-git commented on code in PR #11030:
URL: https://github.com/apache/ozone/pull/11030#discussion_r3839560767
##########
hadoop-ozone/s3gateway/src/main/java/org/apache/hadoop/ozone/s3/endpoint/EndpointBase.java:
##########
@@ -603,6 +603,14 @@ protected AuditMessage.Builder auditMessageFor(AuditAction
op) {
Map<String, String> auditMap = getAuditParameters();
auditMap.put("x-amz-request-id", requestIdentifier.getRequestId());
auditMap.put("x-amz-id-2", requestIdentifier.getAmzId());
+ if (s3Auth != null) {
+ // For STS temporary credentials, record the originalAccessKeyId (the
permanent principal that
+ // created the token) so the audit trail is not limited to the opaque
tempAccessKeyId.
+ final String originalAccessKeyId =
AuditUtils.getStsOriginalAccessKeyId(s3Auth.getSessionToken());
Review Comment:
updated to include it only after successful validation
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]