fix: update the user cache while adding service accounts with expiry (#18320)

This commit is contained in:
Praveen raj Mani 2023-10-26 20:41:29 +05:30 committed by GitHub
parent d5e8dac1cf
commit 54aed421b8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -420,10 +420,10 @@ func (c *iamCache) updateUserWithClaims(key string, u UserIdentity) error {
}
u.Credentials.Claims = jwtClaims.Map()
}
if !u.Credentials.IsTemp() {
c.iamUsersMap[key] = u
} else {
if u.Credentials.IsTemp() && !u.Credentials.IsServiceAccount() {
c.iamSTSAccountsMap[key] = u
} else {
c.iamUsersMap[key] = u
}
c.updatedAt = time.Now()
return nil