Symptoms
Users are unable to authenticate.
In the awingu-api.service.log , a similar error is logged:
2024-06-03 08:32:23.319117+00:00 secureworkspace awingu-api.service[/opt/awingu/awingu-core/virtualenv/bin/gunicorn:1291]: Failed to perform query objectCategory=user for domain SECWORKSPACE using configured bind username and password
Traceback (most recent call last):
File "/opt/awingu/awingu-core/virtualenv/lib/python3.11/site-packages/awingucore/domain/ldap_info.py", line 95, in query_ldap
_, data, _, response_ctrls = ldap_server._ldap_obj.result3(msgid)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/awingu/awingu-core/virtualenv/lib/python3.11/site-packages/python_ldap-3.4.3+awingu.2-py3.11-linux-x86_64.egg/ldap/ldapobject.py", line 543, in result3
resp_type, resp_data, resp_msgid, decoded_resp_ctrls, retoid, retval = self.result4(
^^^^^^^^^^^^^
File "/opt/awingu/awingu-core/virtualenv/lib/python3.11/site-packages/python_ldap-3.4.3+awingu.2-py3.11-linux-x86_64.egg/ldap/ldapobject.py", line 553, in result4
ldap_result = self._ldap_call(self._l.result4,msgid,all,timeout,add_ctrls,add_intermediates,add_extop)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/awingu/awingu-core/virtualenv/lib/python3.11/site-packages/python_ldap-3.4.3+awingu.2-py3.11-linux-x86_64.egg/ldap/ldapobject.py", line 128, in _ldap_call
result = func(*args,**kwargs)
^^^^^^^^^^^^^^^^^^^^
ldap.REFERRAL: {'msgtype': 101, 'msgid': 2, 'result': 10, 'desc': 'Referral', 'ctrls': [('2.16.840.1.113730.3.4.10', 0, b'0\x84\x00\x00\x00\t\x02\x01\x00\x02\x01\x00\n\x01\x00')], 'info': 'Referral:\nldap://somedomain.dom/dc=somedomain,dc=org'}
2024-06-03 08:32:23.328795+00:00 secureworkspace awingu-api.service[/opt/awingu/awingu-core/virtualenv/bin/gunicorn:1291]: Internal Server Error: /api/v2/domains/2/query-ldap-users/
Traceback (most recent call last):
File "/opt/awingu/awingu-core/virtualenv/lib/python3.11/site-packages/awingucore/domain/ldap_info.py", line 95, in query_ldap
_, data, _, response_ctrls = ldap_server._ldap_obj.result3(msgid)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/awingu/awingu-core/virtualenv/lib/python3.11/site-packages/python_ldap-3.4.3+awingu.2-py3.11-linux-x86_64.egg/ldap/ldapobject.py", line 543, in result3
resp_type, resp_data, resp_msgid, decoded_resp_ctrls, retoid, retval = self.result4(
^^^^^^^^^^^^^
File "/opt/awingu/awingu-core/virtualenv/lib/python3.11/site-packages/python_ldap-3.4.3+awingu.2-py3.11-linux-x86_64.egg/ldap/ldapobject.py", line 553, in result4
ldap_result = self._ldap_call(self._l.result4,msgid,all,timeout,add_ctrls,add_intermediates,add_extop)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/awingu/awingu-core/virtualenv/lib/python3.11/site-packages/python_ldap-3.4.3+awingu.2-py3.11-linux-x86_64.egg/ldap/ldapobject.py", line 128, in _ldap_call
result = func(*args,**kwargs)
^^^^^^^^^^^^^^^^^^^^
ldap.REFERRAL: {'msgtype': 101, 'msgid': 2, 'result': 10, 'desc': 'Referral', 'ctrls': [('2.16.840.1.113730.3.4.10', 0, b'0\x84\x00\x00\x00\t\x02\x01\x00\x02\x01\x00\n\x01\x00')], 'info': 'Referral:\nldap://somedomain.dom/dc=somedomain,dc=org'}
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/awingu/awingu-core/virtualenv/lib/python3.11/site-packages/django/core/handlers/exception.py", line 47, in inner
response = get_response(request)
^^^^^^^^^^^^^^^^^^^^^
File "/opt/awingu/awingu-core/virtualenv/lib/python3.11/site-packages/django/core/handlers/base.py", line 181, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/awingu/awingu-core/virtualenv/lib/python3.11/site-packages/django/views/decorators/csrf.py", line 54, in wrapped_view
return view_func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/awingu/awingu-core/virtualenv/lib/python3.11/site-packages/rest_framework/viewsets.py", line 125, in view
return self.dispatch(request, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/awingu/awingu-core/virtualenv/lib/python3.11/site-packages/rest_framework/views.py", line 509, in dispatch
response = self.handle_exception(exc)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/awingu/awingu-core/virtualenv/lib/python3.11/site-packages/rest_framework/views.py", line 469, in handle_exception
self.raise_uncaught_exception(exc)
File "/opt/awingu/awingu-core/virtualenv/lib/python3.11/site-packages/rest_framework/views.py", line 480, in raise_uncaught_exception
raise exc
File "/opt/awingu/awingu-core/virtualenv/lib/python3.11/site-packages/rest_framework/views.py", line 506, in dispatch
response = handler(request, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/awingu/awingu-core/virtualenv/lib/python3.11/site-packages/awingucore/domain/views.py", line 258, in query_ldap_users
return self._query_ldap_resource(request, 'users')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/awingu/awingu-core/virtualenv/lib/python3.11/site-packages/awingucore/domain/views.py", line 122, in _query_ldap_resource
results, count = get_ldap_info(obj, resource_type, {
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/awingu/awingu-core/virtualenv/lib/python3.11/site-packages/awingucore/domain/ldap_info.py", line 150, in get_ldap_info
raw_results, count = query_ldap(domain, query, page_info, object_type)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/awingu/awingu-core/virtualenv/lib/python3.11/site-packages/awingucore/domain/ldap_info.py", line 97, in query_ldap
fail('perform query {}'.format(query))
File "/opt/awingu/awingu-core/virtualenv/lib/python3.11/site-packages/awingucore/domain/ldap_info.py", line 49, in fail
raise LdapQueryError(message)
domain.ldap_info.LdapQueryError: Failed to perform query objectCategory=user for domain SECWORKSPACE using configured bind username and password
Cause
The base DN is not correct.
Resolution
Configure a valid base DN in System Settings > Global > Domains > the affected domain.
Was this article helpful?
Tell us how we can improve it.