Skip to content

docs(openclaw-id): design owner re-bind ceremony - #196138

Draft
jalehman wants to merge 8 commits into
mainfrom
openclaw/dawn-barnacle
Draft

jalehman wants to merge 8 commits into
mainfrom
openclaw/dawn-barnacle

Conversation

@jalehman

@jalehman jalehman commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Related: pebbles openclaw-bec (design the owner re-bind ceremony), openclaw-aab (a lost Gateway endpoint key is silently regenerated and strands the claw). Follows #194459.

Draft for design review. Do not merge. Docs-only proposal. Every new section is marked "proposed", and no product code changes.

What Problem This Solves

There is no supported way to move a linked OpenClaw ID claw to new machine keys (K_srv / K_gw) under the same owner root. A lost key file is silently recreated and strands every client, and a suspected key leak has no recovery path short of an owner reset. Owner reset is not implemented yet and makes every device set up again.

User Impact

None yet: this PR only proposes the protocol design for review. Once it is implemented, owners can run openclaw id rebind with their recovery kit on the machine. Owner devices, members, nodes, invites and tokens stay, and every client reconnects to the new keys by itself. A linked Gateway that loses a key file fails closed and points to the re-bind instead of minting a key no client trusts.

Why This Change Was Made

A re-bind is a new ServerBinding signed by R at binding_seq + 1, naming new K_srv and K_gw. Pins, freshness and Discovery's republish check already follow it, so no new statement type is needed. The proposal adds:

  • enrollment.md: the re-bind ceremony.
    • Triggers, and why it always replaces both keys.
    • Who signs: R from the kit only. An owner device with bind, an old-K_gw vouch and a pre-signed standby binding were all rejected.
    • Where it runs: local_operator only; it works with the tunnel down.
    • Prepare, sign, commit, activate and publish steps.
    • A crash-safe startup key rule: the stored binding names the current keys; a staged .next file is promoted only if its derived public key matches. This rule is also the openclaw-aab fail-closed fix.
    • What is kept and why, plus concurrency and failure modes. Re-bind and owner reset cannot overlap while either one's publication is pending. Owner reset is an unimplemented dependency.
  • discovery.md: the re-bind publication contract.
    • The descriptor and its snapshot (both signed by the new K_gw) are published in one write, so there is no window in which members, owners or nodes lose their rows.
    • A new owner-account one-time code is required for any K_gw change. It is spent in the same transaction. It closes a takeover of the mirror by someone with a leaked kit; that takeover exists today.
    • Snapshot ordering restarts at a K_gw change, so a stolen old K_gw cannot poison the order.
    • A new rebind notice event.
  • statements.md: pins follow a re-bind. A RootReset or snapshot signed by a retired K_gw is refused. Freshness ordering is kept per K_gw. The re-bind narrows the existing accepted limitation.
  • tunnel.md: clients re-check the binding before they redial after shutdown.
  • README.md: the invariant is updated.
  • acceptance.md: planned proof.

The companion plan (Gateway/CLI/UI work, Discovery and loader changes, per-client gaps, test and live-proof plan, phases, open questions) is kept outside the repo, in the reviewer's workspace.

Evidence

  • Each claim was checked against origin/main (authority.ts prepareLink signs binding_seq: 1; gateway-key.ts and tunnel-child/entry.ts call loadOrCreateEndpointKey; pin.ts moves k_gw with each verified binding) and against Discovery main (routes/claws.ts already accepts a descriptor signed by the new binding's K_gw; deriveRows drops member rows without a matching snapshot; enrollment codes and claw updates are separate storage calls today).
  • Draft client heads checked: Android feat(android): enroll OpenClaw ID nodes with opt-in native transport #194194 treats a Discovery 403 as removal, and Apple feat(apple): add opt-in OpenClaw ID node foundation #194201's tunnel redials a fixed K_srv.
  • Independent read-only security review: no high-severity findings. All six medium findings and the one low finding were checked against code and addressed in the second commit: the publication gap that stranded members, the reset dependency and ordering, the code lifecycle across retries, snapshot-order poisoning by a stolen K_gw, atomic code spending, the same-second stale_snapshot gap, and equal-seq conflict being Discovery-only.
  • oxfmt --check and git diff --check pass on the changed docs.

@clawsweeper

clawsweeper Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

OpenClaw-Publication: f36a0807-4748-4b02-933b-ec5b1bc1df80
@clawsweeper clawsweeper Bot added clawsweeper:intake:docs Preliminary submission classification; full source review pending. P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed clawsweeper:intake:docs Preliminary submission classification; full source review pending. labels Nov 9, 2026
@clawsweeper

clawsweeper Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: stale review; fresh review needed.

Summary
The latest durable ClawSweeper review was for head 6ec70bafac7a29e144a8b8992c74eb3835f2d410, but the PR head is now 4709c296d7caf8f832096e1b6bd39df534ba5312. Its old verdict and PR readiness labels are no longer current.

Next step
Comment @clawsweeper re-review when the current head is ready; pushes after the first review are not reviewed automatically.

Review history (1 earlier review cycle)
  • reviewed 2026-11-09T17:25:41.210Z sha 6ec70ba :: needs maintainer review before merge. :: none

@clawsweeper clawsweeper Bot removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Nov 10, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P2 Normal backlog priority with limited blast radius. size: M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant