Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LDAP Authentication fails #3837

Open
thangtq710 opened this issue Jul 24, 2020 · 2 comments
Open

LDAP Authentication fails #3837

thangtq710 opened this issue Jul 24, 2020 · 2 comments

Comments

@thangtq710
Copy link

I am trying to setup ldap auth but get the following error when login:

alt.

File .env:

PLUGINS=all
DEFAULT_URL=http://localhost:3000
AUTH_GITHUB=0
RAILS_MIN_THREADS=2
RAILS_MAX_THREADS=10
CACHE_STORE=memory

#The following settings is required if auth with LDAP is enabled.
LDAP_TITLE=“example"
LDAP_HOST=192.168.1.1
LDAP_PORT=389
LDAP_BASE=‘dc=example,dc=com'
LDAP_UID=uid
LDAP_BINDDN='cn=binduser,dc=example,dc=com'
LDAP_PASSWORD=pass

Log container:

Started GET "/login?redirect_to=%2F" for 10.10.1.1 at 2020-07-24 03:56:22 +0000
Processing by SessionsController#new as HTML
  Parameters: {"redirect_to"=>"/"}
  Rendering sessions/new.html.erb within layouts/application
  Rendered sessions/new.html.erb within layouts/application (Duration: 564.5ms | Allocations: 523860)
  Rendered plugins/env/app/views/samson_env/_manage_menu.html.erb (Duration: 0.4ms | Allocations: 175)
  Rendered plugins/kubernetes/app/views/samson_kubernetes/_manage_menu.html.erb (Duration: 0.6ms | Allocations: 365)
  Rendered layouts/_header.html.erb (Duration: 41.3ms | Allocations: 27149)
  Rendered layouts/_alerts.html.erb (Duration: 0.5ms | Allocations: 186)
  Rendered layouts/_footer.html.erb (Duration: 0.6ms | Allocations: 277)
Completed 200 OK in 848ms (Views: 845.1ms | ActiveRecord: 0.6ms | Allocations: 748314)


Started GET "/cable" for 10.10.1.1 at 2020-07-24 03:56:29 +0000
Started GET "/cable/" [WebSocket] for 10.10.1.1 at 2020-07-24 03:56:29 +0000
Successfully upgraded to WebSocket (REQUEST_METHOD: GET, HTTP_CONNECTION: Upgrade, HTTP_UPGRADE: websocket)
An unauthorized connection attempt was rejected
Finished "/cable/" [WebSocket] for 10.10.1.1 at 2020-07-24 03:56:29 +0000
Started POST "/auth/ldap?origin=%2F" for 10.10.1.1 at 2020-07-24 03:56:29 +0000
(ldap) Request phase initiated.
Started POST "/auth/ldap/callback" for 10.10.1.1 at 2020-07-24 03:56:36 +0000
(ldap) Callback phase initiated.
Deprecation warning: please give :encryption option as a Hash to Net::LDAP.new
(ldap) Authentication failure! invalid_credentials encountered.
(ldap) Authentication failure! ldap_error: OmniAuth::Error, invalid_credentials
  
OmniAuth::Error (invalid_credentials):
  
omniauth (1.9.0) lib/omniauth/failure_endpoint.rb:25:in `raise_out!'
omniauth (1.9.0) lib/omniauth/failure_endpoint.rb:20:in `call'
omniauth (1.9.0) lib/omniauth/failure_endpoint.rb:12:in `call'
omniauth (1.9.0) lib/omniauth/strategy.rb:491:in `fail!'
omniauth-ldap (1.0.5) lib/omniauth/strategies/ldap.rb:43:in `callback_phase'
omniauth (1.9.0) lib/omniauth/strategy.rb:238:in `callback_call'
omniauth (1.9.0) lib/omniauth/strategy.rb:189:in `call!'
omniauth (1.9.0) lib/omniauth/strategy.rb:169:in `call'
omniauth (1.9.0) lib/omniauth/builder.rb:64:in `call'

Thanks !

@grosser
Copy link
Contributor

grosser commented Jul 24, 2020

make sure to set AUTH_LDAP=true ... or does the UI already show up ?

@grosser
Copy link
Contributor

grosser commented Jul 24, 2020

... if it still does not work maybe there is more help in https://github.com/omniauth/omniauth-ldap
can also try bundle update omniauth-ldap

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants