Keep passkey sign-in available during anonymous challenge floods #535

Closed
opened 2026-08-11 02:50:57 +00:00 by timmy · 0 comments
Owner

Problem

The public passkey authentication options endpoint issues and persists a fresh WebAuthn challenge for every anonymous request. Unlike token sign-in, it has no durable source-aware admission budget, and passkey_challenges has no active-row bound. A challenge flood can grow/contend the SQLite registry and impair legitimate mobile sign-in. Invalid passkey verification also bypasses the existing shared sign-in failure budget.

Vertical slice

Protect the complete public passkey sign-in ceremony with trusted-proxy-aware, process-shared admission control; bound active challenge storage; and apply the existing authentication failure budget to failed passkey verification without weakening successful passkey sign-in.

Acceptance criteria

  • Repeated authentication-options requests from one canonical source return 429 with Retry-After before another challenge is generated; a different source remains available.
  • Forwarded client addresses are honored only behind configured trusted proxies.
  • Limiter/registry failures fail closed with 503 and no challenge or cookie.
  • Invalid, replayed, or wrong-credential verification consumes the shared source failure budget; successful verification clears it.
  • Active authentication challenges are bounded per source and globally, with expired challenges pruned atomically across store instances.
  • Existing enrollment, authorization, authentication, subpath, and event-loop responsiveness behavior remains green.

No historical issue or recent main commit covers passkey challenge issuance admission, bounded anonymous challenge storage, or passkey verification failure throttling. Related #270 only protects token failures; #485 introduces passkeys.

## Problem The public passkey authentication options endpoint issues and persists a fresh WebAuthn challenge for every anonymous request. Unlike token sign-in, it has no durable source-aware admission budget, and `passkey_challenges` has no active-row bound. A challenge flood can grow/contend the SQLite registry and impair legitimate mobile sign-in. Invalid passkey verification also bypasses the existing shared sign-in failure budget. ## Vertical slice Protect the complete public passkey sign-in ceremony with trusted-proxy-aware, process-shared admission control; bound active challenge storage; and apply the existing authentication failure budget to failed passkey verification without weakening successful passkey sign-in. ## Acceptance criteria - Repeated authentication-options requests from one canonical source return 429 with Retry-After before another challenge is generated; a different source remains available. - Forwarded client addresses are honored only behind configured trusted proxies. - Limiter/registry failures fail closed with 503 and no challenge or cookie. - Invalid, replayed, or wrong-credential verification consumes the shared source failure budget; successful verification clears it. - Active authentication challenges are bounded per source and globally, with expired challenges pruned atomically across store instances. - Existing enrollment, authorization, authentication, subpath, and event-loop responsiveness behavior remains green. No historical issue or recent main commit covers passkey challenge issuance admission, bounded anonymous challenge storage, or passkey verification failure throttling. Related #270 only protects token failures; #485 introduces passkeys.
timmy self-assigned this 2026-08-11 02:50:57 +00:00
timmy closed this issue 2026-08-11 03:04:43 +00:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: stackchain/stackchain-dashboard#535
No description provided.