Merge pull request #779 from BegBlev/ldap-group-search-issue
AUTH_LDAP_BIND_AS_AUTHENTICATING_USER is now loaded from environment
This commit is contained in:
commit
d385cd2aa9
@ -31,7 +31,10 @@ AUTH_LDAP_CONNECTION_OPTIONS = {
|
|||||||
ldap.OPT_REFERRALS: 0
|
ldap.OPT_REFERRALS: 0
|
||||||
}
|
}
|
||||||
|
|
||||||
# Set the DN and password for the NetBox service account.
|
AUTH_LDAP_BIND_AS_AUTHENTICATING_USER = environ.get('AUTH_LDAP_BIND_AS_AUTHENTICATING_USER', 'False').lower() == 'true'
|
||||||
|
|
||||||
|
# Set the DN and password for the NetBox service account if needed.
|
||||||
|
if not AUTH_LDAP_BIND_AS_AUTHENTICATING_USER:
|
||||||
AUTH_LDAP_BIND_DN = environ.get('AUTH_LDAP_BIND_DN', '')
|
AUTH_LDAP_BIND_DN = environ.get('AUTH_LDAP_BIND_DN', '')
|
||||||
AUTH_LDAP_BIND_PASSWORD = _read_secret('auth_ldap_bind_password', environ.get('AUTH_LDAP_BIND_PASSWORD', ''))
|
AUTH_LDAP_BIND_PASSWORD = _read_secret('auth_ldap_bind_password', environ.get('AUTH_LDAP_BIND_PASSWORD', ''))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user