Repository navigation
Saml ForceAuthn requirement fix. - #54369
Merged
Merged
Conversation
lhanusov
force-pushed
the
fix/54339-saml-forceauthn-restart
branch
from
October 27, 2026 11:55
32df638 to
f230908
Compare
Signed-off-by: Lukas Hanusovsky <lhanusov@redhat.com>
lhanusov
force-pushed
the
fix/54339-saml-forceauthn-restart
branch
from
October 27, 2026 11:56
f230908 to
5dd3901
Compare
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
Static review found no blocking issues in the consistent note-lifecycle change or regression coverage; integration tests were not executed.
No open issues 🎉
What changed in this PR
Fixes #54339 by preserving SAML ForceAuthn across authentication flow restarts, preventing an existing SSO session from bypassing required reauthentication.
Changes:
- Stores and reads the reauthentication requirement as a restart-persistent client note.
- Adds POST and Redirect regression tests covering repeated restarts with
skip_logout=true, session preservation, and subsequent SSO reuse.
| File | Description |
|---|---|
| testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/saml/BasicSamlTest.java | Adds regression coverage for ForceAuthn across restarts. |
| services/src/main/java/org/keycloak/protocol/saml/SamlService.java | Stores ForceAuthn in a client note. |
| services/src/main/java/org/keycloak/protocol/saml/SamlProtocol.java | Reads ForceAuthn from the client note. |
Review effort: Balanced
mposolda
approved these changes
Oct 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #54339
Co-authored: Codex noreply@openai.com