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
fix(rest,core): the single-kernel wiring derives the tenancy posture — an ex-member's org-stamped API key no longer reads or writes another organization's rows (#15365)
* wip(rest,core): single-kernel tenancy posture provider + refusal warn lines
* fix(rest,core): pins + ablation for the single-kernel posture seam; state the corrected comment as prose
The dead dispatch left the 1A/2A/3A implementation committed and its pins
UNCOMMITTED, so a read of the pushed branch found them absent. This lands them
and repairs the one measured contradiction between the two halves.
`rest-server.ts` had "corrected" its stale comment by quoting the withdrawn B'
claim verbatim under a SUPERSEDED banner. That kept the false sentence answering
every grep for it — it had already caused this seam to be re-read as unrepaired
after the fix — and it directly contradicted the pin that forbids the phrase
(1 failed / 41 passed before this change). The correction is now stated as
prose, and the forbidden phrase occurs exactly once in the repository: inside
the regex that forbids it.
Also narrows that pin's sibling assertion off the words "boot refusal", which
are how both files' own no-boot-refusal notes are worded.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
* chore(changeset): @objectstack/rest patch + @objectstack/core patch for the single-kernel posture seam
Sized as the maintainer ruled (item 6): a fail-closed bug fix, no accept-set
change, no new public surface, Clause-2 no. Names the observable change — an
organization-less or ex-member API key on a walled single-kernel deployment now
answers 401 where it answered 200.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
* docs(permissions): re-anchor the system-context census line citations after the rest-server insertions
Pure line rot, produced by `node scripts/check-system-context-census.mjs --fix`:
this card's additions to `rest-server.ts` shifted the cited lines by +24 before
the posture block and +79 after it. No prose and no row semantics change — only
the line numbers the page cites.
check-system-context-census: OK — 106 elevation read sites in 20 packages across
45 files, all anchored; 140 anchors resolve, 27 declared non-read.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: content/docs/permissions/system-context.mdx
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -64,7 +64,7 @@ not on any flag.
64
64
## How the flag is set
65
65
66
66
`isSystem` is **server-constructed and never client-supplied**. Inbound HTTP
67
-
cannot set it (`packages/rest/src/rest-server.ts:1524`, `:1553`), and neither
67
+
cannot set it (`packages/rest/src/rest-server.ts:1548`, `:1577`), and neither
68
68
can an action body (`packages/runtime/src/domains/actions.ts:404`). It is
69
69
written by internal callers only, as an option on the engine call:
70
70
@@ -103,7 +103,7 @@ that silently does not happen.
103
103
| 14 | MCP stdio bridge skips the object API-exposure gate | mcp | Get: the bridge reaches objects whose `apiEnabled` / `apiMethods` would refuse an external caller |`stdio-data-bridge.ts:246`|
104
104
| 15 |**Read-audit rows are not written**| plugin-audit | Lose: the "a person opened this record" trail. `sudo()` keeps the caller's `userId`, so this flag is the only thing separating a human read from a platform one |`read-audit.ts:556`|
105
105
| 16 | Approval snapshot payload redaction skipped | plugin-approvals | Get: the whole snapshot on `find` / `findOne` — the audit/replay channel. Lose: field-visibility redaction over approval payloads |`payload-redaction-middleware.ts:115`|
106
-
| 17 | REST anonymous-deny seam satisfied | rest | Get: `enforceAuth` passes with no `userId`. Not reachable from the wire — `isSystem` is never set on an inbound request |`rest-server.ts:1556`|
106
+
| 17 | REST anonymous-deny seam satisfied | rest | Get: `enforceAuth` passes with no `userId`. Not reachable from the wire — `isSystem` is never set on an inbound request |`rest-server.ts:1580`|
107
107
108
108
### 2. Write pipeline and data integrity
109
109
@@ -158,7 +158,7 @@ The largest single consumer — **17 of the 106 sites**.
158
158
|:--|:---|:---|:---|:---|
159
159
| 48 | Object API-exposure gate bypassed (`apiEnabled` / `apiMethods`) | runtime | Get: internal self-writes ignore exposure declarations — these govern **external** exposure, not engine self-writes |`action-execution.ts:138`|
| 50 |`manage_metadata` bypassed on metadata writes | runtime, rest | Get: schema writes without the capability |`domains/meta.ts:471`, `:874`, `rest-server.ts:4888`, `:6302`, `:6550`, `:6981`, `:7174`|
161
+
| 50 |`manage_metadata` bypassed on metadata writes | runtime, rest | Get: schema writes without the capability |`domains/meta.ts:471`, `:874`, `rest-server.ts:4967`, `:6381`, `:6629`, `:7060`, `:7253`|
162
162
| 51 | The shared metadata-write verdict itself returns `allowed`| metadata-core | Get: the one function all of row 50's doors consult answers yes before any capability is examined |`meta-write-capability.ts:134`|
163
163
| 52 | Anonymous-deny seam satisfied on the domain dispatchers and the package/federation routes | runtime, rest | Get: passes with no `userId`|`domains/actions.ts:411`, `domains/ai.ts:60`, `domains/automation.ts:989`, `domains/meta.ts:232`, `domains/security.ts:78`, `domains/packages.ts:422`, `external-datasource-routes.ts:302`, `package-routes.ts:97`|
164
164
| 53 | MCP principal check satisfied | runtime | Get: MCP surface reachable with no user |`domains/mcp.ts:61`|
@@ -199,7 +199,7 @@ assuming `isSystem` covers it is a documented source of bugs.
199
199
| "It preserves a supplied `updated_at` / `updated_by`" |**No.** That is `preserveAudit`, a separate opt-in — and an UPDATE-path exemption only |`field.zod.ts:1580` (#3493 / #6640) |
200
200
| "It stamps `created_by`" |**No.** Audit stamping reads `userId` from the context. A user-less system write stamps nothing — that is today's behaviour, not an error |`runtime-identity.ts:280`–`281`|
201
201
| "It bypasses every guard" |**No.** The last-admin guard applies to **every** context, `isSystem` included — the deprovision path that actually locks an org out is the system one |`last-admin-guard.ts:299`|
202
-
| "A client can request it" |**No.** Never settable from inbound HTTP or from an action body |`rest-server.ts:1524`, `:1553`; `domains/actions.ts:404`|
202
+
| "A client can request it" |**No.** Never settable from inbound HTTP or from an action body |`rest-server.ts:1548`, `:1577`; `domains/actions.ts:404`|
0 commit comments