mirror of
https://github.com/minio/minio.git
synced 2024-12-25 06:35:56 -05:00
fix: purge LDAP deprecated keys
This commit is contained in:
parent
5c6bfae4c7
commit
9722531817
@ -103,6 +103,11 @@ const (
|
|||||||
EnvLookupBindPassword = "MINIO_IDENTITY_LDAP_LOOKUP_BIND_PASSWORD"
|
EnvLookupBindPassword = "MINIO_IDENTITY_LDAP_LOOKUP_BIND_PASSWORD"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
var removedKeys = []string{
|
||||||
|
"username_search_filter",
|
||||||
|
"username_search_base_dn",
|
||||||
|
}
|
||||||
|
|
||||||
// DefaultKVS - default config for LDAP config
|
// DefaultKVS - default config for LDAP config
|
||||||
var (
|
var (
|
||||||
DefaultKVS = config.KVS{
|
DefaultKVS = config.KVS{
|
||||||
@ -366,6 +371,12 @@ func Enabled(kvs config.KVS) bool {
|
|||||||
// Lookup - initializes LDAP config, overrides config, if any ENV values are set.
|
// Lookup - initializes LDAP config, overrides config, if any ENV values are set.
|
||||||
func Lookup(kvs config.KVS, rootCAs *x509.CertPool) (l Config, err error) {
|
func Lookup(kvs config.KVS, rootCAs *x509.CertPool) (l Config, err error) {
|
||||||
l = Config{}
|
l = Config{}
|
||||||
|
|
||||||
|
// Purge all removed keys first
|
||||||
|
for _, k := range removedKeys {
|
||||||
|
kvs.Delete(k)
|
||||||
|
}
|
||||||
|
|
||||||
if err = config.CheckValidKeys(config.IdentityLDAPSubSys, kvs, DefaultKVS); err != nil {
|
if err = config.CheckValidKeys(config.IdentityLDAPSubSys, kvs, DefaultKVS); err != nil {
|
||||||
return l, err
|
return l, err
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user