diff --git a/README.md b/README.md index bf6b706b..287319c2 100644 --- a/README.md +++ b/README.md @@ -785,7 +785,9 @@ To create the secrets, you can use the commands below: #### Enabling LDAP Integration at AWX bootstrap -A sample of extra settings can be found as below: +A sample of extra settings can be found as below. All possible options can be found here: https://django-auth-ldap.readthedocs.io/en/latest/reference.html#settings + +> **NOTE:** These values are inserted into a Python file, so pay close attention to which values need quotes and which do not. ```yaml - setting: AUTH_LDAP_SERVER_URI @@ -802,6 +804,9 @@ A sample of extra settings can be found as below: - setting: AUTH_LDAP_GROUP_SEARCH value: 'LDAPSearch("OU=Groups,DC=abc,DC=com",ldap.SCOPE_SUBTREE,"(objectClass=group)",)' + - setting: AUTH_LDAP_GROUP_TYPE + value: 'GroupOfNamesType(name_attr="cn")' + - setting: AUTH_LDAP_USER_ATTR_MAP value: '{"first_name": "givenName","last_name": "sn","email": "mail"}' diff --git a/roles/installer/templates/configmaps/config.yaml.j2 b/roles/installer/templates/configmaps/config.yaml.j2 index 8ba4941f..12a29123 100644 --- a/roles/installer/templates/configmaps/config.yaml.j2 +++ b/roles/installer/templates/configmaps/config.yaml.j2 @@ -18,7 +18,8 @@ data: settings: | import os import socket - from django_auth_ldap.config import LDAPSearch + # Import all so that extra_settings works properly + from django_auth_ldap.config import * def get_secret(): if os.path.exists("/etc/tower/SECRET_KEY"):