Skip to content

[10/15] Normalize identifiers before keying the auth rate limiter - #163

Open
UnknownJoe796 wants to merge 1 commit into
version-5.3from
v53/auth-normalization
Open

[10/15] Normalize identifiers before keying the auth rate limiter#163
UnknownJoe796 wants to merge 1 commit into
version-5.3from
v53/auth-normalization

Conversation

@UnknownJoe796

Copy link
Copy Markdown
Contributor

Identifiers are normalized before they key the auth rate limiter, so casing and
formatting variants of the same identifier can no longer be used to multiply the
allowed attempt budget. Applies to password, TOTP and backup-code proofs.

@UnknownJoe796

Copy link
Copy Markdown
Contributor Author

Looks fine to me.

@UnknownJoe796
UnknownJoe796 force-pushed the v53/openapi-sdk-docs branch from c31622d to 6286e37 Compare July 29, 2026 22:54
@UnknownJoe796
UnknownJoe796 force-pushed the v53/auth-normalization branch from 1af4070 to afcde3e Compare July 29, 2026 22:54
PasswordProofEndpoints, TimeBasedOTPProofEndpoints, and BackupCodeEndpoints
built their constrainAttemptRate cache key from the raw input value while
normalization happened only inside the rate-limited action. An attacker
could therefore vary case/whitespace of an identifier to get a fresh
limiter bucket per variant, dodging the limiter and its new exponential
backoff. Resolve the principal handler and normalize the value before
constructing the key, matching PinBasedProofEndpoints. Credential-matching
behavior is unchanged. Tests assert case variants of one identifier share
a single bucket.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
(cherry picked from commit 7a2d926)
(cherry picked from commit afcde3e)
@UnknownJoe796
UnknownJoe796 force-pushed the v53/openapi-sdk-docs branch from 6286e37 to 8b29a23 Compare July 30, 2026 02:19
@UnknownJoe796
UnknownJoe796 force-pushed the v53/auth-normalization branch from afcde3e to a123e57 Compare July 30, 2026 02:19
@UnknownJoe796
UnknownJoe796 changed the base branch from v53/openapi-sdk-docs to version-5.3 July 30, 2026 02:24
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