Repository navigation
fix: charge shared-candidate login failures per account (ovcs) - #3732
Merged
Merged
Conversation
When the multi-attribute login resolves to more than one enabled, non-locked-out account and the credential does not identify exactly one, record the failure through the brute-force protector for each of those accounts. A new sharedCandidateFailurePolicy option (CHARGE_VIABLE_CANDIDATES by default, TUPLE_ONLY to count only the per-combination limit) selects this on both the browser form and the direct grant authenticator. With an encrypted credential attribute, a match on a locked account among several candidates now returns the same generic failure as any other failed attempt. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
When the submitted values match several accounts but only one of them is not locked out, a failed encrypted-secret attempt is now attributed to that account, as the password path already does, whichever shared-candidate failure policy is configured. The response stays the same generic failure. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. 🗂️ Base branches to auto review (2)
Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
|
edulix
added a commit
that referenced
this pull request
Oct 12, 2026
Parent issue: sequentech/meta#13833 Keycloak 26.7 (#3738) changed `BruteForceProtector.failedLogin` to take a `Set<String>` of credential types, and `MultiAttributeCredentialResolver` (#3732) still passes a `String`, so the Keycloak extensions no longer compile on ovcs. Wrap the type in `Set.of(...)`. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
BelSequent
added a commit
that referenced
this pull request
Nov 13, 2026
…(ovcs) (#4110) Parent issue: sequentech/meta#13860 Multi-attribute password login (browser form and IVR direct grant), on top of the shared-candidate charging already in `ovcs` (#3732): - **One account:** with Brute Force Detection on, a failure attributed to one account no longer counts toward the per-combination limit, which anyone who knows the voter's values could fill to keep them out even with the right password. The account is charged in Brute Force Detection instead: the browser form charges it itself, because Keycloak's flow engine logs a failure after the form has cleared its user (the form also drops any attempted username an earlier step noted, so the engine doesn't charge that account), and the direct grant keeps the user set so Keycloak does. Keycloak's lockout of that account applies. Without Brute Force Detection it still counts, and failures shared by several accounts always count. - **Docs:** the multi-attribute login tutorial and the IVR "DOB + PIN" page strongly advise against date of birth + PIN login and describe a per-IP rate limit at the proxy as a mitigation. Same change as on #3575 (release/10.0) and #3731 (release/10.1). Validation: `tupleThrottle_attributedFailuresWithBruteForceDetection_dontLockOutTheVoter` (MultiAttributePasswordAuthenticatorTest) and `attributedSecretGuessesUnderBruteForceDetectionDoNotLockOutTheVoter` (EncryptedAttributeLoginTest) fail on the base branch and pass with this PR; `tupleThrottle_sharedTupleFailuresWithBruteForceDetection_stillCount` and the existing tuple-throttle tests cover what still counts. `mvn -pl message-otp-authenticator -am spotless:check verify` passes locally (433 tests); the full keycloak-extensions suite and the docs build are left to CI. `action_attributedFailureChargesTheAccountBeforeClearingIt` fails without the charge in the browser form. That run was on the 10.0 branch (#3575); this port relies on its own CI. 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## Summary by CodeRabbit * **Documentation** * Updated password-login and IVR guidance to warn about date-of-birth-and-PIN credentials and recommend unique voter identifiers, strong PINs, brute-force protection, and IP-based rate limiting. * Added guidance on applying proxy rate limits to browser and Direct Grant requests, including considerations for IVR traffic. * **Bug Fixes** * Corrected how attributable login failures affect tuple-based limits when Brute Force Detection is enabled; ambiguous failures continue to count toward those limits. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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.
Parent issue: https://github.com/sequentech/meta/issues/13860
When the multi-attribute password login (browser form and direct grant) resolves to more than one enabled, non-locked-out account and the credential does not identify exactly one of them, the failure is now recorded through Keycloak's brute-force protector for each of those accounts, so they follow the realm's Brute Force Detection settings like a username/password login. A new
sharedCandidateFailurePolicyauthenticator option selects this:CHARGE_VIABLE_CANDIDATES(default) orTUPLE_ONLY(only the per-combination limit counts the failure). Successful logins charge no other account, and the charge does not reserve accounts, so voters who share a date of birth can still log in concurrently. With an encrypted credential attribute, a match on a locked account among several candidates now returns the same generic failure as any other failed attempt, and when only one of the candidates is not locked out the failure is attributed to it, as in password mode.Validation: the new tests from the release/10.0 change (MultiAttributePasswordAuthenticatorTest, EncryptedAttributeLoginTest, MultiAttributePasswordDirectGrantAuthenticatorTest) do not compile against the base branch sources, because they use the new shared-candidate policy setting, and pass with this change; the tests for legitimate logins and the opt-out pass too. The rest of the message-otp-authenticator suite passes except SmartLinkSecretLoggingTest, which this change does not touch. spotless:apply is clean. The full keycloak-extensions suite and the docs build are left to CI. Docs are updated as in the release/10.0 change.
🤖 Generated with Claude Code