Repository navigation
Reject in-progress login flow actions for disabled users - #55465
Open
vaceksimon wants to merge 5 commits into
Open
vaceksimon wants to merge 5 commits into
vaceksimon wants to merge 5 commits into
Conversation
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The new check blocks logout confirmation for users disabled while the confirmation page is open, leaving their sessions active unless LOGGING_OUT sessions are exempted.
1 open issue
What changed in this PR
This PR addresses #55376 by rejecting pending login actions when the authenticated user has been disabled, including consent completion.
Changes:
- Adds an enabled-user check during authentication-session verification.
- Adds a consent regression test and strengthens the required-action test to verify that the password remains unchanged.
| File | Description |
|---|---|
tests/base/src/test/java/org/keycloak/tests/forms/LoginTest.java |
Tests rejection of consent and password updates after account disabling. |
services/src/main/java/org/keycloak/services/resources/SessionCodeChecks.java |
Rejects resolved authentication sessions associated with disabled users. |
Review effort: Balanced
rmartinc
reviewed
Nov 23, 2026
rmartinc
requested changes
Nov 24, 2026
rmartinc
left a comment
Contributor
There was a problem hiding this comment.
Thanks @vaceksimon! LGTM! Just add the same test but disabling the client before the accepting the consents.
| } | ||
|
|
||
| @Test | ||
| public void disabledUserReceivesTokensViaConsentCompletion() { |
Contributor
There was a problem hiding this comment.
Just add the same test for the disabled client and it's OK to me.
Contributor
Author
There was a problem hiding this comment.
@rmartinc added the test and rebased on main
Closes: keycloak#55376 Signed-off-by: Simon Vacek <vaceksimon-github@pm.me>
Signed-off-by: Simon Vacek <vaceksimon-github@pm.me>
Signed-off-by: Simon Vacek <vaceksimon-github@pm.me>
Signed-off-by: Simon Vacek <vaceksimon-github@pm.me>
Signed-off-by: Simon Vacek <vaceksimon-github@pm.me>
vaceksimon
force-pushed
the
55376-Consent-completion-can-issue-tokens-after-user-is-disabled
branch
from
November 24, 2026 12:25
22b74d8 to
ae7e7f0
Compare
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: #55376