mirror of
https://github.com/minio/minio.git
synced 2025-03-29 08:43:40 -04:00
fix: remove unnecessary panic in iam-store (#19050)
This commit is contained in:
parent
f8e15e7d09
commit
a14e192376
@ -2429,17 +2429,11 @@ func (store *IAMStoreSys) GetSTSAndServiceAccounts() []auth.Credentials {
|
|||||||
var res []auth.Credentials
|
var res []auth.Credentials
|
||||||
for _, u := range cache.iamUsersMap {
|
for _, u := range cache.iamUsersMap {
|
||||||
cred := u.Credentials
|
cred := u.Credentials
|
||||||
if cred.IsTemp() {
|
|
||||||
panic("unexpected STS credential found in iamUsersMap")
|
|
||||||
}
|
|
||||||
if cred.IsServiceAccount() {
|
if cred.IsServiceAccount() {
|
||||||
res = append(res, cred)
|
res = append(res, cred)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for _, u := range cache.iamSTSAccountsMap {
|
for _, u := range cache.iamSTSAccountsMap {
|
||||||
if !u.Credentials.IsTemp() {
|
|
||||||
panic("unexpected non STS credential found in iamSTSAccountsMap")
|
|
||||||
}
|
|
||||||
res = append(res, u.Credentials)
|
res = append(res, u.Credentials)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user