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 09830c3
Browse filesBrowse the repository at this point in the historyBrowse files
fix(plugin-security): a delegated agent's own leg does not collect an object's declared default row scope
Ruling of record 6278784335 (letter B): the collection adds an object's
defaultRowScope on an empty collection except on a delegated principal's
own leg, the ceiling whose row bound is the delegator's leg (ADR-0090
D10). Without it, a platform administrator's agent read only the
administrator's own rows on the identity objects, where it read every row.
collectRLSPolicies takes the context it collects for as a private
parameter, threaded from its six callers; the test is the read door's
own (onBehalfOf.userId), in an unexported module function.
The ③.11 pin now asserts each delegated agent's served ids on both trees
(member, viewer, organisation admin and platform administrator), compares
every persona's read explain byte-for-byte, and its census reads the
collection per context, with an undelegated control.
Claude-Session: https://claude.ai/code/session_01FatVyDAFEST48jZDQcbheU
Co-authored-by: Claude <noreply@anthropic.com>
fix(plugin-security): a delegated agent's own leg does not collect an object's declared default row scope (#24341)
6
+
7
+
Clause-②: no
8
+
9
+
An agent acting on behalf of a user (ADR-0090 D10) is judged on two legs that the read door ANDs together: its own sets, which are a capability ceiling and carry no row policy, and its delegator's sets. Since the row-policy collection began applying an object's declared `defaultRowScope` where the held sets carry no row policy, the ceiling's silent leg collected that default too. Where the delegator's own leg is wider than the default, the agent then read fewer rows than its delegator. The platform administrator is the case in point: the administrator's own leg skips row policies on the identity objects, so an agent acting for the administrator would have read only the administrator's own rows there, where it read every row before.
10
+
11
+
The collection no longer adds an object's default on a delegated principal's own leg, so a ceiling's silence is not read as the object's default. The delegator's leg collects the default exactly as any principal's does, and a principal that acts for no one keeps the default whenever its sets are silent.
12
+
13
+
What moves, against `18.0.0-next.5`: on an object that declares `defaultRowScope`, an agent acting for a user reads the rows its delegator's side admits, and its explain output names no object default on the agent's side. Before this release's reader, that was already so.
14
+
15
+
**Unchanged.**
16
+
17
+
- A principal that acts for no one, a human or otherwise, collects an object's default when its sets carry no row policy for the object and operation, as before.
18
+
- The delegator's side, the superuser bypass, and every authored policy are judged as before.
Copy file name to clipboardExpand all lines: .changeset/24341-identity-objects-default-row-scope.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,7 +20,7 @@ The security plugin's row-policy collection applies an object's declared default
20
20
**Unchanged.**
21
21
22
22
- A deployment with the platform baseline (`member_default`, the default) serves every human exactly what it served before, on every one of the 23 objects and every operation: each human holds the baseline, and the baseline carries a policy for each object and operation. Measured on a booted composition with a member, a viewer, an organisation admin, a user in no organisation and the platform administrator, before and after the declarations.
23
-
- An MCP agent acting for a user reads the same rowsas before. Its ceiling set carries no row policy, so the declared default now applies on the agent's own side of the intersection, evaluated as the delegating user (the agent's `userId` is the delegator's). The explain output for such an agent now names the object default on that side.
23
+
- An MCP agent acting for a user reads the same rows, and gets the same explain output, as before. Its ceiling set carries no row policy, and the security plugin does not collect an object's declared default on a delegated principal's own side of the intersection (see the `@objectstack/plugin-security` entry), so the agent's rows stay bounded by its delegator's side alone. Measured on a booted composition, before and after the declarations, for the agents of a member, a viewer, an organisation admin and the platform administrator; the platform administrator's agent still reads every row.
24
24
- The platform administrator's superuser bypass is decided before any row policy is collected.
0 commit comments