Skip to content

feat(openclaw-id): approve an app's node together with its owner device - #197573

Merged
jalehman merged 4 commits into
mainfrom
feat/ocid-owner-device-node
Nov 13, 2026
Merged

jalehman merged 4 commits into
mainfrom
feat/ocid-owner-device-node

Conversation

@jalehman

@jalehman jalehman commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

The Mac app is moving to sign-in-first OpenClaw ID enrollment: the owner signs in and approves the Mac as an owner device. Its node (running tools on the Mac) should come from that same approval, not a separate node invite and six-digit ceremony.

User Impact

  • When an owner approves a new device that also asks to run tools, the Control UI approval dialog names the claw and says " will also be able to run tools for : . Its own permissions still apply." One compared number and one click approve both the device and its node.
  • Approval copy now says "device" instead of "browser".
  • Owners get a toast when the recovery kit was used to add a device ("Your recovery kit was used to add "), with a link to Your devices.
  • Your devices tags such a device "Runs tools". The remove confirm says its node goes too.
  • Access lists the node as " · Your device", with a visible Stop using for tools action. That removes only the node; the device stays.

Why This Change Was Made

Protocol (unshipped v1-draft):

  • MembershipChange add_owner_device gains an optional node { peer_key, label, description }. The node is listed in node_peer_keys (tunnel and relay admission unchanged) as NodeRecord { owner_device: fp(D) } with no invite_id. Auto-pairing is bounded by the approved description, as for invited nodes.
  • The node key can never be a human key (R, any D, any owner or member peer key, including the new device's) or another node's key. A device has at most one node.
  • remove_node removes only the node. A re-add with node turns it back on.
  • Revoking the device (directly or through the device that approved it) or dropping it for inactivity removes its node.
  • SAS start gains an optional node { peer_key, description }, covered by the commitment and transcript, so the compared code binds the node key and the surface shown. Starts and changes without node are byte-identical to before.
  • The node is in the change rather than the owner cert because the approved surface could push the cert past Discovery's 16 KiB owner-certificate header limit.
  • isNodeDescription is exported for approvers.

Gateway: the owner link view exposes ownerDevice on nodes and nodePeerKey on owner devices.

Supersedes the operator-key approach of #197413 (closed). Discovery re-vendor: openclaw/discovery#13. Design: sign-in-first Mac enrollment (Josh, 2026-11-11).

Evidence

  • node scripts/run-vitest.mjs run packages/openclaw-id-protocol/src: 224/224.
    • New owner-device-node.test.ts: binding, human-key refusal, remove_node keeps the device, self re-add, revocation and approver cascade, inactivity cascade, kit path with kit_used, and a stolen node key.
    • SAS commitment binding test.
    • New fixture vector "owner approves a device with its node".
  • ui/src/lib/openclaw-id/owner-approval.test.ts: 15/15. New: node approved in the change; browser unchanged; malformed node ignored; kit-used notice names the device.
  • openclaw-id UI, lib, access-extension and Gateway authority/people suites: all pass.
  • tsgo:core, tsgo:ui, tsgo:extensions clean. pnpm check:changed: pass (exit 0).
  • Not yet: the Mac side (stacked separately), live staging proof, and Control UI screenshots (mockup renders exist; real before/after screenshots will be added before ready).

@clawsweeper

clawsweeper Bot commented Nov 12, 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.

@clawsweeper clawsweeper Bot added clawsweeper:intake:feature Preliminary submission classification; full source review pending. P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. and removed clawsweeper:intake:feature Preliminary submission classification; full source review pending. labels Nov 12, 2026
@clawsweeper

clawsweeper Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge.

What this changes

This PR lets one owner-device approval also enroll the app’s separate node key and manage its removal.

Example: An owner adds a Mac Studio that offers system.run and screen.capture.

  • Before: The Mac’s owner device and node require separate approval ceremonies.
  • After: One verification number approves both, and removing the device also removes its bound node.

Review scores

Measure Result What it means
Overall readiness 🧂 unranked krab (1/6) The implementation is coherent and no definite defect was found, but the changed authority boundary has only unit and mocked-I/O evidence.
Proof confidence 🧂 unranked krab (1/6) Real behavior proof is necessary before merge. See Before merge.
Patch quality 🦐 gold shrimp (3/6) Security review found an item that needs attention.

Product

Kind: Feature · Worth it: Yes · Fix scope: Complete
User problem: Adding a native app otherwise requires separate owner-device and node approval ceremonies.
Reason: The recorded direction supports one understandable approval while preserving separate human and node keys; this PR supplies the protocol and Control UI stage.

Merge readiness

⛔ Blocked before merge - 4 items remain

Keep this useful draft open: it implements the agreed combined approval design through existing owners, with no confirmed introduced defect.

Priority: P2
Reviewed head: dfef9f9d8951bbcf6602603d775998760b1ad476

Before merge

  • Add real behavior proof - Authority-chain proof required: the supplied evidence exercises protocol rules and a browser owner with mocked Gateway/mailbox I/O, while the body explicitly defers live staging and real screenshots. Show the app’s combined approval through the shipped UI and Gateway, successful bounded node use, rejection of human operations using only the node key, and rejection before final I/O after owner revocation or node replacement, including retained pairing work. Add real before/after screenshots and demonstrate existing invited nodes and new bound nodes surviving saved-state restart/upgrade. Redact credentials, IPs, phone numbers, and non-public endpoints. After adding proof, update the PR body, then request a new review with @clawsweeper re-review. The PR author or someone with repository write access can request it.
  • Resolve security review attention item - The new persistent node grant requires validation across its authorization and removal boundaries.
  • Resolve merge risk - Before merge, the author must establish that device revocation and node replacement invalidate retained node authority before subsequent pairing or tool I/O.
  • Add data-model compatibility proof - The review found that existing stored data may not work after upgrade. Show that existing data still loads and works with this change.

Findings

None.

Tests

  • Missing end-to-end proof: Missing shipped-flow approval and removal evidence, real UI before/after screenshots, final-effect rejection scenarios, and saved-state restart/upgrade validation.
Agent review details

How this fits together

The browser signs an owner-approved membership change; the shared protocol authority records device and node membership, and the Gateway supplies admission, pairing cleanup, and UI projections.

flowchart LR
  App[New app device] --> SAS[Browser verification]
  SAS --> Change[Signed membership change]
  Change --> Authority[Membership authority]
  Authority --> Admission[Gateway node admission]
  Authority --> Cleanup[Revocation and pairing cleanup]
  Authority --> UI[Devices and Access views]
Loading

Technical review

Best possible solution:

Retain the combined approval in the existing membership and pairing owners, then demonstrate the assembled enrollment and removal behavior.

Do we have a high-confidence way to reproduce the issue?

This is a new enrollment capability; source confirms that current main uses separate node invitations, and no target code was executed.

Is this the best way to solve the issue?

The approach fits the agreed direction and reuses existing signing, membership, admission, and cleanup owners without introducing a parallel authority system.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 3b13df5767c2.

Merge-risk options

Maintainer options:

  1. Complete authority-boundary validation (recommended)
    The author demonstrates successful combined enrollment and rejection of node-only human access, revoked-device access, and replaced-node access before final I/O.

Provenance checked

  • Owner-device approval and Control UI keeps the original intent (e29577b: Provide owner-controlled linking, browser approval, and device management through the Control UI.)
  • Node admission and lifecycle keeps the original intent (2198d6f: Keep nodes in a separate key class with owner approval, bounded first pairing, and explicit removal effects.)
  • Revocation sequence handling keeps the original intent (0809cf3: Prevent replayed revocations from removing later approvals without retaining an unbounded revocation history.)
  • Draft statement validation keeps the original intent (ec702e8: Use strict version-specific validation; the documented unshipped draft permits coordinated revisions in place.)
  • Approval and device-dialog presentation keeps the original intent (3492199: Improve request states and device management while preserving signing, authority, expiry, and removal behavior.)

Testing

Proof path: unit tests only.

Security

Needs attention: The new persistent node grant requires validation across its authorization and removal boundaries.

Evidence

What I checked:

Likely related people:

  • Vyctor H. Brzezowski: Raw commit 3492199 adds ui/src/components/openclaw-id/owner-devices-dialog.tsx:29 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 3492199a84ff; files: ui/src/components/openclaw-id/owner-devices-dialog.tsx)

PR surface

Source +392, Tests +275, Docs +30. Total +697 across 27 files. Added test files: 1.

View PR surface stats
Area Files Added Removed Net
Source 22 486 94 +392
Tests 3 279 4 +275
Docs 2 32 2 +30
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 27 797 100 +697

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Root-cause cluster

Relationship: canonical
Canonical: #197573
Summary: This PR replaces the earlier operator-key proposal with the recorded sign-in-first owner-device design.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Labels

Label changes:

No label changes.

Label justifications:

  • P2: This is a useful, scoped improvement to optional OpenClaw ID app enrollment.
  • merge-risk: 🚨 security-boundary: One approval now creates a persistent node grant and couples its removal to owner-device authority.
  • rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🦐 gold shrimp.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Add final-effect proof for node-only, revoked-device, and replaced-node principals before pairing or tool I/O.
  • Provide real UI screenshots and saved-state restart/upgrade evidence for the changed node records.

Rating scale

6/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.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed November 12, 2026, 1:11 AM ET / 06:11 UTC.

@jalehman
jalehman force-pushed the feat/ocid-owner-device-node branch from 19279d5 to b9918ba Compare November 13, 2026 20:53
@jalehman
jalehman marked this pull request as ready for review November 13, 2026 21:06
@jalehman
jalehman enabled auto-merge (squash) November 13, 2026 21:24
@jalehman
jalehman merged commit 4c86682 into main Nov 13, 2026
120 checks passed
@jalehman
jalehman deleted the feat/ocid-owner-device-node branch November 13, 2026 21:34
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 14, 2026
…ce (openclaw#197573)

* feat(openclaw-id): bind an app's node to its owner device approval

* feat(openclaw-id): approve an app's node with its owner device in the Control UI

* fix(openclaw-id): deduplicate owner approval tool labels

* fix(openclaw-id): say the recovery kit stays valid after unexpected use
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui gateway Gateway runtime merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. P2 Normal backlog priority with limited blast radius. plugin: openclaw-id-access rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. size: L status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant