summaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorChris Church <chris@ninemoreminutes.com>2013-09-07 22:14:43 +0200
committerChris Church <chris@ninemoreminutes.com>2013-09-07 22:14:46 +0200
commit916dd713e3b7d18a31379f4922aa8b37ec328554 (patch)
treefc7ca8b90d381abd7f7d5c045643f4c5e40399e1 /config
parentAdd config file to setup.py (diff)
downloadawx-916dd713e3b7d18a31379f4922aa8b37ec328554.tar.xz
awx-916dd713e3b7d18a31379f4922aa8b37ec328554.zip
AC-156 Added code and tests to support LDAP authentication (no organization or team mapping yet).
Diffstat (limited to 'config')
-rw-r--r--config/deb/settings.py28
-rw-r--r--config/rpm/settings.py28
2 files changed, 56 insertions, 0 deletions
diff --git a/config/deb/settings.py b/config/deb/settings.py
index 50ac050710..015d074de3 100644
--- a/config/deb/settings.py
+++ b/config/deb/settings.py
@@ -54,3 +54,31 @@ EMAIL_PORT = 25
EMAIL_HOST_USER = ''
EMAIL_HOST_PASSWORD = ''
EMAIL_USE_TLS = False
+
+# LDAP connection and authentication settings. Refer to django-auth-ldap docs:
+# http://pythonhosted.org/django-auth-ldap/authentication.html
+
+AUTH_LDAP_SERVER_URI = ''
+AUTH_LDAP_BIND_DN = ''
+AUTH_LDAP_BIND_PASSWORD = ''
+AUTH_LDAP_START_TLS = False
+
+#import ldap
+#from django_auth_ldap.config import LDAPSearch, LDAPSearchUnion
+
+# LDAP search query to find users.
+#AUTH_LDAP_USER_SEARCH = LDAPSearch(
+# 'OU=Users,DC=example,DC=com',
+# ldap.SCOPE_SUBTREE,
+# '(sAMAccountName=%(user)s)',
+#)
+
+# Alternative to user search.
+#AUTH_LDAP_USER_DN_TEMPLATE = 'sAMAccountName=%(user)s,OU=Users,DC=example,DC=com'
+
+# Mapping of LDAP attributes to user attributes.
+#AUTH_LDAP_USER_ATTR_MAP = {
+# 'first_name': 'givenName',
+# 'last_name': 'sn',
+# 'email': 'mail',
+#}
diff --git a/config/rpm/settings.py b/config/rpm/settings.py
index 50ac050710..015d074de3 100644
--- a/config/rpm/settings.py
+++ b/config/rpm/settings.py
@@ -54,3 +54,31 @@ EMAIL_PORT = 25
EMAIL_HOST_USER = ''
EMAIL_HOST_PASSWORD = ''
EMAIL_USE_TLS = False
+
+# LDAP connection and authentication settings. Refer to django-auth-ldap docs:
+# http://pythonhosted.org/django-auth-ldap/authentication.html
+
+AUTH_LDAP_SERVER_URI = ''
+AUTH_LDAP_BIND_DN = ''
+AUTH_LDAP_BIND_PASSWORD = ''
+AUTH_LDAP_START_TLS = False
+
+#import ldap
+#from django_auth_ldap.config import LDAPSearch, LDAPSearchUnion
+
+# LDAP search query to find users.
+#AUTH_LDAP_USER_SEARCH = LDAPSearch(
+# 'OU=Users,DC=example,DC=com',
+# ldap.SCOPE_SUBTREE,
+# '(sAMAccountName=%(user)s)',
+#)
+
+# Alternative to user search.
+#AUTH_LDAP_USER_DN_TEMPLATE = 'sAMAccountName=%(user)s,OU=Users,DC=example,DC=com'
+
+# Mapping of LDAP attributes to user attributes.
+#AUTH_LDAP_USER_ATTR_MAP = {
+# 'first_name': 'givenName',
+# 'last_name': 'sn',
+# 'email': 'mail',
+#}