Skip to content

feat(auth): allow write access without personal credential enrollment - #179959

Closed
roboclaw-bot wants to merge 6 commits into
mainfrom
openclaw/adding-a-scope-without-personal-credential-enrollment
Closed

roboclaw-bot wants to merge 6 commits into
mainfrom
openclaw/adding-a-scope-without-personal-credential-enrollment

Conversation

@roboclaw-bot

@roboclaw-bot roboclaw-bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Collaborator

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-enrollment subset 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

Full write permits personal GitHub credential enrollment

After — operator.write.no-credential-enrollment

Restricted write disables personal GitHub credential enrollment and explains that identity and co-author credit remain available

Preserved — verified identity and editable co-author credit under restricted write

Verified octocat identity and enabled co-author preference under restricted write

Contributor credit

Co-designed with @sallyom.

Worked on by

Work sessions

Worked on by:
- @sallyom

Co-authored-by: sallyom <[email protected]>
OpenClaw-Publication: fc5a86a4-b843-42c0-9de9-deda4ada7a04
@clawsweeper

clawsweeper Bot commented Oct 21, 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-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation channel: voice-call Channel integration: voice-call app: android App: android app: ios App: ios app: macos App: macos app: web-ui App: web-ui gateway Gateway runtime agents Agent runtime and tooling plugin: workboard plugin: beam Beam session sharing plugin extensions: browser plugin: team-reports plugin: mcp-relay size: XL labels Oct 21, 2026
@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. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. 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 Oct 21, 2026
@clawsweeper

clawsweeper Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge.

What this changes

This PR adds operator grants that allow ordinary actions while withholding personal credential enrollment.

Example: A teammate receives only operator.write.no-credential-enrollment.

  • Before: Ordinary write access also permits enrolling personal provider and GitHub credentials.
  • After: The teammate can send messages and select saved accounts, while personal credential enrollment is denied.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) Useful implementation with substantive final-effect proof and no discrete finding; required upgrade qualification remains incomplete.
Proof confidence 🐚 platinum hermit (4/6) Sufficient (live_output): The source-bound follow-up addresses the previous authority-chain request with allowed provider enrollment through real WebSocket and storage owners, GitHub loopback HTTP through production lifecycle/parser owners, and withdrawal before dispatch or persistence; inspected screenshots support the visible controls. This is sufficient authority evidence for this collaborator-authored PR, without claiming external OAuth or native-device qualification. Stable-to-head account and selection upgrade evidence remains absent.
Patch quality 🦐 gold shrimp (3/6) No actionable review findings were identified.

Product

Kind: Feature · Worth it: Yes · Fix scope: Complete
User problem: Shared Gateway operators cannot grant ordinary write access while withholding personal credential enrollment.
Reason: The maintainer-authored direction addresses a concrete managed-credential use case while retaining saved-account use, attribution, and legacy grants.

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
Reviewed head: a7d517ce8456b9df0feaed8a817a21083745e3bb

Before merge

  • 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: The author must record a v2026.10.6-to-head upgrade preserving existing grants, saved accounts, and session selections, with credentials and private endpoints redacted.
Agent review details

How this fits together

The 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]
Loading

Technical review

Best 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

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

PR surface

PR surface statistics unavailable: the file list is incomplete.

Review metrics

Metric Value Why it matters
New permission values 2 Adds non-enrolling read and write scope values to existing grant configuration, without a new configuration key or policy store.

Labels

Label changes:

No label changes.

Label justifications:

  • P2: An opt-in improvement for shared Gateway operators with limited rollout exposure.
  • merge-risk: 🚨 compatibility: Changes permission interpretation across public plugin and client surfaces; legacy grants are intentionally retained, while stable-upgrade qualification remains outstanding.
  • merge-risk: 🚨 security-boundary: Changes which grants reach credential enrollment and ordinary side effects; the accepted additive-grant behavior and final-effect checks are explicit.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🐚 platinum hermit and patch quality is 🦐 gold shrimp.
  • proof: sufficient: Contributor real behavior proof is sufficient.

Rank-up moves

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

  • Complete the account-preserving stable-release upgrade scenario identified in the compatibility assessment.

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.

History

Review history (2 earlier review cycles)
  • reviewed 2026-10-21T22:23:16.103Z sha 53deb05 :: needs real behavior proof before merge. :: none
  • reviewed 2026-10-22T21:44:18.527Z sha 3150e35 :: needs real behavior proof before merge. :: none

Reviewed October 22, 2026, 8:00 PM ET / October 23, 2026, 00:00 UTC (Revision 3).

@roboclaw-bot roboclaw-bot changed the title feat(auth): allow write access without personal provider enrollment feat(auth): allow write access without personal credential enrollment Oct 22, 2026
Worked on by:
- @sallyom

