You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 036e0d9
Browse filesBrowse the repository at this point in the historyBrowse files
fix(sessions): keep creator rights tied to qualified profiles (#132300)
* fix(sessions): preserve qualified creator authority
Record source-qualified creator provenance at trusted producers and preserve
creator recognition through verified profile merges. Keep responsibility and
participant history separate from authority, migrate approved agent19/state14
records, and isolate required non-profile sandboxes by canonical session.
Prepare verified aliases within synchronous authorization passes and recheck
catalog visibility against the current canonical session instance.
AI-assisted maintainer repair.
Fixes#132243
* fix(sessions): align creator migration owners and contract tests
Keep the approved agent19/state14 migration SQL in the existing database
migration owners without changing its behavior. Update source-qualified
creator fixtures and schema assertions, and remove superseded sandbox and
same-version predecessor expectations. Preserve current lifecycle and
container-journal reopen coverage.
AI-assisted maintainer repair. Follow-up verification for #132243.
* fix(doctor): migrate supported post-media agent schemas
Let the canonical agent schema owner admit and migrate supported post-media
revisions instead of enumerating them again in media repair. Keep metadata,
ownership, integrity, and stopped-writer checks in their existing owners.
Cover v17/v18 Doctor routing, qualified creator attribution, retained goals
and participants, idempotence, and future/mismatched schema refusal. Align the
fork profile fixture and include the accepted native schema and presence
promise-ownership test corrections for #132300.
Copy file name to clipboardExpand all lines: docs/concepts/multi-user.md
+5-1Lines changed: 5 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,7 +19,7 @@ If people must not access each other's sessions, tools, credentials, or files, g
19
19
20
20
Every session carries up to three layers of attribution:
21
21
22
-
-**Creator** (immutable): new sessions record a write-once `createdActor` when the creation path can prove who caused it. Authenticated people use their durable Gateway profile id; sessions spawned by an agent record that agent's id. Sessions created without a proven actor remain unattributed. Sharing and visibility authority stays anchored on the creator, even after the owner changes.
22
+
-**Creator** (immutable): new sessions record a write-once `createdActor` when the creation path can prove who caused it. Human creators retain their source: a verified Gateway profile, a channel sender, or unknown historical attribution. Only a profile creator can receive implicit creator access, including through a verified profile merge. Matching channel, agent, or system IDs do not identify that person. Sharing and visibility authority stays anchored on the creator, even after the owner changes.
23
23
-**Owner** (assignable): the person or agent currently responsible for the session, in the style of a GitHub issue assignee. It defaults to the creator and can be reassigned at any time; the assignment records who reassigned it and when. The sidebar avatar, the owner filter, and People sorting all follow the current owner.
24
24
-**Participants** (history): authenticated people, channel senders, and requesting agents whose accepted input targets the session. The session's own agent and passive viewers are never recorded. New-identity admission is bounded at 32 records per session; repair can preserve larger existing histories. Participation is recorded best-effort in the background, so it never delays a turn.
25
25
@@ -38,6 +38,8 @@ Both paths call the Gateway method `sessions.assignOwner` (`operator.write`). As
38
38
39
39
Reassigning the owner changes responsibility and display only. It does not transfer sharing authority (which stays with the creator) and does not grant or remove any access.
40
40
41
+
Creator source follows scheduled jobs and inherited creation policies; a required sandbox is a restriction, not evidence of profile identity. Historical automations that lost their creator source retain their attribution and content, but do not receive a guessed profile grant. An administrator can manage their sharing or create a new, explicitly attributed session. Assigning an owner does not repair creator authority. See [Creator namespace migration](/reference/database-schemas#creator-namespace-migration) before upgrading.
42
+
41
43
## Finding sessions by owner
42
44
43
45
The sidebar's session filter menu gains an **Owners** section when ownership is visible:
@@ -88,6 +90,8 @@ This state improves continuity; it is not an authorization or isolation boundary
88
90
89
91
Start a session as a draft to keep work in progress out of teammates' sidebars until you publish it. Drafts are never hidden from admins, who see other people's drafts with a faded ghost marker. This is a coordination feature, not a security boundary.
90
92
93
+
Catalog listings and progress updates recheck current session visibility for each recipient. Cached provider results do not preserve access to a session that has become draft or incognito. An adopted thread remains bound to its original session instance and plugin ownership; deleting and recreating a session key does not transfer the old thread to the new creator. Catalog reads and mutations also recheck the stored session after provider enumeration.
94
+
91
95
## Turn attribution
92
96
93
97
Turn sender attribution is best-effort. Steering can merge input into an active turn, so the transcript cannot always represent each person's contribution as a separate turn. Participant history records that an actor prompted the session, not which words were theirs.
Copy file name to clipboardExpand all lines: docs/gateway/sandboxing.md
+16-5Lines changed: 16 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -51,13 +51,24 @@ execution or Gateway/node host overrides cannot bypass it. The default
51
51
-`session`: one container per session.
52
52
-`shared`: one container shared by all sandboxed sessions (per-agent `docker`/`ssh`/`browser` overrides are ignored under this scope).
53
53
54
-
Sessions whose creator role requires sandboxing use the creator's authenticated
55
-
principal as their isolation boundary instead. Different guests on the same
56
-
agent receive separate sandbox environments and workspaces, regardless of the
57
-
configured scope. Sessions created by the same guest reuse that guest's
58
-
environment and workspace, including when the configured scope is `session`.
54
+
Required sandboxes with proven Gateway-profile creators use that profile as
55
+
their isolation boundary. Different guests on the same agent receive separate
56
+
environments and workspaces, regardless of configured scope. Sessions created
57
+
by the same profile reuse its existing environment and workspace, including
58
+
when the configured scope is `session`; this upgrade does not rekey those paths.
59
+
Channel, unknown, and other non-profile creators instead receive a separate
60
+
required sandbox per canonical session. A matching raw ID cannot reuse a
61
+
profile's resources. Required sandboxing and the read-only workspace cap remain
62
+
in force; backend failure never falls back to host execution.
59
63
Sessions without a role-required sandbox keep the configured scope behavior.
60
64
65
+
The [creator namespace migration](/reference/database-schemas#creator-namespace-migration)
66
+
does not delete or adopt old ambiguous workspaces or containers. Such sessions
67
+
start with separate resources after upgrade. Preserve any needed old data
68
+
before normal sandbox retention or manual cleanup, then recover selected files
69
+
explicitly as an operator; do not copy an entire ambiguous environment into a
70
+
trusted profile workspace automatically.
71
+
61
72
Non-shared runtime identity also includes the resolved agent workspace path. This prevents co-hosted workspaces that reuse the same agent or session keys from sharing Docker, browser, SSH, OpenShell, or plugin-provided sandbox state. `shared` scope intentionally remains workspace-independent.
62
73
63
74
The first use after upgrading from an older release creates non-shared runtimes and sandbox workspaces under the workspace-qualified identity. Existing non-shared runtimes are not adopted; this is an intentional one-time reset. They can age out through configured prune settings or be removed with `openclaw sandbox recreate`; the next use provisions the current identity.
| 17 | Tenant-free per-agent lease table retired after the last writer and routing arm were removed ([#121113](https://github.com/openclaw/openclaw/pull/121113), [#121615](https://github.com/openclaw/openclaw/pull/121615)) | Unreleased |
143
143
| 18 | Canonical participant identity namespaces and explicit unknown historical input times in the existing session-owned aggregate ([#130661](https://github.com/openclaw/openclaw/issues/130661)) | Unreleased |
Version 3 was an unshipped development step folded into version 4.
146
147
148
+
### Creator namespace migration
149
+
150
+
Agent schema **19** and shared-state schema **14** add a source discriminator to human creator actors in the existing session and cron JSON records. No table, sidecar, or separate identity ledger is added. The session node remains the immutable creator owner; mutable owner assignments and explicit sharing grants are unchanged.
151
+
152
+
Historical human creators stamped directly by `operator` or `run` creation become `profile`; channel creation becomes `channel`. Origin-losing cron, inherited spawn or Talk, legacy `createdBy`, and missing-source history remain `unknown`. The migration preserves IDs, attribution, creation times, content, and existing sandbox restrictions. A UUID, profile lookup, participant, current route, or required sandbox never supplies missing creator authority. Recovery from incomplete physical projections also produces unknown human attribution.
153
+
154
+
Before upgrading, stop the Gateway and all other writers, then [create and verify a WAL-aware backup](/cli/backup). Run `openclaw doctor --fix` with the new build. The agent migration retains the stopped-writer maintenance gate and runs after the schema-18 participant migration, without rebuilding already migrated participant rows. Canonical data and both schema markers commit in the owning database transaction. Shared-state and agent databases are separate transactions; if one fails, keep writers stopped and rerun Doctor before starting the Gateway.
155
+
156
+
Older builds refuse the new versions. For rollback, stop all writers and restore the verified pre-upgrade backups with their matching older build. Do not decrement either schema marker: an older writer cannot maintain the creator-source contract. Unknown historical provenance is irrecoverable from the stored ID alone. Administrators retain sharing management access; assigning responsibility does not restore an implicit creator grant.
157
+
158
+
Required sandbox resources keep their existing keys for proven profile creators. Channel and unknown creators instead use canonical-session isolation, with no new persisted principal field. Their old ambiguous resources are left untouched by migration, not automatically adopted or copied; operators must recover needed files explicitly before ordinary retention or cleanup. See [sandbox scope and recovery](/gateway/sandboxing#modes-scope-and-backend).
159
+
147
160
### Participant identity migration
148
161
149
162
Agent schema 18 rebuilds `session_participants` with the unique key `(session_key, identity_namespace, actor_id)`. The raw actor ID remains separate from its namespace. This replaces the old `(session_key, actor_type, actor_id)` key; it is not a same-version additive change. Both schema markers advance together. No companion table or per-input ledger is added.
@@ -173,6 +186,7 @@ Normal admission remains bounded at 32 identities. Same-store alias repair sums
| 12 | Thirteen singleton/cache tables retired; durable state folded into config_machine_state | Unreleased |
175
188
| 13 | State consolidation: cron jobs and subagent runs become JSON-canonical (113 projection columns, five unused indexes removed); installed_plugin_index and shared auth-profile singletons fold into config_machine_state; workspace_attestations merges into workspace_setup_state; gateway origin device tokens become canonical | Unreleased |
0 commit comments