From 958bba5b42f3c66e17923375a8d844b675f23cd5 Mon Sep 17 00:00:00 2001 From: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com> Date: Thu, 2 Mar 2023 14:35:24 -0800 Subject: [PATCH] Attach creds, owner and region to madmin calls (#16658) Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com> --- cmd/auth-handler.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cmd/auth-handler.go b/cmd/auth-handler.go index 6d8499fa7..7214ed645 100644 --- a/cmd/auth-handler.go +++ b/cmd/auth-handler.go @@ -154,6 +154,10 @@ func validateAdminSignature(ctx context.Context, r *http.Request, region string) return cred, owner, s3Err } + logger.GetReqInfo(ctx).Cred = cred + logger.GetReqInfo(ctx).Owner = owner + logger.GetReqInfo(ctx).Region = globalSite.Region + return cred, owner, ErrNone } @@ -344,6 +348,7 @@ func authenticateRequest(ctx context.Context, r *http.Request, action policy.Act logger.GetReqInfo(ctx).Cred = cred logger.GetReqInfo(ctx).Owner = owner + logger.GetReqInfo(ctx).Region = globalSite.Region // region is valid only for CreateBucketAction. var region string