Repository navigation
Limit failed Console tokens and passwords per client address - #1790
Merged
Merged
Conversation
…ures (#1758) Apache appends the client it saw onto the first X-Forwarded-For header and leaves a later duplicate unchanged. Count failures against that first header.
This was referenced Nov 5, 2026
Merged
Closed
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.
Summary
Failed Console bearer tokens and password sign-ins now share a per-client-IP budget, so changing holders or account names cannot avoid the limit.
Counts expire after 60 idle seconds and clear on restart. Success leaves counts intact. The existing account password slowdown and five-tries-per-code limit stay in place. The manual, hand-written site pages and OpenAPI describe the behavior.
Closes #1758
Evidence
Execution evidence
cargo test --test console failed_tokens_are_slowed_then_limited_per_forwarded_addressfailed:left: 401,right: 429.After: same command passed:
1 passed; 0 failed.cargo test --test console failed_passwords_are_limited_by_client_address_across_account_namesfailed:left: 401,right: 429.After: same command passed:
1 passed; 0 failed.cargo test --test console openapi_equals_cli_and_describes_operations_without_local_secretsfailed:left: Null,right: "integer"for the missing 429 retry metadata.After: same command passed:
1 passed; 0 failed.cargo test --test console rate_limit: all three HTTP tests passed, including a real peer at 127.0.0.2 with rotating forwarded headers, combined token/password failures, and restart clearing.cargo check --locked: passed.scripts/affected-tests 39ce50f9473ccccc202200a13a2e6c0942030e06: site tests 62 passed (130.25s), locked Console build passed (130.17s), Console browser tests 126 passed (205.78s).fffaa482shares the existing frozen-wall-clock fixture between those processes; both affected parity tests pass.fffaa482passedcargo nextest run:3767 tests run: 3767 passed (2 slow), 82 skipped. Execution took 888.000s, with 1m 06s compilation reported separately. The redundant local retry was stopped after successful CI covered this exact head, followingdocs/testing.md.cargo fmt -- --checkandgit diff --check: passed.Seams under test: the real Console binary over HTTP, with passwords and tokens configured through the CLI; OpenAPI is compared over HTTP and its CLI twin. No test reaches into limiter or token-store internals.
Visual evidence
Documentation pages, matched viewports and expanded sections. Captures are in a secret Gist; no evidence media is added to this branch.
Console API manual — 1440×900
Console API manual — 390×844
Homepage Console workflow — 1440×900
Homepage Console workflow — 390×844
How it works: Console API — 1440×900
How it works: Console API — 390×844
Architecture: Console authentication — 1440×900
Architecture: Console authentication — 390×844
Review coverage
Reviewed against
issue-1753, pinned at remote commit39ce50f9473ccccc202200a13a2e6c0942030e06. Standards raised one Duplicated Code judgement call; it was addressed in25e78b17and the reviewer confirmed the fix. Spec raised zero findings and also reviewed the subsequent shared clock-fixture fix. Neither axis raised an incorrect-behavior finding.Both axes read all 12 changed files, including generated
site/docs/index.html. No generated output was excluded. Unread changed files: none for Standards; none for Spec. Reports andsummary.jsonare retained with this Session.Unaddressed findings
Standards
None.
Spec
None.
Security
None.
Security review outcome
No unaddressed introduced findings.
Merge Danger
Door: two-way
No data migration or new dependency. Reverting removes the in-memory limit.
Blast Radius: authentication
Clients sharing an IP share its failure budget. A custom proxy must set or append the real client address; missing or malformed forwarding falls back to the proxy peer. Existing signed-in sessions continue through their current authorization path.
Built with codex codex-cli 0.164.0 · gpt-6.1-sol · xhigh