Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content

fix: charge shared-candidate login failures per account (ovcs) - #3732

Merged
edulix merged 3 commits into
ovcsfrom
fix/meta-13860/ovcs
Oct 12, 2026
Merged

edulix merged 3 commits into
ovcsfrom
fix/meta-13860/ovcs

Conversation

@edulix

@edulix edulix commented Oct 10, 2026

Copy link
Copy Markdown
Contributor

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 sharedCandidateFailurePolicy authenticator option selects this: CHARGE_VIABLE_CANDIDATES (default) or TUPLE_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

edulix and others added 3 commits October 10, 2026 15:07
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>
@coderabbitai

coderabbitai Bot commented Oct 10, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

🗂️ Base branches to auto review (2)
  • release/10.0
  • feat/meta-12767/.*

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: Repository: sequentech/step/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Essentials
  • Run ID: 598f26e4-378f-4961-acee-597e555a1d1e

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Oct 10, 2026 •

Copy link
Copy Markdown
PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-10-12 00:48 UTC

@edulix
edulix merged commit 3488c46 into ovcs Oct 12, 2026
75 of 77 checks passed
@edulix
edulix deleted the fix/meta-13860/ovcs branch October 12, 2026 00:43
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant