From 54aed421b8af5b0c369d112e594d843433f217cc Mon Sep 17 00:00:00 2001 From: Praveen raj Mani Date: Thu, 26 Oct 2023 20:41:29 +0530 Subject: [PATCH] fix: update the user cache while adding service accounts with expiry (#18320) --- cmd/iam-store.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/iam-store.go b/cmd/iam-store.go index 07ab8ec86..8c172a3aa 100644 --- a/cmd/iam-store.go +++ b/cmd/iam-store.go @@ -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