Repository navigation
fix: keep invited collaborators from loosening your session's guardrails or approving your commands - #201615
Conversation
…ls or approving your commands OpenClaw-Publication: f9a4c13b-0902-8399-be8a-4d61e7cf36d3
|
🦞👀 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 changesRestricts invited collaborators to tightening session permissions and accessing approvals raised by their own profile. Example: Alice is invited to Morgan's guarded session and has operator.write and operator.approvals.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this maintainer-authored PR addresses an invitation-authority gap still present on main, and review found no definite introduced bug. Priority: P2 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherThe Gateway combines authenticated profile roles, session membership, and approval requester records to authorize session mutations, approval RPCs, events, and notifications. flowchart TD
A[Authenticated caller] --> B[Profile role and session membership]
B --> C[Session permission owner]
B --> D[Approval access owner]
E[Admitted turn identity] --> F[Approval requester storage]
F --> D
C --> G[Session mutation]
D --> H[RPC events and notifications]
Technical reviewBest possible solution: Keep the invite-only restriction in the shared permission and approval owners, retaining existing reviewer checks and nullable historical attribution. Do we have a high-confidence way to reproduce the issue? Main's approval owner filters session readability without checking which profile raised an approval, and the supplied Gateway regressions exercise the corresponding permission and approval paths; no target code was run during this review. Is this the best way to solve the issue? The change addresses the authority decision through existing shared owners and persists the otherwise unavailable initiating profile without inventing historical identities. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against c2e7b54ab6f5. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfacePR surface statistics unavailable: the file list is incomplete. 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 (9 earlier review cycles; latest 8 shown)
Reviewed November 20, 2026, 4:29 PM ET / 21:29 UTC (Revision 10). |
OpenClaw-Publication: 8dd17d3d-5a1b-83fa-9003-8948b887e9f1
OpenClaw-Publication: 9980e439-8848-81ae-8354-84b5d835e157
OpenClaw-Publication: 19bb00ba-605a-8569-9151-9f51248e5b70
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
OpenClaw-Publication: 2a025e42-e7f9-87fe-bf53-52b659019b3b
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Merged via explicitly authorized admin squash with attributed pre-existing CI failures.
|
…ils or approving your commands (openclaw#201615) * fix(gateway): fence shared-session permission and approval authority * fix: keep shared collaborators from loosening your session's guardrails or approving your commands OpenClaw-Publication: f9a4c13b-0902-8399-be8a-4d61e7cf36d3 * fix(gateway): preserve approval replay and align ownership fixtures * Publish openclaw/nova-crab-2 OpenClaw-Publication: 8dd17d3d-5a1b-83fa-9003-8948b887e9f1 * fix(gateway): enforce profile boundary for legacy approval readers * Publish openclaw/nova-crab-2 OpenClaw-Publication: 9980e439-8848-81ae-8354-84b5d835e157 * fix(gateway): preserve profile authority through approval commits * Publish openclaw/nova-crab-2 OpenClaw-Publication: 7cf0b931-8265-821e-9078-285cf72c0512 * test(gateway): pin invite-scoped compatibility matrix Real Gateway matrix is red before scope correction: 41 of 137 cells fail on c2ed2bc. Covers named roles, actual memberships, creator/admin, legacy unprofiled and iOS device authority, sessionless node approvals, and deleted-source history. Main source mutation denials for nonmember view/suggest approvers remain expected. * fix(gateway): limit member safeguards to invited session access * Publish openclaw/nova-crab-2 OpenClaw-Publication: 8c9daaa2-7c3f-8027-aeab-95470f726d0e * fix(gateway): use session keys for permission authority * Publish openclaw/nova-crab-2 OpenClaw-Publication: 5e4432dd-2a20-8681-b39f-b27a5d75e771 * fix(gateway): preserve reset lifecycle rejection ordering * Publish openclaw/nova-crab-2 OpenClaw-Publication: e133d313-82c9-8ff8-b4c4-352e2179b909 * Publish openclaw/nova-crab-2 OpenClaw-Publication: dacc1d51-af59-8958-a2e1-67c848cb9e2b * test(gateway): preserve lazy approval mock exports * Publish openclaw/nova-crab-2 OpenClaw-Publication: 19bb00ba-605a-8569-9151-9f51248e5b70 * Publish openclaw/nova-crab-2 OpenClaw-Publication: 2a025e42-e7f9-87fe-bf53-52b659019b3b
…9388 stage 4) Absorbs openclaw/openclaw main 5a3e6b1 (473 commits past the absorbed 1129d4c, which is the merge-base) into 16541aa, so openclaw#129388's presentation can fast-forward. rerere was off for the merge; nothing arrived pre-staged. 24 content conflicts: - Generated, regenerated rather than hand-merged: config-baseline counts and sha256 (config:docs:gen; core 2667 + fork 17 = 2684), gateway predicates.js (gateway:validators:gen), and the four PostgreSQL state catalogs (db:postgres:gen). - package.json schemaVersions: state 41 (upstream openclaw#201615) with the fork's agent 44 (continuation's recipient-authority step; upstream's agent ladder is still at 43). - plugin-sdk-surface-report budgets: upstream's +2 (openclaw#203044) plus the fork's unchanged +11 / +4. - subagent-registry-queries: upstream openclaw#203102 folded excludeSuspendedDelivery into excludeSettledDelivery; T1's unconditional suspended-unbound skip stays. - subagent-registry-suspended-delivery: upstream openclaw#202732 restructured the discard into discardExpiredSubagentDelivery with the expiry notice in a finally block; T1's suspended-unbound outcome still notifies no session. - agent-runner-result-accounting, update-command-service-command, session-reset-service, assistant-answer-text, state-port.postgres.test, vitest.database-worker-core-paths: both sides kept (imports, openclaw#201615 permission checks beside the reset retention, openclaw#203174's Responses-only signed selection with the fork's per-item answers, both port fixtures, both worker-path lists). - update-cli tests (openclaw#200578 deleted the in-place Git runner): upstream's deletions win; the fork's compiler-flag argv matchers are carried onto upstream's rewritten checks. Refs openclaw#129388 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Upstream openclaw#201615 (2b5f1a8) bumped the state schema to 41 and pinned getOpenClawStatePredecessorSchema(40) to the sha256 of its own v40 schema (fcbb0021…), so a v40 database stays recognized for the v41 step. The fork's state schema also carries the continuation tables, so its v40 predecessor hashes differently, exactly as the file's other historical hashes already do (the fork's comment beside them). The invariant still holds for fork seats: the head's v40 predecessor is byte-identical to the v40 schema the preceding build 16541aa shipped (both e44990102d31…; upstream's pre-openclaw#201615 v40 is fcbb0021…). The pin now names that hash. RED at e293165 (db:postgres:check's first step, 1 failed / 209), GREEN here (210/210). Refs openclaw#129388 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Related: #201526 (part D)
What Problem This Solves
When you invite someone into a session (a role with
sessions.others: "invited"plus a session membership), they could change its permission mode to something looser than you set, for example from Ask me to Auto-review, and approve shell commands your own turns were waiting on. Inviting a collaborator could quietly remove the guardrails you chose.User Impact
User impact: only invited collaborators are affected. For someone whose access to a session comes from an invitation:
Everyone else keeps exactly the behavior on
main: the session creator, admins, teammates whose role grantssessions.othersview/suggest/write, unprofiled paired devices, non-admin iOS approvers and their pushes, sessionless and node approvals, history from deleted sessions, and older sessions with no recorded creator. These rules only ever add a restriction for invitees; they never replace an existing device, reviewer or custody check.Why This Change Was Made
This is the scoped version chosen after an audit showed the earlier global version changed behavior for team roles, iOS approvers, unprofiled devices and sessionless approvals. Invited access is decided from the resolved Gateway profile role policy plus actual session membership (the profile role is the single authority since #201610), so it applies the same way whether the invitee arrives through OpenClaw ID, Cloudflare Access or a trusted proxy.
Permission-mode changes are checked once, by the shared session patch owner, so the single and bulk RPC, tool, create-adoption and reset paths follow the same rule. Approvals record which profile's turn raised them; a schema 41 migration (SQLite and PostgreSQL) adds the nullable
requested_by_profile_idcolumn with no backfill. Only invitees consult it.Evidence
Compatibility matrix (written first, red on the previous head, now green): a real-Gateway matrix of 137 cells. Rows: creator, admin, team
view/suggest/write, invited collaborator (withoperator.write, and withoperator.approvals), unprofiled non-admin device, non-admin iOS approver, sessionless/node approval, deleted-session history, legacy owner session with no creator. Columns: loosen mode, reset to default, tighten mode, list/get/resolve another person's approval, list/resolve own approval, push eligibility. 41 cells failed against the previous global head; all 137 pass now. Every non-invitee cell matchesmain.Call sites: 30 production paths were classified (session permission authorization, patch/create/reset, approval lookup/list/get/wait/resolve, generic approval records, history, events, web and iOS push). Each either applies the invite-only deny filter or keeps main's check unchanged.
Local verification on this head:
Not certified locally (bounded runs timed out during compilation/teardown on this host), so CI is the authority for: the wider approval consumer sweep, the plugin-approval routing E2E, and the final typed-lint subset.
Test-line allocation: recorded in
config/test-lines-allocations/201526-session-member-authority.txtfor the real-Gateway matrix and approval boundary coverage; these are new security behaviors with no existing tests to extend.Commands
Plus the approval, push, persistence, migration (SQLite and PostgreSQL) and generated-schema suites.
CI on the final head (
d2ed75fa, run 44819517110): landed with these failures, none caused by this PR:checks-node-changed-compact-large-19:src/agents/mcp-config-mutation.test.ts(keep/replace custody) fails identically onmainf6298a19.checks-node-compact-small-5and-12: runner apt setup failed (ondrej/php PPA label change) before any test.android-access-native (4096, google_apis): emulator could not load the SDKdevices.xmlbefore any test.checks-ui-e2e (2/4): skills and skill-settings asset-request bounds.ui/is unchanged by this PR and the shard passed on the previous head.ios-screenshots:testReleaseChatScreenshot.apps/ios/is unchanged by this PR and the job passed on the previous head with the same Swift change.Intersect shared OpenClawKit dead code(not required): flags two UI declarations this PR doesn't reference.Proof limits: the packaged upgrade proof ran on
c115c774, not the final head, and there is no live shipped-Gateway/real-model run.🦞 Made with OpenClaw