mirror of
https://github.com/minio/minio.git
synced 2025-04-25 12:34:03 -04:00
fix: set appropriate defaults when new keys added (#8795)
A new key was added in identity_openid recently required explicitly for client to set the optional value without that it would be empty, handle this appropriately. Fixes #8787
This commit is contained in:
parent
5aa5dcdc6d
commit
686d4656de
4
cmd/config/cache/lookup.go
vendored
4
cmd/config/cache/lookup.go
vendored
@ -121,9 +121,7 @@ func LookupConfig(kvs config.KVS) (Config, error) {
|
|||||||
return cfg, config.ErrInvalidCacheQuota(err)
|
return cfg, config.ErrInvalidCacheQuota(err)
|
||||||
}
|
}
|
||||||
cfg.Quota = cfg.MaxUse
|
cfg.Quota = cfg.MaxUse
|
||||||
}
|
} else if quotaStr := env.Get(EnvCacheQuota, kvs.Get(Quota)); quotaStr != "" {
|
||||||
|
|
||||||
if quotaStr := env.Get(EnvCacheQuota, kvs.Get(Quota)); quotaStr != "" {
|
|
||||||
cfg.Quota, err = strconv.Atoi(quotaStr)
|
cfg.Quota, err = strconv.Atoi(quotaStr)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return cfg, config.ErrInvalidCacheQuota(err)
|
return cfg, config.ErrInvalidCacheQuota(err)
|
||||||
|
@ -621,6 +621,12 @@ func (c Config) SetKVS(s string, defaultKVS map[string]KVS) error {
|
|||||||
currKVS, ok := c[subSys][tgt]
|
currKVS, ok := c[subSys][tgt]
|
||||||
if !ok {
|
if !ok {
|
||||||
currKVS = defaultKVS[subSys]
|
currKVS = defaultKVS[subSys]
|
||||||
|
} else {
|
||||||
|
for _, kv := range defaultKVS[subSys] {
|
||||||
|
if _, ok = currKVS.Lookup(kv.Key); !ok {
|
||||||
|
currKVS.Set(kv.Key, kv.Value)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, kv := range kvs {
|
for _, kv := range kvs {
|
||||||
|
@ -326,6 +326,11 @@ func LookupConfig(kvs config.KVS, transport *http.Transport, closeRespFn func(io
|
|||||||
return c, err
|
return c, err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if c.ClaimName == "" {
|
||||||
|
c.ClaimName = iampolicy.PolicyName
|
||||||
|
}
|
||||||
|
|
||||||
if jwksURL == "" {
|
if jwksURL == "" {
|
||||||
// Fallback to discovery document jwksURL
|
// Fallback to discovery document jwksURL
|
||||||
jwksURL = c.DiscoveryDoc.JwksURI
|
jwksURL = c.DiscoveryDoc.JwksURI
|
||||||
|
Loading…
x
Reference in New Issue
Block a user