WeblateOrg / docker-compose

Docker compose for Weblate
https://docs.weblate.org/en/latest/admin/deployments.html#docker
GNU General Public License v3.0
79 stars 64 forks source link

How to debug LDAP authentication? #15

Closed tholu closed 4 years ago

tholu commented 4 years ago

I have setup the necessary LDAP config in docker-compose.override.yml, however the LDAP authentication still fails with

This username/password combination was not found. Please try again.

I have switched on WEBLATE_DEBUG, but there seems to be no way to debug where it falls exactly. Do I need to enable the LDAP authentication somehow? If so, how can I do that when deploying with docker-compose?

Setting AUTHENTICATION_BACKENDS (https://docs.weblate.org/en/weblate-3.10/admin/auth.html#ldap-auth) seems not to work in the environment file (format is unclear as well).

nijel commented 4 years ago

Check docs, it has some examples: https://docs.weblate.org/en/weblate-3.10/admin/install/docker.html#ldap

This username/password combination was not found. Please try again.

This means that bind with given username and password has failed.

tholu commented 4 years ago

@nijel I actually used the examples (I use OpenLDAP) and also set WEBLATE_AUTH_LDAP_BIND_DN and WEBLATE_AUTH_LDAP_BIND_PASSWORD.

Username/password is 100% correct and is working with other implementation of LDAP auth, however I get this:

weblate_1 | uwsgi stderr | DEBUG Authentication failed for thomaslutz: user DN/password rejected by LDAP server.

I'll check my configuration again.

tholu commented 4 years ago

Using WEBLATE_AUTH_LDAP_BIND_DN and WEBLATE_AUTH_LDAP_BIND_PASSWORD should have been a hint to also use WEBLATE_AUTH_LDAP_USER_SEARCH instead of WEBLATE_AUTH_LDAP_USER_DN_TEMPLATE.

I configured WEBLATE_AUTH_LDAP_USER_SEARCH with ou=people,dc=example,dc=com and it works now.

github-actions[bot] commented 4 years ago

The issue you have reported seems to be resolved now.