Files
jcoffey-dev bd5bfb3892
ci / fork-checks (pull_request) Skipped
ci / build (pull_request) Skipped
github/ci (branch) GitHub Actions
ci / github (pull_request) Successful in 9m5s
Passkeys: a challenge signs in once, even when sent twice at once
A sign-in challenge and a registration ceremony were read, then
deleted, in two steps. Two requests sent together with the same
challenge could both read it before either deleted it. Each still
needed a valid signed assertion, so this didn't let anyone in without
the passkey, but PK-10 says a challenge is good once.

Each reader now also takes a claim counter named after the key and
what it read. Every in-memory store increments it atomically (Redis,
SQL, the key-value stores, sharded or not), and only the first reader
gets the challenge. A registration ticket that starts a new ceremony
after a failed try gets a new claim. The counter expires with the
challenge.

Tests, in the passkey suite: 64 readers claiming one challenge at once
get exactly one win, and a ticket's next ceremony is a new claim. The
read-then-delete window is two back-to-back store calls, too short to
hit reliably over HTTP, so the claim is tested directly; the same
challenge sent six times at once over HTTP also signs in exactly once.

Reported privately in a security review.
2026-11-20 13:16:35 -07:00
..