Skip to content

Stop cookie-based SSO re-auth from resetting brute-force counter (26.6) - #50047

Merged
ahus1 merged 1 commit into
keycloak:release/26.6from
rmartinc:backport-49996-26.6
Jun 29, 2026
Merged

ahus1 merged 1 commit into
keycloak:release/26.6from
rmartinc:backport-49996-26.6

Conversation

@rmartinc

@rmartinc rmartinc commented Jun 16, 2026 •

Copy link
Copy Markdown
Contributor

Closes #49960

PR: #49996
Commit: ed270d9
PR branch: backport-49996-26.6
Target branch: https://github.com/keycloak/keycloak/tree/release/26.6

…cloak#49996)

This commit fixes an issue where a SSO re-auth was calling a reset on
the brute-force counter, and clearing lockout, allowing a malicious
actor to continue brute-forcing as long as the user was logged in and
active. Brute-force reset is now only called on a successful login that
wasn't a SSO re-auth.

It also resets the brute-force counter based on credential categories:
only categories defined in the BruteForceProtector under
ALLOWED_AUTHENTICATION_CATEGORIES are processed, allowing flexibility on
what counts as a valid login attempt. Null-handling in
BruteForceProtector was tightened for success and loosened for failure.

Closes keycloak#49960

Signed-off-by: Niels Van Nerum <vannerumniels@icloud.com>
(cherry picked from commit ed270d9)

test
@mabartos

Copy link
Copy Markdown
Member

@rmartinc Are these changes related to the assigned issues (closes xxx)?

@rmartinc

Copy link
Copy Markdown
Contributor Author

@mabartos I copied the other issue 😛, but the PR is OK. I needed to update the test for the changes in the TS framework. I copied the correct links in this PR now.

@mabartos mabartos left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ahus1
ahus1 merged commit fccbaba into keycloak:release/26.6 Jun 29, 2026
81 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Brute-force detection: Authenticated session token refresh resets lockout counter

4 participants