rajeshkumarchandolu commented on code in PR #12145:
URL: https://github.com/apache/ozone/pull/12145#discussion_r4693814814
##########
hadoop-hdds/framework/src/main/java/org/apache/hadoop/ozone/audit/AuditMessage.java:
##########
@@ -121,6 +122,7 @@ public Builder setPerformance(PerformanceStringBuilder
perf) {
}
public AuditMessage build() {
+ TracingUtil.addAttributesToCurrentSpan(params);
Review Comment:
Thanks, good catch — I reproduced it on a compose cluster: a presigned-style
GET puts X-Amz-Signature, X-Amz-Security-Token and X-Amz-Credential into the
BucketEndpoint.get span.
The root cause is upstream of this change, though: S3 Gateway's
AuditUtils.getAuditParameters copies every query parameter into the audit
params, so the same values already land in the S3 Gateway audit log today.
These are credentials and aren't needed for auditing (the caller is already in
the user field), so the right fix is to leave them out where the params are
added. That covers both the audit log and the span with one change, and keeps
S3-specific knowledge out of the shared AuditMessage/TracingUtil code. I
checked the other services' audit maps and didn't find credentials in them.
Filed [HDDS-17928](https://issues.apache.org/jira/browse/HDDS-17928) for
this (with a presigned-request test that the signature, credential and session
token are absent), and I'll make sure it lands before this PR is merged so this
PR doesn't add a new place where they show up.
--
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]