Unable to log in with 2FA
Summary
LDAP user tries to log in with 2FA.
Relevant logs and/or screenshots
production.log
:
Started POST "/users/sign_in" for 78.34.55.172 at 2017-10-06 12:33:54 +0000
Processing by SessionsController#create as HTML
Parameters: {"utf8"=>"✓", "authenticity_token"=>"[FILTERED]", "user"=>{"remember_me"=>"0", "otp_attempt"
=>"[FILTERED]"}}
Completed 500 Internal Server Error in 26ms (ActiveRecord: 0.3ms | Elasticsearch: 0.0ms)
Sending event e3df20744e66429d80e2ff9dca431d5f to Sentry
Started POST "/api/v4/jobs/request" for 52.30.107.173 at 2017-10-06 12:33:54 +0000
Started POST "/api/v4/jobs/request" for 52.30.107.173 at 2017-10-06 12:33:55 +0000
ActionView::Template::Error (undefined method `each_with_index' for nil:NilClass):
5: - if kerberos_enabled?
6: %li{ class: (:active unless crowd_enabled? || ldap_enabled?) }
7: = link_to "Kerberos", "#kerberos", 'data-toggle' => 'tab'
8: - @ldap_servers.each_with_index do |server, i|
9: %li{ class: active_when(i.zero? && !crowd_enabled?) }
10: = link_to server['label'], "##{server['provider_name']}", 'data-toggle' => 'tab'
11: - if password_authentication_enabled?
app/views/devise/shared/_tabs_ldap.html.haml:8:in `_app_views_devise_shared__tabs_ldap_html_haml__369058
7594654192930_69991976666500'
app/views/devise/sessions/new.html.haml:5:in `_app_views_devise_sessions_new_html_haml__3445175636319135
277_69991975340920'
app/controllers/concerns/authenticates_with_two_factor.rb:35:in `locked_user_redirect'
app/controllers/concerns/authenticates_with_two_factor.rb:40:in `authenticate_with_two_factor'
lib/gitlab/middleware/multipart.rb:93:in `call'
lib/gitlab/request_profiler/middleware.rb:14:in `call'
lib/gitlab/jira/middleware.rb:15:in `call'
lib/gitlab/middleware/go.rb:17:in `call'
lib/gitlab/etag_caching/middleware.rb:11:in `call'
lib/gitlab/middleware/readonly_geo.rb:30:in `call'
lib/gitlab/request_context.rb:18:in `call'
lib/gitlab/metrics/requests_rack_middleware.rb:27:in `call'
User sees message:
Could not authenticate you from Ldapmain because "Undefined method 'each with index' for nil:nilclass".
Results of GitLab environment info
Expand for output related to GitLab environment info
System information System: Debian 8.9 Proxy: no Current User: git Using RVM: no Ruby Version: 2.3.5p376 Gem Version: 2.6.13 Bundler Version:1.13.7 Rake Version: 12.0.0 Redis Version: 3.2.5 Git Version: 2.13.5 Sidekiq Version:5.0.4 Go Version: unknownGitLab information Version: 10.0.2-ee Revision: f5b3271 Directory: /opt/gitlab/embedded/service/gitlab-rails DB Adapter: postgresql DB Version: 9.6.3 Elasticsearch: yes Geo: no Using LDAP: yes Using Omniauth: no
GitLab Shell Version: 5.9.0 Repository storage paths:
- default: /var/opt/gitlab/git-data/repositories Hooks: /opt/gitlab/embedded/service/gitlab-shell/hooks Git: /opt/gitlab/embedded/bin/git