|
@@ -368,12 +368,16 @@ class LdapBackend(object):
|
|
|
self._backend = _LDAPBackend()
|
|
self._backend = _LDAPBackend()
|
|
|
|
|
|
|
|
def add_ldap_config(self, ldap_config):
|
|
def add_ldap_config(self, ldap_config):
|
|
|
- if ldap_config.LDAP_URL.get() is None:
|
|
|
|
|
|
|
+ ldap_url = ldap_config.LDAP_URL.get()
|
|
|
|
|
+ if ldap_url is None:
|
|
|
LOG.warn("Could not find LDAP URL required for authentication.")
|
|
LOG.warn("Could not find LDAP URL required for authentication.")
|
|
|
return None
|
|
return None
|
|
|
else:
|
|
else:
|
|
|
setattr(self._backend.settings, 'SERVER_URI', ldap_config.LDAP_URL.get())
|
|
setattr(self._backend.settings, 'SERVER_URI', ldap_config.LDAP_URL.get())
|
|
|
|
|
|
|
|
|
|
+ if ldap_url.lower().startswith('ldaps') and ldap_config.USE_START_TLS.get():
|
|
|
|
|
+ LOG.warn("Cannot configure LDAP with SSL and enable STARTTLS.")
|
|
|
|
|
+
|
|
|
if ldap_config.SEARCH_BIND_AUTHENTICATION.get():
|
|
if ldap_config.SEARCH_BIND_AUTHENTICATION.get():
|
|
|
# New Search/Bind Auth
|
|
# New Search/Bind Auth
|
|
|
base_dn = ldap_config.BASE_DN.get()
|
|
base_dn = ldap_config.BASE_DN.get()
|