LDAP Test connection was not using GlobalRootCAs (#12612)

Signed-off-by: Lenin Alevski <alevsk.8772@gmail.com>
This commit is contained in:
Lenin Alevski 2021-07-01 17:41:01 -07:00 committed by GitHub
parent 4f6c74a257
commit 0ad03908d0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -474,6 +474,7 @@ func Lookup(kvs config.KVS, rootCAs *x509.CertPool) (l Config, err error) {
return l, nil return l, nil
} }
l.Enabled = true l.Enabled = true
l.rootCAs = rootCAs
l.ServerAddr = ldapServer l.ServerAddr = ldapServer
l.stsExpiryDuration = defaultLDAPExpiry l.stsExpiryDuration = defaultLDAPExpiry
if v := env.Get(EnvSTSExpiry, kvs.Get(STSExpiry)); v != "" { if v := env.Get(EnvSTSExpiry, kvs.Get(STSExpiry)); v != "" {
@ -565,6 +566,5 @@ func Lookup(kvs config.KVS, rootCAs *x509.CertPool) (l Config, err error) {
l.GroupSearchBaseDistNames = strings.Split(l.GroupSearchBaseDistName, dnDelimiter) l.GroupSearchBaseDistNames = strings.Split(l.GroupSearchBaseDistName, dnDelimiter)
} }
l.rootCAs = rootCAs
return l, nil return l, nil
} }