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

Wrong LDAP port input (non-numeric) can cause complete lockout #13313

Closed
erwiensamantha opened this issue Sep 25, 2020 · 3 comments
Closed

Wrong LDAP port input (non-numeric) can cause complete lockout #13313

erwiensamantha opened this issue Sep 25, 2020 · 3 comments
Labels
Administration/Auth Google Auth, LDAP, pw+email login Priority:P2 Average run of the mill bug .Reproduced Issues reproduced in test (usually Cypress) Type:Bug Product defects
Milestone

Comments

@erwiensamantha
Copy link

Hi All,

I have a problem login to Metabase after trying to get LDAP working.

I notice that I put LDAP port in the UI with extra space "636 "

So when I try to login I got this error with any users:

image

And this what in the logs:

2020-09-25T14:56:24.426264+02:00 am2vm2397.test.igdcs.com java: 09-25 14:56:24 DEBUG middleware.log :: GET /api/session/properties 200 2.7 ms (0 DB calls) App DB connections: 0/4 Jetty threads: 5/50 (4 idle, 0 queued) (50 total active threads) Queries in flight: 0 (0 queued)
2020-09-25T14:56:28.525302+02:00 am2vm2397.test.igdcs.com java: 09-25 14:56:28 ERROR middleware.log :: POST /api/session 500 9.2 ms (0 DB calls)
2020-09-25T14:56:28.525583+02:00 am2vm2397.test.igdcs.com java: {:via [{:type java.lang.NumberFormatException, :message "For input string: "636 "", :at [java.lang.NumberFormatException forInputString "NumberFormatException.java" 65]}],
2020-09-25T14:56:28.525838+02:00 am2vm2397.test.igdcs.com java: :trace
2020-09-25T14:56:28.526055+02:00 am2vm2397.test.igdcs.com java: [[java.lang.NumberFormatException forInputString "NumberFormatException.java" 65]
2020-09-25T14:56:28.526274+02:00 am2vm2397.test.igdcs.com java: [java.lang.Integer parseInt "Integer.java" 652]
2020-09-25T14:56:28.526481+02:00 am2vm2397.test.igdcs.com java: [java.lang.Integer parseInt "Integer.java" 770]
2020-09-25T14:56:28.526689+02:00 am2vm2397.test.igdcs.com java: [metabase.integrations.ldap$details__GT_ldap_options invokeStatic "ldap.clj" 102]
2020-09-25T14:56:28.526955+02:00 am2vm2397.test.igdcs.com java: [metabase.integrations.ldap$details__GT_ldap_options invoke "ldap.clj" 97]
2020-09-25T14:56:28.527189+02:00 am2vm2397.test.igdcs.com java: [metabase.integrations.ldap$settings__GT_ldap_options invokeStatic "ldap.clj" 110]
2020-09-25T14:56:28.527399+02:00 am2vm2397.test.igdcs.com java: [metabase.integrations.ldap$settings__GT_ldap_options invoke "ldap.clj" 109]
2020-09-25T14:56:28.527620+02:00 am2vm2397.test.igdcs.com java: [metabase.integrations.ldap$get_connection invokeStatic "ldap.clj" 119]
2020-09-25T14:56:28.527841+02:00 am2vm2397.test.igdcs.com java: [metabase.integrations.ldap$get_connection invoke "ldap.clj" 116]
2020-09-25T14:56:28.528058+02:00 am2vm2397.test.igdcs.com java: [metabase.integrations.ldap$with_connection invokeStatic "ldap.clj" 124]
2020-09-25T14:56:28.528271+02:00 am2vm2397.test.igdcs.com java: [metabase.integrations.ldap$with_connection doInvoke "ldap.clj" 121]
2020-09-25T14:56:28.528490+02:00 am2vm2397.test.igdcs.com java: [clojure.lang.RestFn invoke "RestFn.java" 423]

I try to restart Metabase with option "MB_LDAP_ENABLED=false" , but it does not help.

FYI, my Metabase is connected to Postgre database, maybe if I delete the value there it would solve my problem. bu I dont where those value safe in the DB.

Anyone can help me?

best regards,
Erwien Samantha

@erwiensamantha erwiensamantha added .Needs Triage Type:Question Please use the forum: https://discourse.metabase.com/ labels Sep 25, 2020
@flamber flamber added Priority:P2 Average run of the mill bug Type:Bug Product defects Administration/Auth Google Auth, LDAP, pw+email login and removed .Needs Triage Type:Question Please use the forum: https://discourse.metabase.com/ labels Sep 25, 2020
@flamber flamber changed the title Wrong setting on LDAP_PORT trigger login issue Wrong LDAP port can cause complete lockout Sep 25, 2020
@flamber
Copy link
Contributor

flamber commented Sep 25, 2020

Only giving P2, but this is essentially a complete lockout - even regular user/pass logins.
Related to #9836 and #12972 and #11446

@erwiensamantha Edit the application database table setting - find key=ldap-port and edit it's value.
In the future, either use the forum or provide all the information asked when filing an issue.

@flamber flamber changed the title Wrong LDAP port can cause complete lockout Wrong LDAP port input (non-numeric) can cause complete lockout Sep 25, 2020
@erwiensamantha
Copy link
Author

@flamber

Ok, got it.

I update the ldap-port value and it's working again now. Thanks!

@noahmoss
Copy link
Member

Closing this out since I've just merged #16187, so LDAP settings should now be validated properly on form save.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Administration/Auth Google Auth, LDAP, pw+email login Priority:P2 Average run of the mill bug .Reproduced Issues reproduced in test (usually Cypress) Type:Bug Product defects
Projects
None yet
Development

No branches or pull requests

5 participants