mirror of
https://github.com/minio/minio.git
synced 2025-11-10 14:09:48 -05:00
fix: some races when accessing ldap/openid config globally (#14978)
This commit is contained in:
@@ -62,6 +62,31 @@ type Config struct {
|
||||
rootCAs *x509.CertPool
|
||||
}
|
||||
|
||||
// Clone returns a cloned copy of LDAP config.
|
||||
func (l *Config) Clone() Config {
|
||||
if l == nil {
|
||||
return Config{}
|
||||
}
|
||||
cfg := Config{
|
||||
Enabled: l.Enabled,
|
||||
ServerAddr: l.ServerAddr,
|
||||
UserDNSearchBaseDistName: l.UserDNSearchBaseDistName,
|
||||
UserDNSearchBaseDistNames: l.UserDNSearchBaseDistNames,
|
||||
UserDNSearchFilter: l.UserDNSearchFilter,
|
||||
GroupSearchBaseDistName: l.GroupSearchBaseDistName,
|
||||
GroupSearchBaseDistNames: l.GroupSearchBaseDistNames,
|
||||
GroupSearchFilter: l.GroupSearchFilter,
|
||||
LookupBindDN: l.LookupBindDN,
|
||||
LookupBindPassword: l.LookupBindPassword,
|
||||
stsExpiryDuration: l.stsExpiryDuration,
|
||||
tlsSkipVerify: l.tlsSkipVerify,
|
||||
serverInsecure: l.serverInsecure,
|
||||
serverStartTLS: l.serverStartTLS,
|
||||
rootCAs: l.rootCAs,
|
||||
}
|
||||
return cfg
|
||||
}
|
||||
|
||||
// LDAP keys and envs.
|
||||
const (
|
||||
ServerAddr = "server_addr"
|
||||
|
||||
Reference in New Issue
Block a user