mirror of
https://github.com/minio/minio.git
synced 2025-04-01 02:03:42 -04: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 {
|
if !impliedPolicy {
|
||||||
svcAccountPolicy = svcAccountPolicy.Merge(*policy)
|
svcAccountPolicy = svcAccountPolicy.Merge(*policy)
|
||||||
} else {
|
} else {
|
||||||
policiesNames, err := globalIAMSys.PolicyDBGet(svcAccount.AccessKey, false)
|
policiesNames, err := globalIAMSys.PolicyDBGet(svcAccount.ParentUser, false)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
writeErrorResponseJSON(ctx, w, toAdminAPIErr(ctx, err), r.URL)
|
writeErrorResponseJSON(ctx, w, toAdminAPIErr(ctx, err), r.URL)
|
||||||
return
|
return
|
||||||
|
Loading…
x
Reference in New Issue
Block a user