Hello,
I am seem to be getting an error when trying to test users logging into AWX from Microsoft AD.
My configuration for LDAP is below
`
{
“AUTH_LDAP_SERVER_URI”: “”,
“AUTH_LDAP_BIND_DN”: “”,
“AUTH_LDAP_BIND_PASSWORD”: “”,
“AUTH_LDAP_START_TLS”: false,
“AUTH_LDAP_CONNECTION_OPTIONS”: {
“OPT_REFERRALS”: 0,
“OPT_NETWORK_TIMEOUT”: 30
},
“AUTH_LDAP_USER_SEARCH”: ,
“AUTH_LDAP_USER_DN_TEMPLATE”: null,
“AUTH_LDAP_USER_ATTR_MAP”: {},
“AUTH_LDAP_GROUP_SEARCH”: ,
“AUTH_LDAP_GROUP_TYPE”: “MemberDNGroupType”,
“AUTH_LDAP_GROUP_TYPE_PARAMS”: {
“name_attr”: “cn”,
“member_attr”: “member”
},
“AUTH_LDAP_REQUIRE_GROUP”: null,
“AUTH_LDAP_DENY_GROUP”: null,
“AUTH_LDAP_USER_FLAGS_BY_GROUP”: {},
“AUTH_LDAP_ORGANIZATION_MAP”: {},
“AUTH_LDAP_TEAM_MAP”: {},
“AUTH_LDAP_1_SERVER_URI”: “ldap://10.150.10.150:389”,
“AUTH_LDAP_1_BIND_DN”: “CN=ansible1,OU=automation,DC=ad,dc=example,DC=local”,
“AUTH_LDAP_1_BIND_PASSWORD”: “$encrypted$”,
“AUTH_LDAP_1_START_TLS”: false,
“AUTH_LDAP_1_CONNECTION_OPTIONS”: {
“OPT_REFERRALS”: 0,
“OPT_NETWORK_TIMEOUT”: 30
},
“AUTH_LDAP_1_USER_SEARCH”: ,
“AUTH_LDAP_1_USER_DN_TEMPLATE”: null,
“AUTH_LDAP_1_USER_ATTR_MAP”: {
“first_name”: “givenName”,
“last_name”: “sn”,
“email”: “userPrincipalName”
},
“AUTH_LDAP_1_GROUP_SEARCH”: [
“CN=ansible-tower,OU=Users,DC=ad,DC=example,DC=local”,
“SCOPE_SUBTREE”,
“(objectClass=groupOfNames)”
],
“AUTH_LDAP_1_GROUP_TYPE”: “ActiveDirectoryGroupType”,
“AUTH_LDAP_1_GROUP_TYPE_PARAMS”: {},
“AUTH_LDAP_1_REQUIRE_GROUP”: null,
“AUTH_LDAP_1_DENY_GROUP”: null,
“AUTH_LDAP_1_USER_FLAGS_BY_GROUP”: {
“is_superuser”: [
“cn=ansible-tower,OU=Users,DC=ad,DC=example,DC=local”
]
},
“AUTH_LDAP_1_ORGANIZATION_MAP”: {
“TSG”: {
“users”: [
“CN=ansible-tower-users,CN=Users,DC=ad,DC=example,DC=local”
],
“admins”: [
“CN=ansible-tower-admins,CN=Users,DC=ad,DC=example,DC=local”
],
“remove_users”: false,
“remove_admins”: false
}
},
“AUTH_LDAP_1_TEAM_MAP”: {},
“AUTH_LDAP_2_SERVER_URI”: “”,
“AUTH_LDAP_2_BIND_DN”: “”,
“AUTH_LDAP_2_BIND_PASSWORD”: “”,
“AUTH_LDAP_2_START_TLS”: false,
“AUTH_LDAP_2_CONNECTION_OPTIONS”: {
“OPT_REFERRALS”: 0,
“OPT_NETWORK_TIMEOUT”: 30
},
“AUTH_LDAP_2_USER_SEARCH”: ,
“AUTH_LDAP_2_USER_DN_TEMPLATE”: null,
“AUTH_LDAP_2_USER_ATTR_MAP”: {},
“AUTH_LDAP_2_GROUP_SEARCH”: ,
“AUTH_LDAP_2_GROUP_TYPE”: “MemberDNGroupType”,
“AUTH_LDAP_2_GROUP_TYPE_PARAMS”: {
“member_attr”: “member”,
“name_attr”: “cn”
},
“AUTH_LDAP_2_REQUIRE_GROUP”: null,
“AUTH_LDAP_2_DENY_GROUP”: null,
“AUTH_LDAP_2_USER_FLAGS_BY_GROUP”: {},
“AUTH_LDAP_2_ORGANIZATION_MAP”: {},
“AUTH_LDAP_2_TEAM_MAP”: {},
“AUTH_LDAP_3_SERVER_URI”: “”,
“AUTH_LDAP_3_BIND_DN”: “”,
“AUTH_LDAP_3_BIND_PASSWORD”: “”,
“AUTH_LDAP_3_START_TLS”: false,
“AUTH_LDAP_3_CONNECTION_OPTIONS”: {
“OPT_REFERRALS”: 0,
“OPT_NETWORK_TIMEOUT”: 30
},
“AUTH_LDAP_3_USER_SEARCH”: ,
“AUTH_LDAP_3_USER_DN_TEMPLATE”: null,
“AUTH_LDAP_3_USER_ATTR_MAP”: {},
“AUTH_LDAP_3_GROUP_SEARCH”: ,
“AUTH_LDAP_3_GROUP_TYPE”: “MemberDNGroupType”,
“AUTH_LDAP_3_GROUP_TYPE_PARAMS”: {
“member_attr”: “member”,
“name_attr”: “cn”
},
“AUTH_LDAP_3_REQUIRE_GROUP”: null,
“AUTH_LDAP_3_DENY_GROUP”: null,
“AUTH_LDAP_3_USER_FLAGS_BY_GROUP”: {},
“AUTH_LDAP_3_ORGANIZATION_MAP”: {},
“AUTH_LDAP_3_TEAM_MAP”: {},
“AUTH_LDAP_4_SERVER_URI”: “”,
“AUTH_LDAP_4_BIND_DN”: “”,
“AUTH_LDAP_4_BIND_PASSWORD”: “”,
“AUTH_LDAP_4_START_TLS”: false,
“AUTH_LDAP_4_CONNECTION_OPTIONS”: {
“OPT_REFERRALS”: 0,
“OPT_NETWORK_TIMEOUT”: 30
},
“AUTH_LDAP_4_USER_SEARCH”: ,
“AUTH_LDAP_4_USER_DN_TEMPLATE”: null,
“AUTH_LDAP_4_USER_ATTR_MAP”: {},
“AUTH_LDAP_4_GROUP_SEARCH”: ,
“AUTH_LDAP_4_GROUP_TYPE”: “MemberDNGroupType”,
“AUTH_LDAP_4_GROUP_TYPE_PARAMS”: {
“member_attr”: “member”,
“name_attr”: “cn”
},
“AUTH_LDAP_4_REQUIRE_GROUP”: null,
“AUTH_LDAP_4_DENY_GROUP”: null,
“AUTH_LDAP_4_USER_FLAGS_BY_GROUP”: {},
“AUTH_LDAP_4_ORGANIZATION_MAP”: {},
“AUTH_LDAP_4_TEAM_MAP”: {},
“AUTH_LDAP_5_SERVER_URI”: “”,
“AUTH_LDAP_5_BIND_DN”: “”,
“AUTH_LDAP_5_BIND_PASSWORD”: “”,
“AUTH_LDAP_5_START_TLS”: false,
“AUTH_LDAP_5_CONNECTION_OPTIONS”: {
“OPT_REFERRALS”: 0,
“OPT_NETWORK_TIMEOUT”: 30
},
“AUTH_LDAP_5_USER_SEARCH”: ,
“AUTH_LDAP_5_USER_DN_TEMPLATE”: null,
“AUTH_LDAP_5_USER_ATTR_MAP”: {},
“AUTH_LDAP_5_GROUP_SEARCH”: ,
“AUTH_LDAP_5_GROUP_TYPE”: “MemberDNGroupType”,
“AUTH_LDAP_5_GROUP_TYPE_PARAMS”: {
“member_attr”: “member”,
“name_attr”: “cn”
},
“AUTH_LDAP_5_REQUIRE_GROUP”: null,
“AUTH_LDAP_5_DENY_GROUP”: null,
“AUTH_LDAP_5_USER_FLAGS_BY_GROUP”: {},
“AUTH_LDAP_5_ORGANIZATION_MAP”: {},
“AUTH_LDAP_5_TEAM_MAP”: {}
}
`
I am getting the following error in the web docker instance.
`
2019-09-16 18:35:13,694 WARNING django_auth_ldap AUTH_LDAP_USER_SEARCH must be an LDAPSearch instance. while authenticating ellen.ripley
2019-09-16 18:35:13,695 ERROR awx.sso.backends Encountered an error authenticating to LDAP
Traceback (most recent call last):
File “/var/lib/awx/venv/awx/lib64/python3.6/site-packages/awx/sso/backends.py”, line 128, in authenticate
return super(LDAPBackend, self).authenticate(request, username, password)
File “/var/lib/awx/venv/awx/lib64/python3.6/site-packages/django_auth_ldap/backend.py”, line 150, in authenticate
user = self.authenticate_ldap_user(ldap_user, password)
File “/var/lib/awx/venv/awx/lib64/python3.6/site-packages/django_auth_ldap/backend.py”, line 210, in authenticate_ldap_user
return ldap_user.authenticate(password)
File “/var/lib/awx/venv/awx/lib64/python3.6/site-packages/django_auth_ldap/backend.py”, line 348, in authenticate
self._authenticate_user_dn(password)
File “/var/lib/awx/venv/awx/lib64/python3.6/site-packages/django_auth_ldap/backend.py”, line 471, in _authenticate_user_dn
if self.dn is None:
File “/var/lib/awx/venv/awx/lib64/python3.6/site-packages/django_auth_ldap/backend.py”, line 436, in dn
self._load_user_dn()
File “/var/lib/awx/venv/awx/lib64/python3.6/site-packages/django_auth_ldap/backend.py”, line 509, in _load_user_dn
self._user_dn = self._search_for_user_dn()
File “/var/lib/awx/venv/awx/lib64/python3.6/site-packages/django_auth_ldap/backend.py”, line 529, in _search_for_user_dn
raise ImproperlyConfigured(‘AUTH_LDAP_USER_SEARCH must be an LDAPSearch instance.’)
django.core.exceptions.ImproperlyConfigured: AUTH_LDAP_USER_SEARCH must be an LDAPSearch instance.
2019-09-16 18:35:13,939 WARNING awx.api.generics Login failed for user ellen.ripley from 10.150.1.155
2019-09-16 18:35:13,960 WARNING django.request Unauthorized: /api/login/
2019-09-16 18:35:13,960 WARNING django.request Unauthorized: /api/login/
`
Thoughts?