Impossible to connect using LDAP: omniauth: (ldapmain) Authentication failure! ldap_error: NoMethodError, undefined method `provider' for nil:NilClass
Some OpenLDAP user's can't connect for no valid reason
We are experience issues with users not being able to login.
We can't tell from which GitLab version this bug appeared, old users can still connect using their Ldap account.
Also, we use 3 different Gitlab instance, all the same configuration but there is only one having problem with it's users.
Steps to reproduce
Go into login and try to authenticate as a newly created ldap user.
What is the current bug behavior?
It refuse to login with the following error message:
What is the expected correct behavior?
It should login.
Relevant logs and/or screenshots
Log serverside:
==> /var/log/gitlab/unicorn/unicorn_stdout.log <==
E, [2019-01-23T09:54:26.232000 #1214] ERROR -- omniauth: (ldapmain) Authentication failure! ldap_error: NoMethodError, undefined method `provider' for nil:NilClass
Output of checks
Results of GitLab environment info
Expand for output related to GitLab environment info
root@git:/# gitlab-rake gitlab:env:info
System information System: Current User: git Using RVM: no Ruby Version: 2.5.3p105 Gem Version: 2.7.6 Bundler Version:1.16.6 Rake Version: 12.3.1 Redis Version: 3.2.12 Git Version: 2.18.1 Sidekiq Version:5.2.3 Go Version: unknown
GitLab information Version: 11.6.5 Revision: 237bddc Directory: /opt/gitlab/embedded/service/gitlab-rails DB Adapter: postgresql URL: https://git.intranet.com HTTP Clone URL: https://git.intranet.com/some-group/some-project.git SSH Clone URL: ssh://git@git.intranet.com:20022/some-group/some-project.git Using LDAP: yes Using Omniauth: yes Omniauth Providers:
GitLab Shell Version: 8.4.3 Repository storage paths:
- default: /var/opt/gitlab/git-data/repositories Hooks: /opt/gitlab/embedded/service/gitlab-shell/hooks 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 >= 8.4.3 ? ... OK (8.4.3) 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: ... Checking Reply by email ...
IMAP server credentials are correct? ... yes Init.d configured correctly? ... skipped MailRoom running? ... skipped
Checking Reply by email ... Finished
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) DN: uid=alex,ou=users,o=workplace,dc=intranet,dc=com uid: alex DN: uid=tom,ou=users,o=workplace,dc=intranet,dc=com uid: tom DN: uid=john,ou=users,o=workplace,dc=intranet,dc=com uid: john DN: uid=stef,ou=users,o=workplace,dc=intranet,dc=com uid: stef DN: uid=simon,ou=users,o=workplace,dc=intranet,dc=com uid: simon DN: uid=clovis,ou=users,o=workplace,dc=intranet,dc=com uid: clovis
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: ... 3/1 ... yes 3/2 ... yes 3/4 ... yes 3/7 ... yes 3/8 ... yes 3/10 ... yes 3/23 ... yes 3/24 ... yes 3/25 ... yes 11/33 ... yes 12/34 ... yes 3/35 ... yes 3/47 ... yes 3/48 ... yes 3/54 ... yes 3/60 ... yes 3/63 ... yes 2/64 ... yes 3/65 ... yes 3/66 ... yes 3/67 ... yes 3/69 ... yes 18/71 ... yes 18/72 ... yes 3/73 ... yes 2/74 ... yes 3/75 ... yes 19/76 ... yes 21/78 ... yes 3/82 ... yes 24/83 ... yes 18/84 ... yes 16/85 ... yes 18/86 ... yes 25/87 ... yes 18/88 ... yes 3/89 ... yes 25/90 ... yes 25/91 ... yes 25/100 ... yes 25/101 ... yes 18/102 ... yes 17/105 ... yes 17/107 ... yes 17/108 ... yes 3/110 ... yes 27/111 ... yes 3/112 ... yes 25/114 ... yes 27/115 ... yes 27/116 ... yes 3/117 ... yes 29/118 ... yes 25/119 ... yes 25/120 ... yes 26/121 ... yes 27/122 ... yes 30/123 ... yes 3/124 ... yes 2/125 ... yes Redis version >= 2.8.0? ... yes Ruby version >= 2.3.5 ? ... yes (2.5.3) Git version >= 2.18.0 ? ... yes (2.18.1) Git user has default SSH configuration? ... yes Active users: ... 8
Checking GitLab App ... Finished
Checking GitLab subtasks ... Finished