SPB Git

Repository Public

0005-passkeys-only-identity.md 1.5 KB

# 0005 — Passkeys only; opaque server-side sessions; out-of-band recovery

Decision.

  • The only credential is a WebAuthn passkey (RP ID clustr.spboucher.ai), shared by the web app and the Apple apps through Associated Domains. No passwords, no TOTP, no magic links. User verification is required; attestation is none (we do not restrict authenticator models; we verify origin, RP ID, UV and the signature counter).
  • Sessions are opaque random tokens stored hashed: a __Host- cookie (HttpOnly, Secure, SameSite=Strict, 30 min idle / 12 h absolute) for the web, and a 10-minute bearer token + rotating, device-bound refresh token for native apps. Reuse of a rotated refresh token revokes the session.
  • Sensitive operations require a passkey ceremony less than 5 minutes old (step-up), checked by the server.
  • Accounts are created only from single-use invitations (256-bit token, hash stored, 15 min by default, atomic consumption, short setup transaction). An invitation can never attach a passkey to an existing account unless that account's owner is signed in, has just re-verified, and confirms.
  • First owner and account recovery are performed with mccctl on the host over SSH. This is the documented out-of-band procedure; there is no other bypass. Recovery revokes the account's previous passkeys and sessions.

Why opaque tokens rather than JWTs. Immediate revocation (session, device, user) is a requirement; a database lookup per request is cheap at this scale and avoids key distribution and unrevocable tokens.

Files main
Menu

Theme