Add the policy name to the audit logs tags when doing policy-based API calls. Add retention settings to tags (#20638)

* Add the policy name to the audit log tags when doing policy-based API calls

* Audit log the retention settings requested in the API call

* Audit log of retention on PutObjectRetention API path too
This commit is contained in:
Mark Theunissen
2024-11-26 04:17:12 +11:00
committed by GitHub
parent c07e5b49d4
commit d202fdd022
5 changed files with 112 additions and 1 deletions

View File

@@ -2899,6 +2899,8 @@ func (api objectAPIHandlers) PutObjectRetentionHandler(w http.ResponseWriter, r
writeErrorResponse(ctx, w, apiErr, r.URL)
return
}
reqInfo := logger.GetReqInfo(ctx)
reqInfo.SetTags("retention", objRetention.String())
opts, err := getOpts(ctx, r, bucket, object)
if err != nil {