Repository navigation
feat(auth): allow write access without personal credential enrollment - #179959
roboclaw-bot wants to merge 6 commits into
Conversation
Worked on by: - @sallyom Co-authored-by: sallyom <[email protected]> OpenClaw-Publication: fc5a86a4-b843-42c0-9de9-deda4ada7a04
|
🦞👀 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: blocked before merge. What this changesThis PR adds operator grants that allow ordinary actions while withholding personal credential enrollment. Example: A teammate receives only operator.write.no-credential-enrollment.
Review scores
ProductKind: Feature · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Blocked before merge - 1 item remains Keep this useful, maintainer-authored feature open; no concrete introduced correctness or security defect was found. Priority: P2 Before merge
FindingsNone. Tests
Agent review detailsHow this fits togetherThe shared scope owner translates authenticated device grants and role ceilings into permissions consumed by Gateway RPCs, tools, plugins, and client interfaces. flowchart TD
A[Authenticated operator] --> B[Device grants and role ceiling]
B --> C[Shared scope owner]
C --> D[Ordinary actions]
C --> E[Enrollment authorization]
E --> F[Provider HTTP dispatch]
F --> G[Credential storage]
Technical reviewBest possible solution: Retain the shared grant/action distinction and complete account-preserving upgrade qualification before merging. Do we have a high-confidence way to reproduce the issue? This is an opt-in capability request; current-main source confirms that ordinary write and personal enrollment authority are not yet separable by these grants. Is this the best way to solve the issue? The existing shared scope owner is the appropriate boundary, and the read subset is necessary because legacy read deliberately includes personal GitHub enrollment. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against c64eaf54ad0b. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
PR surfacePR surface statistics unavailable: the file list is incomplete. Review metrics
LabelsLabel changes: No label 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 HistoryReviewed October 22, 2026, 8:00 PM ET / October 23, 2026, 00:00 UTC (Revision 3). |
Worked on by: - @sallyom Co-authored-by: sallyom <[email protected]> OpenClaw-Publication: 074b911c-86d1-4aed-a9ff-36ac12b01e58
17e456c to
3150e35
Compare
Live Gateway proof —
|
| Observed behavior | Restricted write | Legacy writer |
|---|---|---|
| Negotiated grants | operator.write.no-credential-enrollment only |
operator.read, operator.write |
| Display-name change and API readback | Pass | Pass |
| Co-author preference change and API readback | Pass | Pass |
| Personal GitHub status read | Allowed | Allowed |
| Provider / GitHub setup buttons | Disabled | Enabled |
| Direct enrollment calls, bypassing UI controls | Four FORBIDDEN responses |
Passed authorization; deliberately invalid controls returned INVALID_REQUEST |
The restricted requests used structurally valid inputs for users.authConnect.start, users.authConnect.answer, users.github.authorize.start, and users.github.authorize.poll. Legacy controls intentionally stopped at schema validation so the proof did not start third-party OAuth or install credentials.
Boundary: this is live application/authorization proof, not external GitHub sign-in, a completed provider OAuth enrollment, OCE/OpenShell integration, or native-device qualification. The co-author preference was exercised; no real GitHub identity or publication credential was enrolled. No production Gateway or production source was changed. Both browser cases passed and the isolated runtime was cleaned up.
The recording is cropped for readability and concatenates restricted then legacy cases. Its diagnostic overlay displays the actual RPC outcomes.
Source binding and fixture qualification
- Source:
3150e352715d1517ad0614c004c00a472289bcd5. - Served UI entry bundle SHA-256:
74ec8f1dc5792cb4a610ae917c9cd056a8ac418947161a71c808f8e23c1a1876. - Final run: one real-Gateway scenario, two browser identities; passed in 51.19 seconds including build/preparation (24.75 seconds scenario execution).
- Recording SHA-256:
51dd6f4778cd99c6f962a7481d586b74895cd29c5b9c89061cd7e27012b460c1. - Fixture setup was corrected to remove an obsolete heartbeat field and to let initial profile-bound GitHub reads finish before changing the profile. Earlier setup attempts do not count as product proof; no production fix is claimed from the passing replay.
live-gateway-scope-proof.mp4
|
@clawsweeper rereview |
|
🦞👀 Re-review progress:
|
Preserve the restricted-write case while adopting the current Workboard fixture owner. Revalidated all four overlapping test files (95 tests), extension test types, targeted lint, and formatting. Co-authored-by: sallyom <[email protected]>
Worked on by: - @sallyom Co-authored-by: sallyom <[email protected]> OpenClaw-Publication: d5a089cf-bc27-4881-b998-e14a3b331e94
Retain live enrollment authority through the shared device-flow transport for personal and System/agent callers. Exercise successful enrollment and withdrawal through production parser, provider, managed-profile, and storage owners using synthetic credentials and a loopback issuer. Co-authored-by: sallyom <[email protected]>
3150e35 to
65e3fe2
Compare
Worked on by: - @sallyom Co-authored-by: sallyom <[email protected]> OpenClaw-Publication: f9c370fe-bea1-4673-8596-ac3f545b679f
Enrollment-effect review follow-up —
|
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
What Problem This Solves
Shared Gateway operators need ordinary write access without letting teammates enroll personal credentials outside their managed credential system.
Related: openclaw/openclaw-enterprise#3049
User Impact
Adds opt-in
operator.write.no-credential-enrollment. It blocks personal model-provider API-key/token/OAuth enrollment and personal GitHub publication OAuth enrollment, including reconnects and pending credential installation after permission is withdrawn. Ordinary writes, saved-account use, account status, and disconnection remain available. Shared credential setup remains admin-only.GitHub identity/co-authorship is not a publication credential. Verified GitHub identity from supported sign-in, profile editing, and the Git co-author credit preference remain available. This does not add a manual identity-linking/OAuth feature or make an arbitrary proxy username a verified GitHub account; OCE’s ingress must use an already-supported verified identity path.
Existing
operator.read,operator.write, admin, and default grants retain their behavior. Legacy read permits personal GitHub enrollment, so restricted roles must not also grant it. Grant only the non-enrolling scope, and review unioned device grants or apply a role ceiling. Adding legacy read restores GitHub enrollment; adding full write/admin restores all enrollment. Already-saved credentials, their refresh, and existing session selections are not revoked. This is an API guardrail, not isolation from unrestricted host execution.Why This Change Was Made
The shared scope owner keeps grant containment separate from action eligibility. Full write includes restricted write, never the reverse. Because legacy read includes GitHub enrollment, the
operator.read.no-credential-enrollmentsubset represents ordinary reads when read authority is capped by restricted write. Without that representable subset, intersection, cookies, or synthetic calls could restore enrollment or lose ordinary read capabilities.Enrollment retains its original full-write (model providers) or legacy-read (GitHub) authority through provider I/O and credential persistence. Existing Gateway, tool, UI/native, and bundled-plugin adapters consume ordinary action requirements without manufacturing broader grants. No new policy store, database migration, config switch, dependency, or protocol-version change. Simplification keeps one action/grant owner rather than a deny flag or parallel policy; ordinary-read adapters are necessary because legacy read itself enrolls GitHub credentials.
Evidence
2026-10-22 review refresh — a7d517c: rebased onto
a68d0eb252586b11412bced0ef41e41e5fc6e798, preserving the scope lattice and upstream self-profile/UI owner behavior. Addressed the production-effect proof request by reproducing four unwanted GitHub HTTP dispatches after authority withdrawal, then carrying the transport’s existing live-authority callback through personal and System/agent device flows. Existing credential-install/store guards remain intact.New execution proof: 10 GitHub final-effect cases pass through real lifecycle/parser/profile/SQLite owners using a synthetic loopback issuer; 3 shipped-provider/private-store cases pass, including successful real-WebSocket API-key enrollment and withdrawal at transaction/commit admission. This is not genuine external GitHub OAuth, remote provider key validity, or model inference. The final effect/lifecycle rerun passes 54 tests (108.24s); the profile cleanup rerun passes 31 tests (8.67s). The earlier 295-test focused run (162.32s) is separate, not an additional distinct-test count. Six conflict-resolution consumer files also pass 109 tests (48.20s).
Current local gates: core and Control UI production types, Gateway root/server and profile-page test types, targeted typed lint, formatting, and whitespace pass. Independent canonical Auto Review of the complete integration and final repair found no actionable P0–P2 findings; review was static and limited to supplied source/delta, not reviewer execution. Detailed review response.
Still unverified: genuine external OAuth, native builds/device execution, and the stable 2026.10.6 account/selection upgrade lane. The maintained upgrade runner requires Docker, unavailable here; a Podman substitution awaits Sally’s decision. No feature-owned schema migration is introduced, but an upgrade result is not inferred from that fact. Existing screenshots and the live recording below remain historical evidence, not captures of this refresh.
Live Gateway recording and result matrix on
3150e352715d: real browser/WebSocket requests, profile/co-author preference API readback, and four direct enrollment denials under restricted write. Synthetic trusted-proxy principals; legacy controls intentionally stop at schema validation. This supplements screenshots, not external OAuth or OCE/OpenShell qualification.2026-10-22 conflict rebase onto
c5650f3a5e59d6523c913a8ebfff2b787cf58435: preserved upstream profile/GitHub owner refactors and web-push inlining. The 27-file focused matrix passes (577 tests), four additional profile/GitHub lifecycle files pass (35 tests), and both production-built browser grant scenarios pass. Core/UI/extension production types, affected UI/Gateway and extension test types, targeted lint, i18n, formatting, and whitespace pass. Fresh canonical independent Auto Review completed scoped-clean at P0–P2 across the supplied candidate delta; no reviewer test execution or unchanged-context qualification is claimed. Earlier evidence below remains historical.A red probe against the previous provider-only implementation showed restricted write reaching GitHub device authorization. The retained router, real-Gateway, and lifecycle regressions now cover start/poll denial, ordinary status/profile reads, legacy-grant compatibility, and in-flight role withdrawal before credential installation.
Real Gateway coverage verifies broader grants attenuate to restricted write, ordinary profile changes succeed, and provider enrollment is denied. A GitHub-backed sign-in fixture verifies identity and co-author consent remain available while GitHub credential enrollment is forbidden.
Grant intersection/projection and plugin-cookie/relay checks protect against restoring legacy read. Device normalization does not synthesize that enrollment-bearing grant.
Production-built UI scenarios compare legacy full write with restricted write: provider and GitHub credential setup are disabled only for restricted access; verified identity, co-author preference edits, and saved-account selection/unlink remain available. Captures use synthetic profiles and compare grants on the same implementation, not two source revisions.
Focused backend, UI, and plugin tests pass after correcting a profile fixture; the two affected files were rerun successfully. The two production-built browser scenarios also pass. The initial 37-file batch took 206s, the final two-file repair run 36s, and browser proof 30s (2 tests; 5.2s test execution), excluding its 23s production build. These timings include cold compilation; no CI-seconds claim is made.
Core/UI/extension production types and focused Gateway/UI test types pass. Targeted lint, formatting, and whitespace checks pass. A direct lattice probe passed 4,648 implication/intersection checks. Canonical independent Auto Review completed scoped-clean at P0–P2; review was static and limited to the supplied delta/context, with no reviewer test execution claimed.
Main integration was needed for one Workboard fixture conflict. The resolution keeps both write-scope cases and the current fixture owner. All four overlapping test files pass after integration (95 tests, 128s); extension test types, targeted lint, formatting, and whitespace checks pass. Earlier broad focused checks and browser captures are pre-integration evidence; the integration changes no feature UI or scope semantics.
Retained qualification gaps: native Swift/Kotlin builds/device execution and real external OAuth were not run. Existing voice-call startup failures (21 cases) were reproduced on the original unchanged base
afa9bfdcf82a7e1bdc4f8baf1bd4cbaf3200a936; the suite is not claimed green. Broad CI is not yet qualification of this draft.UI comparison
Actual production-built Control UI with a synthetic profile, light theme, 1280×1400 viewport; tight crops make the changed controls visible. These compare grants on the same implementation, not two source revisions.
Before — existing operator.write
After — operator.write.no-credential-enrollment
Preserved — verified identity and editable co-author credit under restricted write
Contributor credit
Co-designed with @sallyom.
Worked on by
Work sessions