I think I just spotted the problem: You say your LDAP search base is:
LDAP_SEARCH_BASE = 'OU=people,mylab123,DC=com'
This is missing a DC=
part before mylab123
. Try replacing the line with:
LDAP_SEARCH_BASE = 'OU=people,DC=mylab123,DC=com'
I suppose it should work after that.
Note that nevertheless you should probably update the plugin to fix another bug, for more details, see the section below (I wrote that one before I noticed the small typo in the code).
Detailed analysis
Thanks for providing the logs. The HTTP response code and response JSON are no longer relevant, the back-end logs are sufficient.
Two exceptions seem to occur in your log, which Iāve listed below for future reference:
Error messages from the log
Sep 25 11:18:10 taiga2 gunicorn[4802]: ERROR:2022-09-25 11:18:06,876: Internal Server Error: /api/v1/auth
Sep 25 11:18:10 taiga2 gunicorn[4802]: Traceback (most recent call last):
Sep 25 11:18:10 taiga2 gunicorn[4802]: File "/home/taiga/taiga-back/.venv/lib/python3.8/site-packages/taiga_contrib_ldap_auth_ext/services.py", line 58, in ldap_login_func
Sep 25 11:18:10 taiga2 gunicorn[4802]: username, email, full_name = connector.login(
Sep 25 11:18:10 taiga2 gunicorn[4802]: File "/home/taiga/taiga-back/.venv/lib/python3.8/site-packages/taiga_contrib_ldap_auth_ext/connector.py", line 125, in login
Sep 25 11:18:10 taiga2 gunicorn[4802]: raise LDAPUserLoginError({"error_message": "LDAP login not found"})
Sep 25 11:18:10 taiga2 gunicorn[4802]: taiga_contrib_ldap_auth_ext.connector.LDAPUserLoginError: {'error_message': 'LDAP login not found'}
And:
Sep 25 11:18:10 taiga2 gunicorn[4802]: During handling of the above exception, another exception occurred:
Sep 25 11:18:10 taiga2 gunicorn[4802]: Traceback (most recent call last):
Sep 25 11:18:10 taiga2 gunicorn[4802]: File "/home/taiga/taiga-back/.venv/lib/python3.8/site-packages/django/core/handlers/exception.py", line 34, in inner
Sep 25 11:18:10 taiga2 gunicorn[4802]: response = get_response(request)
Sep 25 11:18:10 taiga2 gunicorn[4802]: File "/home/taiga/taiga-back/.venv/lib/python3.8/site-packages/django/core/handlers/base.py", line 115, in _get_response
Sep 25 11:18:10 taiga2 gunicorn[4802]: response = self.process_exception_by_middleware(e, request)
Sep 25 11:18:10 taiga2 gunicorn[4802]: File "/home/taiga/taiga-back/.venv/lib/python3.8/site-packages/django/core/handlers/base.py", line 113, in _get_response
Sep 25 11:18:10 taiga2 gunicorn[4802]: response = wrapped_callback(request, *callback_args, **callback_kwargs)
Sep 25 11:18:10 taiga2 gunicorn[4802]: File "/home/taiga/taiga-back/taiga/base/api/viewsets.py", line 95, in view
Sep 25 11:18:10 taiga2 gunicorn[4802]: return self.dispatch(request, *args, **kwargs)
Sep 25 11:18:10 taiga2 gunicorn[4802]: File "/home/taiga/taiga-back/.venv/lib/python3.8/site-packages/django/views/decorators/csrf.py", line 54, in wrapped_view
Sep 25 11:18:10 taiga2 gunicorn[4802]: return view_func(*args, **kwargs)
Sep 25 11:18:10 taiga2 gunicorn[4802]: File "/home/taiga/taiga-back/taiga/base/api/views.py", line 449, in dispatch
Sep 25 11:18:10 taiga2 gunicorn[4802]: response = self.handle_exception(exc)
Sep 25 11:18:10 taiga2 gunicorn[4802]: File "/home/taiga/taiga-back/taiga/base/api/views.py", line 447, in dispatch
Sep 25 11:18:10 taiga2 gunicorn[4802]: response = handler(request, *args, **kwargs)
Sep 25 11:18:10 taiga2 gunicorn[4802]: File "/home/taiga/taiga-back/taiga/auth/api.py", line 77, in create
Sep 25 11:18:10 taiga2 gunicorn[4802]: data = auth_plugins[login_type]['login_func'](request)
Sep 25 11:18:10 taiga2 gunicorn[4802]: File "/home/taiga/taiga-back/.venv/lib/python3.8/site-packages/taiga_contrib_ldap_auth_ext/services.py", line 67, in ldap_login_func
Sep 25 11:18:10 taiga2 gunicorn[4802]: return get_auth_plugins()[FALLBACK]["login_func"](request)
Sep 25 11:18:10 taiga2 gunicorn[4802]: KeyError: 'normal'
The second problem seems to have been fixed just now in the Monogramm plugin, Iāve also incorporated the changes into my fork. Try updating the plugin. The following command should work:
pip install --upgrade git+https://github.com/TuringTux/taiga-contrib-ldap-auth-ext-2.git
I am not exactly certain if upgrading a plugin from Git works that way, so keep an eye on pipās output: If it tells you something like āAlready up to dateā (or similar), updating probably didnāt work. In this case, you might need to pip uninstall
the plugin first and then reinstall it.
I think, however, that this wonāt solve your problems entirely. The LDAP error message is āLDAP login not foundā. This is thrown if the LDAP search for the user didnāt yield any resultsā¦
ā¦and that is probably the case because of the typo in LDAP_SEARCH_BASE
, which I just noticed and mentioned above.
Hope that could help