Repository navigation
Enforce client minimum ACR for logins not started at the authorization endpoint - #55461
Conversation
There was a problem hiding this comment.
🔵 Needs a closer look
Shared ACR/LoA resolution changes require end-to-end validation across reset, action-token, and SSO flows, since integration tests were not run and regression coverage is limited.
No open issues 🎉
What changed in this PR
Addresses #55382 by applying client-configured authentication levels when a login session has no recorded requirement, preventing second-factor checks from being skipped when login starts from the forgot-password page.
Changes:
- Fall back to the client’s minimum and default ACR settings when the requested authentication level is absent.
- Add a regression test confirming that returning to login from a direct password-reset link requires OTP for a client with minimum ACR 2.
| File | Description |
|---|---|
tests/base/src/test/java/org/keycloak/tests/forms/LevelOfAssuranceEssentialAcrTest.java |
Adds an OTP user, minimum-ACR client, and regression test for the password-reset entry point. |
services/src/main/java/org/keycloak/authentication/authenticators/util/AcrStore.java |
Derives the requested authentication level from client configuration when the session note is missing. |
Review effort: Balanced
1b43647 to
3d6ad14
Compare
There was a problem hiding this comment.
🔵 Needs a closer look
The shared ACR security fix requires browser/runtime validation across reset-credentials, action-token continuations, and SSO, but the added regression covers only the reset-link-to-login path.
No open issues 🎉
Review effort: Balanced
There was a problem hiding this comment.
Thanks @gaoyikeshuer! LGTM! Just a nit-pick in the test to finish the login and assert the acr is 2.
3d6ad14 to
eb42b34
Compare
eb42b34 to
2507677
Compare
There was a problem hiding this comment.
🔵 Needs a closer look
The security-sensitive ACR changes span action-token and SSO flows, but the new regression covers only reset-link-to-login behavior and runtime validation of the other continuations was unavailable.
No open issues 🎉
2 resolved since last review
Review effort: Balanced
2507677 to
9758a2a
Compare
There was a problem hiding this comment.
@gaoyikeshuer Just a little change, I prefer to only disable saml if the profile is disabled.
9758a2a to
6632313
Compare
6632313 to
4a4b52f
Compare
There was a problem hiding this comment.
🟡 Changes recommended
A critical SAML step-up gap allows IdP-initiated login below the client’s minimum authentication level when the second-factor subflow is skipped, requiring enforcement of the client-config fallback and a regression test.
1 open issue
1 resolved since last review
Review effort: Balanced
Unreported flaky test detectedIf the flaky tests below are affected by the changes, please review and update the changes accordingly. Otherwise, a maintainer should report the flaky tests prior to merging the PR. org.keycloak.testsuite.adapter.servlet.SAMLServletAdapterTest#testPostSimpleLoginLogoutIdpInitiatedRedirectToKeycloak CI - FIPS IT (non-strict) org.keycloak.testsuite.adapter.servlet.SAMLServletAdapterTest#disabledClientTestKeycloak CI - FIPS IT (non-strict) org.keycloak.testsuite.adapter.servlet.SAMLServletAdapterTest#idpInitiatedLoginTestKeycloak CI - FIPS IT (non-strict) |
… page. Closes keycloak#55382 Signed-off-by: Yike Gao <yikegao8@gmail.com>
4a4b52f to
d09604e
Compare
There was a problem hiding this comment.
🔵 Needs a closer look
The shared authentication-assurance change needs human security review and runtime validation of action-token continuations and SSO reuse beyond the added reset-credentials-to-login regression test.
1 open issue
Review effort: Balanced
|
Hi @rmartinc I removed the SAML changes. the fallback now skips SAML clients completely, so SAML behaves as before. Could you re-review it? Thanks |


after fix:
Screen.Recording.2026-11-23.at.14.30.59.mov
The client's minimum ACR was only checked when login started from the normal login page, so starting from the forgot password link skipped the second factor. now it is read from the client settings whenever it was not recorded.
Closes #55382