Add the access key and parent user in the audit log (#16572)

This commit is contained in:
Anis Elleuch 2023-02-08 20:05:26 +01:00 committed by GitHub
parent b1d98febfd
commit fadc46b906
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 0 deletions

View File

@ -116,6 +116,9 @@ func AuditLog(ctx context.Context, w http.ResponseWriter, r *http.Request, reqCl
headerBytes = int64(st.HeaderSize())
}
entry.AccessKey = reqInfo.Cred.AccessKey
entry.ParentUser = reqInfo.Cred.ParentUser
entry.API.Name = reqInfo.API
entry.API.Bucket = reqInfo.BucketName
entry.API.Object = reqInfo.ObjectName

View File

@ -66,6 +66,9 @@ type Entry struct {
RespHeader map[string]string `json:"responseHeader,omitempty"`
Tags map[string]interface{} `json:"tags,omitempty"`
AccessKey string `json:"accessKey,omitempty"`
ParentUser string `json:"parentUser,omitempty"`
Error string `json:"error,omitempty"`
}