Repository navigation
feat(openclaw-id): protocol for owner reset vouched for by the Gateway key - #193777
Conversation
…(OCF-319) Add the K_gw-signed RootReset statement, the descriptor reset evidence, verifyRootReset, Discovery's checkDescriptorRootReset and the owner_reset pin outcome. Docs, vectors and tests.
A leaked old kit could sign a predecessor binding naming its own K_gw. The pin now keeps the K_gw of the last verified binding, and owner_reset requires the reset's predecessor to name it. Adds tampered-signature and leaked-kit regressions.
…y key OpenClaw-Publication: fe064e55-b294-47cc-8aa7-0703b3ac443b
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs real behavior proof before merge. What this changesAdds Gateway-signed owner-reset statements, descriptor continuity checks, and a distinct owner_reset result for previously pinned clients. Example: A browser pinned to studio-k7x2q.crabd.me at binding_seq 2 receives a Gateway-endorsed replacement root at binding_seq 3.
Review scores
ProductKind: Feature · Worth it: Yes · Fix scope: Partial Merge readiness⛔ Blocked before merge - 3 items remain Keep this PR open as a coherent protocol stage owned by the existing feature contributor; current main lacks this capability, and inspection found no concrete introduced correctness defect. Priority: P2 Before merge
FindingsNone. Tests
Agent review detailsHow this fits togetherThe private protocol package defines contracts shared by Gateway, Discovery, and browser implementations; it consumes signed bindings, reset evidence, and trusted pins and returns verification results without performing persistence or network effects. flowchart LR
A[Gateway reset producer] --> B[Signed reset and new binding]
B --> C[Discovery continuity check]
C --> D[Published descriptor]
D --> E[Browser pin verifier]
F[Stored root and Gateway key] --> E
E --> G[Reset refusal or substitution refusal]
Technical reviewBest possible solution: Keep the shared protocol implementation and complete the machine-local reset integration through the existing Gateway, Discovery, and loader owners. Do we have a high-confidence way to reproduce the issue? This is a protocol feature rather than a reproduced runtime bug; source comparison confirms that current main treats replacement roots as root_mismatch. Is this the best way to solve the issue? The scoped implementation reuses existing parsing, signature, descriptor, and pin owners, with one shared continuity verifier and no unnecessary parallel mechanism identified. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 2049dfc8e2d5. Merge-risk optionsMaintainer options:
Provenance checked
TestingProof path: in-process harness. SecurityNeeds attention: No concrete signature or pin bypass was identified, but the new reset authority requires verification at its runtime effects. EvidenceWhat I checked:
PR surfaceSource +588, Tests +199, Docs +106, Other +2. Total +895 across 20 files. Added test files: 1. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. LabelsLabel changes:
Label justifications:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed November 5, 2026, 6:09 PM ET / 23:09 UTC. |
…y key (openclaw#193777) * feat(openclaw-id): verify owner reset vouched for by the Gateway key (OCF-319) Add the K_gw-signed RootReset statement, the descriptor reset evidence, verifyRootReset, Discovery's checkDescriptorRootReset and the owner_reset pin outcome. Docs, vectors and tests. * fix(openclaw-id): only the pinned K_gw can vouch for an owner reset A leaked old kit could sign a predecessor binding naming its own K_gw. The pin now keeps the K_gw of the last verified binding, and owner_reset requires the reset's predecessor to name it. Adds tampered-signature and leaked-kit regressions. * feat(openclaw-id): protocol for owner reset vouched for by the Gateway key OpenClaw-Publication: fe064e55-b294-47cc-8aa7-0703b3ac443b
Related: Linear OCF-319 (owner reset on the machine). This PR covers only the protocol package. The Gateway, CLI, Control UI, Discovery and loader work follows on the OpenClaw ID stack (#192335 → #192345 → #192352) and in the Discovery and loader repositories.
What Problem This Solves
Today an owner who loses or leaks their recovery kit has no way to take back control of the claw except unlinking and relinking it. The approved design (Josh, 2026-11-02) lets the person at the machine reset owner access. The protocol has to let Discovery and pinned browsers tell a reset the machine vouched for apart from a root substitution.
User Impact
This PR has no user-visible change by itself: no Gateway publishes a reset yet. After the follow-ups ship:
Deployment order: Discovery and the loader must update their vendored protocol before any Gateway publishes a reset. Readers built before this change refuse the new descriptor field as malformed, so nothing is half-accepted.
Why This Change Was Made
RootReset { claw_id, new_root_pub, binding_seq, issued_at }statement, signed by K_gw from the binding being replaced. A new R'-signed binding with the same claw, hostname, K_srv and K_gw goes with it. No RootRotation, root epochs or frozen state;root_epochstays the constant 1.reset: { previous_root_pub, previous_binding, statement }. A browser pinned to the old root reads only the descriptor before it decides anything, and Discovery stores the descriptor as one row. The Gateway includesresetonly with the binding the reset created.verifyRootReset(current, reset, next)is the shared continuity check:checkDescriptorRootReset(stored, next)accepts a root change only as a reset from the stored binding (the K_gw Discovery already holds).checkDescriptorConsistencyalso checksresetwhen it is present.verifyBindingForPinreturns the new failure codeowner_resetfor an endorsed reset. It returns no pin, so the browser dials nothing and must be set up again with the new kit. Anything else is stillroot_mismatch.ClawPingains an optionalk_gw(the K_gw of the last binding verified under the pin), andowner_resetrequires the reset's predecessor binding to name that key.k_gw(fresh pins, or pins stored before this change) getroot_mismatchfor any new root.RootResetis a new value in envelope v1 andresetis a new field in descriptor v1.docs/versioning.mdsays this normally needs a new version. It is done in place because v1-draft has not shipped, and the new "Owner reset" section in versioning.md records it.root_mismatchand is set up again the same way.statements.md,discovery.md("Owner reset"),enrollment.md("Owner reset" replaces the out-of-scope note),versioning.md,README.md,acceptance.md.Evidence
node scripts/run-vitest.mjs packages/openclaw-id-protocol: 24 files, 169 tests passed.reset.test.ts:owner_reset, and a browser set up again with the new kit pins and dials.bad_signature), other claw, non-increasing binding_seq, another root, binding not signed by the new root, changed K_srv, changed K_gw, binding_seq mismatch. Each givesroot_mismatchat the pin.k_gw; that is intentional. New entries: one valid reset, two invalid resets, three reset pin checks.pnpm tsgo:core,node scripts/run-tsgo.mjs -p test/tsconfig/tsconfig.core.test.json,oxlinton the package,pnpm format:checkon changed files,git diff --check: all clean.config/test-lines-allocations/openclaw-id-owner-reset.txt(199).owner_reset.