mirror of
https://github.com/minio/minio.git
synced 2024-12-24 22:25:54 -05:00
fix: a regression in loading replication creds (#19204)
fixes #19200 generating STS credentials fail with site-replicated setup, with this error on a fresh environment.
This commit is contained in:
parent
df57bfcd6c
commit
cd7551031b
@ -6207,12 +6207,11 @@ func (s *siteReplicatorCred) Get(ctx context.Context) (auth.Credentials, error)
|
||||
return s.Creds, nil
|
||||
}
|
||||
s.RUnlock()
|
||||
s.Lock()
|
||||
defer s.Unlock()
|
||||
var m map[string]UserIdentity
|
||||
m := make(map[string]UserIdentity)
|
||||
if err := globalIAMSys.store.loadUser(ctx, siteReplicatorSvcAcc, svcUser, m); err != nil {
|
||||
return auth.Credentials{}, err
|
||||
}
|
||||
s.Set(m[siteReplicatorSvcAcc].Credentials)
|
||||
return m[siteReplicatorSvcAcc].Credentials, nil
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user