Skip to content

Improve LDAP error messages

Summary

Debugging LDAP problems is currently very difficult because error messages are not specific enough.

Steps to reproduce

An example can be appreciated by configuring LDAP through gitlab.rb with a wrong password and compare this with the error given by configuring it correctly but having the AD user blocked.

Other examples can be seen when using invalid email addresses or invalid characters within a username.

Expected behavior

I would expect to have enough information to know where my problem is located after checking with sudo gitlab-rake gitlab:ldap:check

Relevant logs and/or screenshots

(Paste any relevant logs - please use code blocks (```) to format console output, logs, and code as it's very hard to read otherwise.)

Output of checks

After reconfigruing LDAP with a wrong password.:

$ sudo gitlab-rake gitlab:ldap:check
Checking LDAP ...

LDAP users with access to your GitLab server (only showing the first 100 results)
Server: ldapmain

Checking LDAP ... Finished

Related Issues

Better error messages for failed LDAP logons: https://gitlab.com/gitlab-org/gitlab-ce/issues/3845
More verbose logging for omniauth-ldap: https://gitlab.com/gitlab-org/gitlab-ce/issues/1049


Any thoughts @dblessing @JobV