mirror of
https://github.com/minio/minio.git
synced 2025-12-08 16:53:11 -05:00
fix: correct parentUser lookup for OIDC auto expiration (#14154)
fixes #14026 This is a regression from #13884
This commit is contained in:
@@ -1457,7 +1457,20 @@ func (store *IAMStoreSys) GetAllParentUsers() []string {
|
||||
res := set.NewStringSet()
|
||||
for _, cred := range cache.iamUsersMap {
|
||||
if cred.IsServiceAccount() || cred.IsTemp() {
|
||||
res.Add(cred.ParentUser)
|
||||
parentUser := cred.ParentUser
|
||||
if cred.SessionToken != "" {
|
||||
claims, err := getClaimsFromToken(cred.SessionToken)
|
||||
if err != nil {
|
||||
continue
|
||||
}
|
||||
if v, ok := claims[subClaim]; ok {
|
||||
subFromToken, ok := v.(string)
|
||||
if ok {
|
||||
parentUser = subFromToken
|
||||
}
|
||||
}
|
||||
}
|
||||
res.Add(parentUser)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user