svcacct: Always search for parent user policy svcacct implied policy
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
7b89f172df
commit
9e8051c22f
|
@ -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 a new issue