LDAP Authentication error after upgrade : Access denied for your LDAP account
Summary
90% of users were not able to login using LDAP to gitlab after upgrade to 12.0. The displayed error message is : Access denied for your LDAP account.
Surprisingly, This doesn't affect all users.
This appears after upgraded Gitlab from gitlab-ce-11.11.0-ce.0-amd64 to gitlab-ce-12.0.3-ce.0-amd64
Steps to reproduce
- Upgrade from gitlab-ce-11.11.0-ce.0-amd64 to gitlab-ce-12.0.3-ce.0-amd64 using apt-get upgrade
- gitlab-ctl restart
- Try logging into Gitlab
What is the current bug behavior?
When user try to logging into Gitlab, this message is displayed : Access denied for your LDAP account
What is the expected correct behavior?
User should logging into Gitlab correctly
More information
I've tested to delete an LDAP user from Gitlab => ok After that, this user was able to logging in (but concidered as a new user)
Relevant logs and/or screenshots
Output of the command gitlab-rake gitlab:ldap:check[1000]
Checking LDAP ... LDAP: ... Server: ldapmain LDAP authentication... Success LDAP users with access to your GitLab server (only showing the first 100 results) DN: cn=*******,cn=*****,dc=*****,dc=***** sAMAccountName: ***** DN: cn=*******,ou=*****,dc=*****s,dc=***** sAMAccountName: ***** DN: cn=*******,ou=*****,ou=*****,dc=*****,dc=***** sAMAccountName: ****
(All users are displayed)
When trying to "activated" again a user using gitlab-rails console :
user = User.find_by(email: '*******@***********') => # irb(main):005:0> user.state = "active" => "active" irb(main):006:0> user.save => false
Output of application.log :
July 04, 2019 13:26: Failed Login: username=********@******** ip=10.39.14.24 July 04, 2019 13:26: Failed Login: username=*********** ip=10.39.14.24
Results of GitLab environment info
Expand for output related to GitLab environment info
System information System: Debian 9.9 Current User: git Using RVM: no Ruby Version: 2.6.3p62 Gem Version: 2.7.9 Bundler Version:1.17.3 Rake Version: 12.3.2 Redis Version: 3.2.12 Git Version: 2.21.0 Sidekiq Version:5.2.7 Go Version: unknown
GitLab information Version: 12.0.3 Revision: 08a51a9db93 Directory: /opt/gitlab/embedded/service/gitlab-rails DB Adapter: PostgreSQL DB Version: 10.7 URL: http://git.myserver.local HTTP Clone URL: http://git.myserver.local/some-group/some-project.git SSH Clone URL: git@git.myserver.local:some-group/some-project.git Using LDAP: yes Using Omniauth: yes Omniauth Providers:
GitLab Shell Version: 9.3.0 Repository storage paths:
- default: /var/opt/gitlab/git-data/repositories GitLab Shell path: /opt/gitlab/embedded/service/gitlab-shell Git: /opt/gitlab/embedded/bin/git
Results of GitLab application Check
Expand for output related to the GitLab application check
Checking GitLab subtasks ...
Checking GitLab Shell ...
GitLab Shell: ... GitLab Shell version >= 9.3.0 ? ... OK (9.3.0) Running /opt/gitlab/embedded/service/gitlab-shell/bin/check Check GitLab API access: OK Redis available via internal API: OK
Access to /var/opt/gitlab/.ssh/authorized_keys: OK gitlab-shell self-check successful
Checking GitLab Shell ... Finished
Checking Gitaly ...
Gitaly: ... default ... OK
Checking Gitaly ... Finished
Checking Sidekiq ...
Sidekiq: ... Running? ... yes Number of Sidekiq processes ... 1
Checking Sidekiq ... Finished
Checking Incoming Email ...
Incoming Email: ... Reply by email is disabled in config/gitlab.yml
Checking Incoming Email ... Finished
Checking LDAP ...
LDAP: ... Server: ldapmain LDAP authentication... Success LDAP users with access to your GitLab server (only showing the first 100 results) [...trunked content...]
Checking LDAP ... Finished
Checking GitLab App ...
Git configured correctly? ... yes Database config exists? ... yes All migrations up? ... yes Database contains orphaned GroupMembers? ... no GitLab config exists? ... yes GitLab config up to date? ... yes Log directory writable? ... yes Tmp directory writable? ... yes Uploads directory exists? ... yes Uploads directory has correct permissions? ... yes Uploads directory tmp has correct permissions? ... yes Init script exists? ... skipped (omnibus-gitlab has no init script) Init script up-to-date? ... skipped (omnibus-gitlab has no init script) Projects have namespace: ... 6/15 ... yes 6/81 ... yes 6/90 ... yes 6/92 ... yes 6/97 ... yes .....yes Redis version >= 2.8.0? ... yes Ruby version >= 2.5.3 ? ... yes (2.6.3) Git version >= 2.21.0 ? ... yes (2.21.0) Git user has default SSH configuration? ... yes Active users: ... 47
Checking GitLab App ... Finished
Checking GitLab subtasks ... Finished