ldap auth fails if user changes distinguishedName
Issue
In our organization, if a user changes office, their distinguishedName
is updated to represent this eg: CN=<full name>,OU=<office>,DC=<domain>...
.
This presents a problem because after that change, even though they have the same username and password, the user is unable to log in to Gitlab (since it contains the stale dn
).
Upon updating the ldap_uid
manually in the database to the new distinguishedName
, the user is again able to log in.
config.yml
Relevant ## LDAP settings
ldap:
enabled: true
servers:
main:
active_directory: true
uid: 'sAMAccountName'
allow_username_or_email_login: false
...
Versions
GitLab 7.9.4
GitLab Shell 2.6.0
GitLab API 3
Ruby 2.1.0p0
Rails 4.1.9