chadtmiller.com/monolith
An atproto PDS
Accounts sign in with passkeys, added through a link
MergedThis adds passkey sign-in to the authorization page. An account adds a passkey through a link made with its password session, and lists and removes passkeys through three routes of the server's own. It also adds spec/PASSKEYS.md, a strict CBOR reader and WebAuthn checks (ES256 and RS256), and a harness check with its own software authenticator. The pull body lists the spec, docs, CLI and web changes.
I read the two core server files in full: oauth/passkeys.rs and oauth/passkeys/webauthn.rs. They match the pull's description of §7.1 and §7.2.
- Registration: The client data is checked for type, challenge and origin. A cross-origin or
topOriginvalue is refused. The attestation must benonewith an empty statement. UP and UV are required. The credential ID must equalrawId. The COSE key must have exactly the expected members and be a valid point or a sound RSA modulus and exponent. - Sign-in: The challenge is spent whatever happens next. The user handle must match the account's HMAC. BE must match what was stored. Signatures are checked, with high
snormalised for ES256. The sign count is checked a second time under OAuth's lock, together with the sign-in. - Links: A link adds one passkey and ends under the lock.
- Spec and code: The spec and code agree on everything I compared. The shortcomings the pull lists are the ones I would have raised.
- New crate:
rsais a new crate, but it is a generic crypto crate, not an atproto or MCP crate.
I did not read the rest of the 33,981-line diff. That covers the CLI, the mcp.rs, account.rs, page.rs, log.rs, compact.rs and sessions.rs changes, cbor.rs, the Rust tests, the harness checks, lib/webauthn.mjs, the web views, the other spec pages, and the vendored RFC and W3C texts under spec/webauthn/. I took the pull's "How it was checked" section on trust for those, including the planted-bug runs. Nothing I read was wrong, so I am approving.
My earlier approval was at d6f684d. Since then the pull moves rsa from 0.9 to 0.10. That changes Cargo.toml and Cargo.lock, the rsa calls in webauthn.rs, and the RS256 unit test. It also adds a dev-dependency on rsa with getrandom.
The check logic is unchanged. RS256 still requires a signature as long as the modulus, then verifies PKCS#1 v1.5 with SHA-256 over the digest of authData || SHA-256(clientData). The new rsa is still a generic crypto crate. The lockfile also drops the old num-bigint-dig and der 0.7 stack, so the tree shrinks.
I could not build or run it, and the gates workflow was still running when I looked. The docs and citations workflows passed. The reworked rs256 test still covers a good signature, one a byte short, a forged one, and keys of the wrong size or exponent. Before merging, check that gates finishes green, since it is what proves the new rsa API calls compile.
My earlier approval was at 4edf6a6. Since then the pull only touches developer tooling: harness/look.mjs and .claude/skills/ui/SKILL.md gain three states, add-passkey, passkey-added and no-passkey. They run the server on localhost with Chromium's virtual authenticator, and they use the existing _passkeyAdd route and the page's own API calls. Server code, spec and checks are untouched, so my earlier approval stands. The skill file lists the new states, and look.mjs documents them in its header. The docs and citations workflows passed at this head. gates was still running when I looked. It also gates the earlier rsa 0.10 change, so check that it finishes green before merging.
My earlier approval was at 615a284. Since then the pull has three changes. The authorization page now gives its device a passkey challenge as it loads, in a __passkeyOptions statement. The Sign in view offers passkeys in autofill, with its other ways in under an "or" rule. just dev now serves at localhost.
The spec changed first, in PASSKEYS.md, "The page's options", and the code follows it. authorization_page calls passkeys::challenge_for, the same function passkey-options uses. That function replaces any challenge the device held and keeps it in memory for 300 seconds. It writes no log entry, so the free-space floor does not apply. The harness gained matching checks, and the pull body says the autofill is played in Chromium.
One thing to know, not to fix: every 200 of GET /oauth/authorize now puts one entry in the in-memory challenge map. Entries expire after 300 seconds and the sweep runs about once a minute, so the map is bounded by the page-load rate over that window.
I read the page.rs and challenge_for parts of the change. I did not read the web view or harness changes in full. docs and citations pass at this head. gates was still running when I looked. It also gates the earlier rsa 0.10 change, so check that it finishes green before merging.
This adds passkey sign-in on the authorization page. A link made with the password session adds a passkey, and three account routes list, add and remove passkeys. It also adds spec/PASSKEYS.md, the harness checks and a software authenticator, and the server, web and CLI changes.
I found nothing that must change. I read these closely:
passkeys/webauthn.rsandpasskeys.rs.- The
oauth.rs,oauth/account.rs,lifecycle.rs,log.rsandsessions.rshunks. - The
Cargo.tomlchanges.
What I saw holds up:
- Registration: it checks client data,
noneattestation, UP and UV, the exact COSE key shape, the RP ID hash and thatrawIdmatches the credential ID. - Sign-in: the challenge is spent before anything else. The count is re-checked under OAuth's lock in the same frame as the sign-in. The user handle is an HMAC of the DID, so it never carries the DID.
- Links: a link ends under the lock when its passkey is added, so a second call through it is refused.
- Locks: the held-state lock is always taken after OAuth's.
- Dependencies: the only new crate is
rsa. It is not an atproto or MCP crate, which.knotless/review.mdforbids. - Excused checks: the pull doesn't touch
harness/conformance.yaml.
I did not read the rest. That covers:
- the vendored
spec/webauthn/*texts; - the prose of
spec/PASSKEYS.mdand the other spec and docs pages; - the harness modules (
checks/passkeys.mjs,lib/webauthn.mjs,pages.mjs,lifecycle.mjs,limits.mjs,commands.mjsand the rest); passkeys/cbor.rsandpasskeys/tests.rs;- the
mcp.rs,ops.rs,compact.rs,email.rs,lib.rsandpage.rshunks; - the
pds-cliandweb/changes.
The gates workflow was still running at this head when I looked. Its docs and citations workflows had passed. The body says gates passed, so check it before the pull enters the queue.
My earlier approval was at 242d943. Since then the pull has two commits: a merge of main and .changeset/passkeys.md. The merge brings in the base's release machinery (knope.toml, the release workflows, CHANGELOG.md, the 0.2.0 version and the docs-site URL). Those are the base's changes, not the pull's.
The one change of the pull's own is the change file. It is a minor bump, which is right for new behaviour, and it is written for those who run the server and call it. It covers the pds passkey commands and the passkey_add tool, the 15-minute link, autofill and the button, the binding to PDS_PUBLIC_URL's host, and the removal of passkeys on a password reset. It matches spec/PASSKEYS.md. This meets the review rule asking for a change file.
What I approved stands. At this head, docs and citations pass and gates was still running when I looked. gates also covers the earlier rsa 0.10 change, so check that it finishes green before the pull is queued.
An account can sign in on the authorization page with a passkey instead of its password. It adds one through a link that
pds passkey add(or thepasskey_addtool) makes with its password session, opened in a browser, and lists and removes them the same way.Claude Opus 5.5 · high
What changes
The spec. A new page,
spec/PASSKEYS.md, with WebAuthn Level 3 (the W3C Recommendation of 25 August 2026) and the CBOR and COSE RFCs vendored underspec/webauthn/:noneattestation alone, and a user handle per account that is an HMAC of its DID under a key the server keeps, never the DID itself. An account has at most 20 passkeys.GET /xrpc/_passkeyList,POST /xrpc/_passkeyAdd {name}andPOST /xrpc/_passkeyRemove {id}: routes of the server's own, with the auth ofOAUTH-ACCOUNT.md's (the password session alone)._passkeyAddanswers{url, expiresAt}: a link to/oauth/passkey?token=…, good for 900 seconds, one per account, held in memory.passkey-register, checked as §7.1 says: client data, anoneattestation object, authenticator data with UP and UV, an EC2 P-256 or RSA 2048-to-4096-bit COSE key with nothing extra, a credential ID no account has. A link adds one passkey.__passkeyOptions(300 seconds, one per device, in memory), andpasskey-optionsgives a new one for the button;passkey-sign-inchecks as §7.2 says, a sign count that did not grow refused, and signs the account in assign-indoes,rememberandephemeralTokenand all. A passkey needs no email code. It costs no rate limit.autocomplete="username webauthn", a conditional request with the page's options), as FIDO's tested guidance and web.dev advise. Its ways in areSign in, full width, then an "or" rule and a full-width button for each other way,Sign in with a passkeyfirst, so a later method is one more row;CancelorBackis a link at the foot.OAUTH.md,OAUTH-PAGES.md(the Sign in view's autofill and layout, the passkey page's two views, the passkey flows of--pages),COMMANDS.md(passkey_list,passkey_add,passkey_remove,pds passkey list|add|remove),LIFECYCLE.md,EMAIL.md,OAUTH-ACCOUNT.md,LIMITS.md,OPERATIONS.md,DURABILITY.md, the README,docs/guide/calling.md,docs/guide/deploying.md,docs/guide/contributing.mdand the site's sidebar name them.just devnow serves athttp://localhost:2583, where a browser makes passkeys, andjust lookdraws the passkey views..changeset/passkeys.mdis the release's entry, a minor change.The harness.
harness/checks/passkeys.mjs, on the server alone, with a software authenticator of its own (harness/lib/webauthn.mjs, ES256 and RS256, which reproduces WebAuthn §16.2's vector byte for byte) that makes each field wrong one at a time. Its steps arepasskeyAuth,passkeyAdding,passkeySigningIn,passkeySignInRefused,passkeyRemovingandpasskeyStatesin the plain run, andpasskeyCommandswith--commands. It also adds crash hooks, the three routes' rows in--lifecycle, andpasskey-registerandpasskey-sign-inbelow the disk floor in--limits. In--pages, the passkey flows run in Chromium with its virtual authenticator, on the server started again athttp://localhost:<port>.commands.mjsholds the three tools and commands.viaOAuthToolandviaOAuthCommandbecomeviaRouteToolandviaRouteCommand.The server.
pds-server/src/oauth/passkeys.rsserves the page, the three API calls and the three routes.passkeys/cbor.rsis a strict CBOR reader, andpasskeys/webauthn.rsdoes the §7.1 and §7.2 checks, with ES256 onp256and RS256 on thersacrate 0.10 (pure Rust, the one new dependency; 0.9 failscargo denyon the Marvin advisory, which 0.10 is patched for). Three new log entries,oauthPasskeyAdd,oauthPasskeyUseandoauthPasskeyRemove, are kept with OAuth's; a use is written in the same frame as the sign-in it makes, and logs from before replay unchanged.pds-cligains thepasskeygroup.web/gains theSign in with a passkeybutton and theAdd a passkeyandPasskey addedviews.Why
The reference has no passkeys, and atproto's OAuth profile leaves how a person signs in to the server (
atproto/oauth.md, "Authorization Interface"). A password typed into a page is what phishing takes; a passkey is bound to the server's origin.Adding one through a link made with the password session keeps the authorization flow the reference's: its pages make the same API calls unless a person uses a passkey, so
--pagesstill compares both sides. The link is what Cirrus PDS does too. A prompt to add a passkey after a password sign-in would have changed the flow the reference is compared on. The autofill needs a challenge as the page loads; a call made then would show in the comparison, so the server puts the challenge in the page instead, in a statement the comparison does not read.How it was checked
On the server, each with exit 0:
--commandswithpasskeyCommands.--crash-every 2, which hit the passkey hooks: "across a restart", plus a challenge, a removal and a count from before the kill, each refused after it.--limits --only diskFloor.--lifecycle --steps 12.--pageswith seeds 1 and 2, the passkey flows among them; the autofill played by handing the page's conditional request to Chromium's virtual authenticator, with calls exactlypasskey-sign-inthenconsent.The first
--pagesrun found two harness bugs: it expectedconsent {did}where the page rightly sends{did, scope}, and it reused a tab that still counted as landed. Both are fixed here.Planted bugs:
passkeyAddingfailed ("passkey-register with UV clear", 200 where400 invalid_requestwas due).passkeySignInRefusedfailed ("a count not greater than the last"). Planted in only the first of the two places, the run passed, because the second check, made under the lock, still refused it.Both were put back.
cargo test -p pds-server passkeyspasses,just quickpasses here (39 page flows, the crash, S3, upgrade, invites, firehose and commands runs), and the docs site builds. Thegatesworkflow passes on this pull's head; its first run failedcargo denyonrsa0.9's advisory, fixed by 0.10.Shortcomings
noneattestation alone: an authenticator that insists on another attestation format adds no passkey. ES256 and RS256 alone: an authenticator offering only EdDSA adds none.PDS_PUBLIC_URLon127.0.0.1passkeys cannot be used, though every route answers. A change ofPDS_PUBLIC_URL's host strands every passkey made before.Back) offers the page's challenge again, which an earlier passkey sign-in may have spent; its autofill then fails with the passkey alert, and the button works.crossOriginofnullis refused.transportsare dropped.oauth.keywhile passkeys are kept, because their user handles would change.Review
Start with
spec/PASSKEYS.md, then the server's WebAuthn checks.