mirror of
https://github.com/minio/minio.git
synced 2025-11-10 14:09:48 -05:00
Add LDAP DNS SRV record lookup support (#16201)
This commit is contained in:
committed by
GitHub
parent
2fc182d8e6
commit
a469e6768d
@@ -62,6 +62,7 @@ func (l *Config) Clone() Config {
|
||||
// LDAP keys and envs.
|
||||
const (
|
||||
ServerAddr = "server_addr"
|
||||
SRVRecordName = "srv_record_name"
|
||||
LookupBindDN = "lookup_bind_dn"
|
||||
LookupBindPassword = "lookup_bind_password"
|
||||
UserDNSearchBaseDN = "user_dn_search_base_dn"
|
||||
@@ -73,6 +74,7 @@ const (
|
||||
ServerStartTLS = "server_starttls"
|
||||
|
||||
EnvServerAddr = "MINIO_IDENTITY_LDAP_SERVER_ADDR"
|
||||
EnvSRVRecordName = "MINIO_IDENTITY_LDAP_SRV_RECORD_NAME"
|
||||
EnvTLSSkipVerify = "MINIO_IDENTITY_LDAP_TLS_SKIP_VERIFY"
|
||||
EnvServerInsecure = "MINIO_IDENTITY_LDAP_SERVER_INSECURE"
|
||||
EnvServerStartTLS = "MINIO_IDENTITY_LDAP_SERVER_STARTTLS"
|
||||
@@ -100,6 +102,10 @@ var (
|
||||
Key: ServerAddr,
|
||||
Value: "",
|
||||
},
|
||||
config.KV{
|
||||
Key: SRVRecordName,
|
||||
Value: "",
|
||||
},
|
||||
config.KV{
|
||||
Key: UserDNSearchBaseDN,
|
||||
Value: "",
|
||||
@@ -173,9 +179,10 @@ func Lookup(s config.Config, rootCAs *x509.CertPool) (l Config, err error) {
|
||||
return l, nil
|
||||
}
|
||||
l.LDAP = ldap.Config{
|
||||
Enabled: true,
|
||||
RootCAs: rootCAs,
|
||||
ServerAddr: ldapServer,
|
||||
Enabled: true,
|
||||
RootCAs: rootCAs,
|
||||
ServerAddr: ldapServer,
|
||||
SRVRecordName: getCfgVal(SRVRecordName),
|
||||
}
|
||||
l.stsExpiryDuration = defaultLDAPExpiry
|
||||
|
||||
|
||||
Reference in New Issue
Block a user