mirror of
https://github.com/minio/minio.git
synced 2025-01-12 15:33:22 -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
|
return s.Creds, nil
|
||||||
}
|
}
|
||||||
s.RUnlock()
|
s.RUnlock()
|
||||||
s.Lock()
|
m := make(map[string]UserIdentity)
|
||||||
defer s.Unlock()
|
|
||||||
var m map[string]UserIdentity
|
|
||||||
if err := globalIAMSys.store.loadUser(ctx, siteReplicatorSvcAcc, svcUser, m); err != nil {
|
if err := globalIAMSys.store.loadUser(ctx, siteReplicatorSvcAcc, svcUser, m); err != nil {
|
||||||
return auth.Credentials{}, err
|
return auth.Credentials{}, err
|
||||||
}
|
}
|
||||||
|
s.Set(m[siteReplicatorSvcAcc].Credentials)
|
||||||
return m[siteReplicatorSvcAcc].Credentials, nil
|
return m[siteReplicatorSvcAcc].Credentials, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user