Repository navigation
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
Review in place of CodeRabbitCodeRabbit skipped this PR because its base is not the default branch, so two review agents stand in (AGENTS.md: a PR touching authentication).
Number matching itself held: the candidates are three distinct values, shuffled with Validation at d67b23a: |
Second review roundThe omo code review of d67b23a answered BLOCK on one reproduced regression: through the relay, a driving phone could no longer start a pairing code (403 Its LOW findings stay as they are:
Validation at 68bf8cc: |
…ember A pairing code, a comparison of digits and an account join are admitted by the same people: this PC itself (its windows, or `pair --approve` in its terminal), or a drive account member through the relay, who must pick the new device's digits out of three. Every admission is announced with who approved it. Comparisons that ask to join the account (pair-intent-account, negotiated in WELCOME) count their failures apart from codes, so they cannot pause QR pairing.
…s from watch devices Review fixes: an approval now ends for good when its approver is revoked or given another role before the phone confirms, even if the role comes back; a watch device on the PC's own address can no longer read the digits of a waiting comparison. The docs say an account admission makes a plain row the new device then links, and what the two failure counts give a relay in the middle.
…count The omo review found that no relay device could start a pairing code until devices can become account members. The account-only rule now applies once the PC belongs to an account; a PC in no account behaves as before.
68bf8cc to
e83842f
Compare
…al names its id As agreed with the client lane: remote-pairings entries carry the new device's P-256 key from PAIR_REQUEST (bound by the commitment and the digits), and POST /api/relay/pairing answers an approval with the device_id the row takes, accountDeviceId(server_id, key), which every row a comparison makes now uses.
# Conflicts: # server/devices.ts # server/dispatch.ts # server/machine-api.ts # server/relay/pair-sas.contract.test.ts # server/relay/pairing-approvals.ts # server/relay/session.ts
Deploying ovis with
|
| Latest commit: |
fca71c1
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://259eac38.ovis.pages.dev |
| Branch Preview URL: | https://feat-account-admission.ovis.pages.dev |
# Conflicts: # docs/account.md
Merged with main, and the client lane's additions
Agreed with the client lane:
The rule for joining through the account outside the owner's pairing window (design 5.3) lands in #2843. The omo code review is CLEAR at fff5481. Validation at fff5481: |
# Conflicts: # server/relay/session.ts
|
Landed as part of #2867 (the whole account stack was merged there in one squash). |
Summary
One admission rule for every way into a PC through the relay: a pairing code, a comparison of digits (#2696), and, with the follow-up PR, joining through an account. The rule is in
docs/account.md("Who may admit a device"), from #2834.Stacked on #2834 (contract) and #2696.
GET /api/relay/pairingsand the newremote-pairingsevent give it three candidates (choices), andPOST /api/relay/pairingmust name the new device's digits to approve. A wrong pick answers 409wrong_digitsand ends that comparison. Watch devices getread_only; other relay devices getaccount_required.POST /api/devices/pair/startis for drive account members only (403account_required), since a code admits whoever holds it. On the PC itself nothing changes.device-pairedcarriesapproved_by(device id and label) when an account member approved it, and the new row keepsadded_by. An approver revoked or demoted before the phone confirms admits nothing.pair-intent-pcorpair-intent-accountwithpair-sas. The PC selects only the one offered, only alongsidepair-sas, and aHELLOoffering both ends withprotocol_error. The prompt shows the intent. Older phones offer none (pc).bun scripts/plugin.ts pair --approvelists the waiting devices with their digits and intent and asks y/n for each.docs/relay.mdis updated for the above.src/only skips the new event until the account screens land (acct-client lane).Merge order note: until a device can become an account member (the follow-up PR, which applies
linkrecords), no relay device can start a code or approve remotely. Approval on the PC itself and pairing by QR code work as before. Merge this together with the PC-side PR, or after it.Validation
server/relay/pair-sas.contract.test.ts, over realRelaySessions with Noise, cover: intent negotiation; remote approval admits and recordsadded_by; the announcement (withapproved_by) reaches every connected device, and the candidates reach only the member; watch and non-member relay devices are refused while the request keeps waiting; a wrong pick refuses and counts on the account path only; account failures leave code pairing open; only members start codes through the relay; a revoked approver admits nothing; the cap of three covers account comparisons too.decideRemote, any relay device as approver, one shared failure counter, no approver re-check at admission, no member check for codes, the candidate stream to any relay device, and both intents accepted.pair --approveagainst an isolated server (temp HOME and state dirs, port 0) with a real comparison waiting: it printedNew phone wants to join your account. Approve it only if its screen shows 141 675. Approve? [y/N], answeredy, and the phone gotAUTH_OK.bun run check fastat ed1f7cc: workflow syntax, generated files, typecheck, build and unit tests (10972 pass, 0 fail) all ok.