Expand description
Passkeys (kernel spec §3.2, plan 3c): WebAuthn with webauthn-rs.
- The relying party is
public_url(decision 1): its host is the RP id and its origin the one origin accepted, with no subdomain and no other port. Apublic_urlwhose host is an IP address has no RP id, so passkeys are unavailable there. - The user handle is derived from the owner’s id (decision 3), not stored: an authenticator keeps it, and it names no one.
- Ceremonies live in memory (decision 5, kernel spec §3.2), keyed by
a random id: each is taken once, whatever its finish then finds, and
lives at most
CEREMONY_TTL_SECS. A restart drops them all; the browser starts again. - Passkeys add to the password (decision 2): registering one needs a stepped-up session (decision 7), and removing one always leaves the password. Every query names the owner (kernel spec §1).
Structs§
- Ceremonies
- The live ceremonies (decision 5).
- Passkey
Record - One of the owner’s passkeys, as Settings lists them (kernel spec §3.2).
Enums§
- Ceremony
- A ceremony begun and not yet finished: what it is for, and the state
webauthn-rschecks its finish against. - Refused
- Why a finish was refused. Nothing changed.
- Start
- The outcome of starting a ceremony.
Constants§
- CEREMONY_
TTL_ SECS - How long a ceremony may take from its start to its finish, and the timeout the browser is given (decision 5).
- MAX_
LABEL_ CHARS - The longest label a passkey takes, in characters.
- MAX_
LOGIN_ CEREMONIES - At most this many login ceremonies are live at once, and as many registrations and step-ups: two pools, so a flood of unauthenticated login starts never pushes out a signed-in session’s ceremony (decision 5; 3c review, O1).
- MAX_
SESSION_ CEREMONIES
Functions§
- counter_
moves_ on - Whether an authenticator’s signature counter
sentmay followstored, the one last accepted (decision 6): it must move on, unless both are 0, as they stay for an authenticator with no counter (synced passkeys). One that does not may be a clone. - relying_
party - The relying party for
public_url:Nonewhen its host is an IP address (decision 1). Any otherNoneis a parsedpublic_urlthatwebauthn-rsrefuses, unreachable asPublicUrl::parsestands; it is logged, so passkeys never stop working unexplained. - user_
handle - The owner’s WebAuthn user handle: the first 16 bytes of the SHA-256 of their id. The same owner always gets the same handle.