mirror of
https://github.com/minio/minio.git
synced 2025-03-31 09:43:43 -04:00
Optimization: reuse hashedSecret when LookupConfig (#19724)
This commit is contained in:
parent
074d70112d
commit
01bfc78535
@ -509,13 +509,11 @@ func (r *Config) GetSettings() madmin.OpenIDSettings {
|
|||||||
return res
|
return res
|
||||||
}
|
}
|
||||||
h := sha256.New()
|
h := sha256.New()
|
||||||
for arn, provCfg := range r.arnProviderCfgsMap {
|
|
||||||
hashedSecret := ""
|
hashedSecret := ""
|
||||||
{
|
for arn, provCfg := range r.arnProviderCfgsMap {
|
||||||
h.Reset()
|
|
||||||
h.Write([]byte(provCfg.ClientSecret))
|
h.Write([]byte(provCfg.ClientSecret))
|
||||||
hashedSecret = base64.RawURLEncoding.EncodeToString(h.Sum(nil))
|
hashedSecret = base64.RawURLEncoding.EncodeToString(h.Sum(nil))
|
||||||
}
|
h.Reset()
|
||||||
if arn != DummyRoleARN {
|
if arn != DummyRoleARN {
|
||||||
if res.Roles == nil {
|
if res.Roles == nil {
|
||||||
res.Roles = make(map[string]madmin.OpenIDProviderSettings)
|
res.Roles = make(map[string]madmin.OpenIDProviderSettings)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user