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

local user login not possible after LDAP connection problem #29147

Closed
2 tasks done
go-ma123 opened this issue Apr 29, 2024 · 7 comments
Closed
2 tasks done

local user login not possible after LDAP connection problem #29147

go-ma123 opened this issue Apr 29, 2024 · 7 comments
Assignees
Labels
area/ldap kind/bug Categorizes a PR related to a bug kind/regression priority/blocker Highest Priority. Has a deadline and it blocks other tasks release/24.0.4 release/25.0.0 team/core-iam
Milestone

Comments

@go-ma123
Copy link

Before reporting an issue

  • I have read and understood the above terms for submitting issues, and I understand that my issue may be closed without action if I do not follow them.

Area

ldap

Describe the bug

Hi team,

we have configured keycloak version 24.0.3 with a ldap user federation. In addition, we have a local user with admin right for the realm as a fallback. When there are problems with the ldap connection, e.g., ldap binding credentials changes on ldap side, it is not possible to log in to the realm. Even with the local admin user.

Version

24.0.3

Regression

  • The issue is a regression

Expected behavior

Administrator account stored in the local Keycloak user database can be used in case of problems connecting to your LDAP.

Actual behavior

Administrator account stored in the local Keycloak user database can not log in case of problems connecting to your LDAP.

How to Reproduce?

  1. setup realm
  2. create admin account in local keycloak database
  3. configure a valid LDAP connection
  4. Interrupt LDAP connection (e.g. changing the binding credentials or changing the ldap url)
  5. log in with local admin account -> log in error

Anything else?

keycloak-admin-login-ldap-broken

@go-ma123 go-ma123 added kind/bug Categorizes a PR related to a bug status/triage labels Apr 29, 2024
@martin-kanis martin-kanis self-assigned this Apr 30, 2024
@martin-kanis
Copy link
Contributor

@go-ma123 Thanks for reporting of the issue. This is similar as #23913, #25129 issues that we decided to close. I agree that the usecase you describe make sense to fix, and local Keycloak admin should be allowed to be logged into the admin console in order to fix connection to the LDAP server.
Nevertheless, this issue is not a regression and was present in older Keycloak releases.

@go-ma123
Copy link
Author

@martin-kanis : thank you for response. I don't think it is similar to the mentioned issues. The keycloak documentation say that we should create a local account to react on ldap connection issues: https://www.keycloak.org/docs/latest/server_admin/index.html#dealing-with-provider-failures.
But we can't log in with this local account.

@martin-kanis
Copy link
Contributor

@go-ma123 I see. Did you create the local user after you configured the LDAP? Because based on the LDAP settings, the local user could be synchronized with the LDAP. And then when you are trying to authenticate, it is also trying to check the user in the LDAP.

@go-ma123
Copy link
Author

@martin-kanis : we create the user before we configured LDAP. To log in with a local account when ldap had connection issues worked fine with 23.0.7 and earlier. That's why it is a regression in my opinion.

@martin-kanis
Copy link
Contributor

Hmm OK, then it indeed seems to be little bit different and worse issue. Thanks for additional info.

@keycloak-github-bot keycloak-github-bot bot added kind/regression priority/blocker Highest Priority. Has a deadline and it blocks other tasks and removed status/triage action/priority-regression labels Apr 30, 2024
@keycloak-github-bot keycloak-github-bot bot added this to the 25.0.0 milestone Apr 30, 2024
@martin-kanis martin-kanis removed their assignment Apr 30, 2024
@sguilhen sguilhen self-assigned this Apr 30, 2024
@sguilhen
Copy link
Contributor

This was fixed by #29134 which was merged yesterday. The fix will be backported to Keycloak 24 branch.

@sguilhen
Copy link
Contributor

sguilhen commented May 3, 2024

Backport PR that also fixes this issue: #29219

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ldap kind/bug Categorizes a PR related to a bug kind/regression priority/blocker Highest Priority. Has a deadline and it blocks other tasks release/24.0.4 release/25.0.0 team/core-iam
Projects
None yet
Development

No branches or pull requests

3 participants