You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Console API: per-address rate limit for failed tokens and passwords #1758
#1753 (Spec: the Console API). Governing decision: ADR 0026.
What to build
Failed tokens and failed passwords are rate-limited per client address, so neither can be guessed. Today only an emailed sign-in code is capped (5 tries per code), and failed passwords have no limit.
An in-memory limiter, written in thirdshift without a new dependency, counts failures per client address. It slows responses after a few failures, then refuses with a 429 carrying a retry time for a cool-down. A restart clears it.
The client address is the proxy's forwarded address, trusted only when the request comes from 127.0.0.1. Otherwise it's the peer address.
It covers bearer tokens on /api/v1 and the password sign-in form. The sign-in code's own limit stays as it is.
A successful authentication doesn't reset another address's count.
Acceptance criteria
An HTTP test: repeated bad tokens from one forwarded address reach a 429 with a retry time, while another address still authenticates.
Repeated bad passwords for the sign-in form reach the same refusal.
A forwarded-address header from a non-loopback peer is ignored.
The sign-in code's 5-tries limit is unchanged (existing tests pass).
Activity
Ignore a later duplicate forwarded address when limiting Console fail…
JacobStephens2 commentedon Nov 5, 2026
Closed by #1790, merged into issue-1753 by a thirdshift Ticket run with Self-merge.