Repository navigation
relay: cap passkeys per account at 32, as Hosted does - #1920
Merged
Merged
Conversation
The selfhost Relay appended to account.json without a limit, so anyone holding a Burrow token could loop setup-token -> begin -> finish and grow the durable file without bound, each append rewriting the whole file. The cap Hosted already enforced (32) moves to remote-lib-common so both Relays share it. The selfhost refusal is a 409 naming account.json, checked under the store's mutex; like every other finish failure it restores the setup token, matching Hosted. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Deploying mouseterm with
|
| Latest commit: |
8b4b57d
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://9cf190a7.mouseterm.pages.dev |
| Branch Preview URL: | https://audit-relay-passkey-cap.mouseterm.pages.dev |
dormouse-bot
approved these changes
Nov 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Nightly audit follow-up. Hosted refuses a 33rd passkey on an account, but the selfhost Relay appended to
account.jsonwithout limit, so a holder of a Burrow token could keep adding rows to a durable file that every append rewrites in full.MAX_PASSKEYS_PER_ACCOUNT(32) moves fromhosted/server/relay-api.tstoremote-lib-common/src/remote/relay-common.ts, so both Relays read the same number.AccountStore.appendPasskeyinrelay/src/state.tsrefuses a full account inside its mutex, before the duplicate-credential check, the same order Hosted uses./api/setup/finishanswers 409 telling the user to remove a passkey fromaccount.json. The refusal takes the existing failure path, so the setup token is restored and nothing is evicted.docs/specs/relay.md-> "HTTP API" states the cap on thefinishrow. Its word budget is re-baselined from 5900 to 5950.Tests: a new case in
relay/test/setup.test.mjsfills an account to 32 and checks that the 33rd is refused, the file stays at 32, and the token still begins. It fails with the cap line deleted. Relay suite 323/323; Hosted's relay suite 38/38 (Docker);lint:specsandlint:mdpass.🤖 Generated with Claude Code