mirror of
https://github.com/minio/minio.git
synced 2026-11-13 22:45:16 +00:00
Add enable flag for LDAP IDP config (#16805)
This commit is contained in:
1 parent
d1e775313d
commit
58266c9e2c
4 files changed
+146
-125
No files matched your search
@@ -98,6 +98,10 @@ var removedKeys = []string{
|
||||
// DefaultKVS - default config for LDAP config
|
||||
var (
|
||||
DefaultKVS = config.KVS{
|
||||
config.KV{
|
||||
Key: config.Enable,
|
||||
Value: "",
|
||||
},
|
||||
config.KV{
|
||||
Key: ServerAddr,
|
||||
Value: "",
|
||||
@@ -184,6 +188,16 @@ func Lookup(s config.Config, rootCAs *x509.CertPool) (l Config, err error) {
|
||||
ServerAddr: ldapServer,
|
||||
SRVRecordName: getCfgVal(SRVRecordName),
|
||||
}
|
||||
|
||||
// Parse explicity enable=on/off flag. If not set, defaults to `true`
|
||||
// because ServerAddr is set.
|
||||
if v := getCfgVal(config.Enable); v != "" {
|
||||
l.LDAP.Enabled, err = config.ParseBool(v)
|
||||
if err != nil {
|
||||
return l, err
|
||||
}
|
||||
}
|
||||
|
||||
l.stsExpiryDuration = defaultLDAPExpiry
|
||||
|
||||
// LDAP connection configuration
|
||||
|
||||
Reference in new issue
Block a user