mirror of
https://github.com/minio/minio.git
synced 2025-11-07 12:52:58 -05:00
fix: OpenID config initialization (#17544)
This is due to a regression in the handling of the enable key in OpenID configuration.
This commit is contained in:
committed by
GitHub
parent
2fcb75d86d
commit
bde533a9c7
@@ -243,11 +243,8 @@ func LookupConfig(s config.Config, transport http.RoundTripper, closeRespFn func
|
||||
// parameters are non-empty.
|
||||
var (
|
||||
cfgEnableVal = getCfgVal(config.Enable)
|
||||
isExplicitlyEnabled = false
|
||||
isExplicitlyEnabled = cfgEnableVal != ""
|
||||
)
|
||||
if cfgEnableVal != "" {
|
||||
isExplicitlyEnabled = true
|
||||
}
|
||||
|
||||
var enabled bool
|
||||
if isExplicitlyEnabled {
|
||||
@@ -423,17 +420,21 @@ func (r *Config) GetConfigInfo(s config.Config, cfgName string) ([]madmin.IDPCfg
|
||||
|
||||
res := make([]madmin.IDPCfgInfo, 0, len(kvsrcs)+1)
|
||||
for _, kvsrc := range kvsrcs {
|
||||
// skip default values.
|
||||
// skip returning default config values.
|
||||
if kvsrc.Src == config.ValueSourceDef {
|
||||
if kvsrc.Key != madmin.EnableKey {
|
||||
continue
|
||||
}
|
||||
// set an explicit on/off from live configuration.
|
||||
kvsrc.Value = "off"
|
||||
if _, ok := r.ProviderCfgs[cfgName]; ok {
|
||||
if r.Enabled {
|
||||
kvsrc.Value = "on"
|
||||
}
|
||||
// for EnableKey we set an explicit on/off from live configuration
|
||||
// if it is present.
|
||||
if _, ok := r.ProviderCfgs[cfgName]; !ok {
|
||||
// No live config is present
|
||||
continue
|
||||
}
|
||||
if r.Enabled {
|
||||
kvsrc.Value = "on"
|
||||
} else {
|
||||
kvsrc.Value = "off"
|
||||
}
|
||||
}
|
||||
res = append(res, madmin.IDPCfgInfo{
|
||||
|
||||
Reference in New Issue
Block a user