mirror of
https://github.com/minio/minio.git
synced 2024-12-24 06:05:55 -05:00
svcacct: Always search for parent user policy svcacct implied policy (#12117)
InfoServiceAccount admin API does not correctly calculate the policy for a given service account in case if the policy is implied. Fix it. Signed-off-by: Anis Elleuch <anis@min.io>
This commit is contained in:
parent
38a9f87a56
commit
cebada2cc7
@ -722,7 +722,7 @@ func (a adminAPIHandlers) InfoServiceAccount(w http.ResponseWriter, r *http.Requ
|
||||
if !impliedPolicy {
|
||||
svcAccountPolicy = svcAccountPolicy.Merge(*policy)
|
||||
} else {
|
||||
policiesNames, err := globalIAMSys.PolicyDBGet(svcAccount.AccessKey, false)
|
||||
policiesNames, err := globalIAMSys.PolicyDBGet(svcAccount.ParentUser, false)
|
||||
if err != nil {
|
||||
writeErrorResponseJSON(ctx, w, toAdminAPIErr(ctx, err), r.URL)
|
||||
return
|
||||
|
Loading…
Reference in New Issue
Block a user