Co-authored-by: sallyom <[email protected]>
OpenClaw-Publication: 074b911c-86d1-4aed-a9ff-36ac12b01e58
@roboclaw-bot
roboclaw-bot force-pushed the openclaw/adding-a-scope-without-personal-credential-enrollment branch from 17e456c to 3150e35 Compare October 22, 2026 15:02
@roboclaw-bot

Copy link
Copy Markdown
Collaborator Author

Live Gateway proof — 3150e352715d

Exercised the production-built Control UI in Chromium 156 against the real Gateway server implementation in an isolated test fork. HTTP/WebSocket requests and replies were real, not mocked. The fixture used synthetic trusted-proxy users and the normal role ceiling over the browser’s broader device grants.

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

@sallyom

sallyom commented Oct 22, 2026

Copy link
Copy Markdown
Contributor

@clawsweeper rereview

@clawsweeper

clawsweeper Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:feature Preliminary submission classification; full source review pending. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. clawsweeper:intake:feature Preliminary submission classification; full source review pending. labels Oct 22, 2026
roboclaw-bot and others added 3 commits October 22, 2026 23:44
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]>
@roboclaw-bot
roboclaw-bot force-pushed the openclaw/adding-a-scope-without-personal-credential-enrollment branch from 3150e35 to 65e3fe2 Compare October 22, 2026 23:50
Worked on by:
- @sallyom

Co-authored-by: sallyom <[email protected]>
OpenClaw-Publication: f9c370fe-bea1-4673-8596-ac3f545b679f
@roboclaw-bot

Copy link
Copy Markdown
Collaborator Author

Enrollment-effect review follow-up — a7d517ce8456b9df0feaed8a817a21083745e3bb

Rebased onto main a68d0eb252586b11412bced0ef41e41e5fc6e798 while preserving the existing scope lattice and profile/UI owner refactors. The draft and existing visual evidence are retained. GitHub reports the published head mergeable with no conflicts. Tests bind to its exact source tree; the final managed publication commit only records publication metadata.

Reproduced and repaired

The shared GitHub device-flow helper dropped the OAuth transport’s existing live-authority callback. With authority withdrawn during transport preparation, four qualified regressions observed an unwanted physical POST. This was a pre-existing dispatch gap; the existing installation/store guards were not shown to permit a new credential commit.

The repair carries the existing authority assertion through start/poll to the final HTTP-dispatch boundary for personal and System/agent callers. It adds no credential store, policy flag, or fallback identity.

Executed proof

  • GitHub: all 10 final-effect scenarios pass using the real personal authorization owner, lifecycle, HTTP form/parser, managed profile installation and SQLite persistence. A synthetic loopback issuer supplies HTTP responses; it is not genuine external GitHub OAuth. Successful installation/selection, four pre-dispatch withdrawals, cancellation, and downgrade during account verification are covered.
  • Provider: all 3 scenarios pass with shipped Anthropic API-key discovery/execution and real private storage. Real WebSocket enrollment succeeds with a synthetic key; restricted users retain saved-account selection/unlink. Pending-answer withdrawal is denied. Instrumented transaction/commit admission cases forward to the original SQLite owner and commit neither credential nor link. No remote key validity or provider inference is claimed.
  • Final repair rerun: 54 tests pass in 108.24s including compilation; earlier 15-file focused matrix: 295 tests pass in 162.32s. These are separate runs, not 349 distinct tests. The final profile test cleanup rerun passes 31 tests (8.67s); six conflict-resolution consumer files pass 109 tests (48.20s).
  • Static gates and independent review: core and Control UI production types, Gateway root/server and profile-page test types, targeted typed lint, formatting, and whitespace pass; canonical independent Auto Review found no actionable P0–P2 findings in the reviewed integration/repair (static review, no reviewer test execution).

Remaining qualification

The earlier live browser/Gateway recording remains bound to its historical source; it is not a recording of this refresh. Genuine external OAuth, native device builds, and the stable 2026.10.6 account/selection upgrade lane have not been run. The upgrade lane needs Docker, absent on this host; a Podman substitution awaits Sally’s decision. No schema/data migration is introduced, but that does not establish a stable-to-main upgrade result.

@roboclaw-bot

Copy link
Copy Markdown
Collaborator Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:feature Preliminary submission classification; full source review pending. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. proof: sufficient ClawSweeper judged the real behavior proof convincing. and removed status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. clawsweeper:intake:feature Preliminary submission classification; full source review pending. labels Oct 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling app: android App: android app: ios App: ios app: macos App: macos app: web-ui App: web-ui channel: voice-call Channel integration: voice-call docs Improvements or additions to documentation extensions: browser gateway Gateway runtime merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. P2 Normal backlog priority with limited blast radius. plugin: beam Beam session sharing plugin plugin: mcp-relay plugin: team-reports plugin: workboard proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: XL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants