Repository navigation
feat(openclaw-id): sign in with OpenClaw ID over a verified personal sign-in - #197559
Conversation
|
🦞👀 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 maintainer review before merge. What this changesAdds OpenClaw ID device-code sign-in for Control UI connections authenticated with a verified personal identity. Example: Alice opens the Control UI through a trusted proxy with OpenClaw ID Labs enabled.
Review scores
ProductKind: Feature · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this maintainer-authored feature addresses a demonstrated sign-in limitation, and review found no actionable introduced defect. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe Control UI sends authenticated account RPCs to the Gateway, which obtains a device grant from the configured issuer and returns the verified account and ID token to browser-owned account storage. flowchart LR
A[Personal browser connection] --> B[Gateway sign-in route]
B --> C[Existing sign-in owner]
C --> D[OpenClaw ID issuer]
D --> C
C --> E[Profile-bound account response]
E --> F[Browser account storage and menu]
Technical reviewBest possible solution: Extend the existing sign-in owner with the device grant while preserving loopback-only linking and the existing browser account format. Do we have a high-confidence way to reproduce the issue? Current main explicitly restricts account sign-in to loopback, and the supplied before screenshot demonstrates the disabled action over a personal connection; this review ran no target code. Is this the best way to solve the issue? The device grant addresses the issuer's loopback redirect restriction through the existing sign-in owner, and the lazy dialog keeps this optional flow off the normal boot path. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 46350dafd299. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +609, Tests +588, Docs +12, Generated 0, Other +4. Total +1213 across 26 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. Review metrics
LabelsLabel changes:
Label justifications:
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 HistoryReview history (3 earlier review cycles)Reviewed November 12, 2026, 10:20 AM ET / 15:20 UTC (Revision 4). |
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
…onnection that started it
5f6001b to
5bfe343
Compare
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
… declare popup sign-in - Device sign-in code and dialog strings load with the device sign-in dialog, keeping new/chat boot JS at main's size (+3 B against +460 B). - E2E menu and popup fixtures report accountSignIn: popup, as the loopback Gateway does. - Record the test-line growth for the sign-in security tests.
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Merged via squash.
|
…sign-in (openclaw#197559) * feat(openclaw-id): sign in with OpenClaw ID over a verified personal sign-in * fix(openclaw-id): read-scoped device sign-in method and sign-out guard from its start * fix(openclaw-id): release a device sign-in's token only to the live connection that started it * fix(openclaw-id): keep device sign-in off the boot path; e2e fixtures declare popup sign-in - Device sign-in code and dialog strings load with the device sign-in dialog, keeping new/chat boot JS at main's size (+3 B against +460 B). - E2E menu and popup fixtures report accountSignIn: popup, as the loopback Gateway does. - Record the test-line growth for the sign-in security tests.
Related: Linear OCF-509. Depends on openclaw/openclaw-id#30 (the issuer's device grant) and openclaw/openclaw-id#31 (lets real browsers approve a code). Both are merged and deployed to staging.
What Problem This Solves
Sign in with OpenClaw ID works only in a Control UI opened on the claw's own computer. Over Tailscale or another verified proxy, the menu says "Sign in on the computer that runs this claw", so setting up a remote claw needs an SSH tunnel.
User Impact
With the OpenClaw ID Labs switch on, a Control UI connection with a verified personal identity can sign in with OpenClaw ID and see the account in the identity menu. This covers Tailscale Serve, Cloudflare Access or another trusted proxy, and enterprise principals.
Why This Change Was Made
The issuer only redirects to the loopback callbacks the Control UI client registers, so a remote origin can't receive a redirect. For those connections the Gateway uses the issuer's device grant (RFC 8628) instead of the popup:
openclawId.account(device_begin) asks the issuer for a user code.device_pollasks the Gateway to poll the token endpoint.Design details:
openclawId.accountneedsoperator.read, because it changes no authority.openclawId.authoritykeepsoperator.admin, and itsaccount_*popup actions stay loopback-only.recordVerifiedAccount(the owner-name overwrite is OCF-512).openclawId.statusreportsaccountSignIn: "popup" | "device" | null, and the menu uses it.Evidence
Gateway tests:
account-sign-in.test.ts: device flow pacing, slow_down, single redemption, owner-bound polling, denial, and refusals for the wrong aud, an injected nonce, an expired token, or a device endpoint that is missing or off the issuer origin.server.openclaw-id-sign-in.test.ts: the route for each connection kind; real dispatch admitsopenclawId.accountwith read scope whileopenclawId.authorityneeds admin; personal connections can't use the popup or link-code actions; Labs off.labs-off.test.ts.5f6001b): six handler cases cover Labs switched off, the connection gone, the route changed, and the profile changed while the issuer answered. Four of them fail on the previous commit.UI tests (
account-menu.test.tsx,ui-error.test.ts): device sign-in to the stored account and the identity menu, sign-out during start, cancelled polling stops, no owner actions after a device sign-in.pnpm tsgo:core,pnpm tsgo:ui, the ui-components, gateway-root and gateway-other test typechecks, oxlint,check:control-ui-controllersandui:i18n:verifypass.Autoreview (Astra): no P0 or P1 findings. Both P2s are fixed: the method scope is now read, and the sign-out generation is captured before the attempt begins.
Boot size (
a46b423): the device sign-in code and dialog strings load with the device sign-in dialog. New and chat boot JS are within build variance of main (+3 B; the first full CI run measured +460 B).ui:check-performance:basepasses locally against main.E2E (
a46b423): the account-menu and popup fixtures reportaccountSignIn: "popup", as a loopback Gateway does. Both e2e files pass locally.Test lines:
config/test-lines-allocations/197559-openclaw-id-personal-sign-in.txtrecords 188 lines over the allowance. Device sign-in over a personal connection is security-sensitive, so the tests cover:Live proof against staging OpenClaw ID
Real Gateways built from this branch, with headless Chromium. The personal identity comes from a trusted proxy on the same host (
x-forwarded-user), so the browser connects as a named person, not as the claw's own computer.OpenClaw ID testnet, head
5f6001b. Thegatewaylab host in us-west-2 ran a throwaway Gateway with its own port and state directory. It didn't touch the host's live claw, and everything was removed afterwards. The browser reached it through SSM port forwards.state_mismatch; the owner's code stays pendingstate_mismatchMac Studio, base
082ed658and head5f6001b.accountSignIn: null,device_begin→not_personal_connection)The testnet Gateway installed only core runtime dependencies, because the host didn't have room for the agent SDK binaries. The ACP and Codex plugins therefore didn't load; neither is involved in sign-in. The redacted traces contain no tokens, codes or addresses.
082ed658, personal sign-in)