mirror of
https://github.com/minio/minio.git
synced 2024-12-24 06:05:55 -05: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
|
||||
for _, u := range cache.iamUsersMap {
|
||||
cred := u.Credentials
|
||||
if cred.IsTemp() {
|
||||
panic("unexpected STS credential found in iamUsersMap")
|
||||
}
|
||||
if cred.IsServiceAccount() {
|
||||
res = append(res, cred)
|
||||
}
|
||||
}
|
||||
for _, u := range cache.iamSTSAccountsMap {
|
||||
if !u.Credentials.IsTemp() {
|
||||
panic("unexpected non STS credential found in iamSTSAccountsMap")
|
||||
}
|
||||
res = append(res, u.Credentials)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user