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 77a7a78
Browse filesBrowse the repository at this point in the historyBrowse files
docs(tenancy): 18.0 states the three ownership rules and its fresh-install, single-only scope; the operator messages say so too
The tenancy and permissions docs state ADR-0131's three rules: a managed
package's metadata is not in the database; a row in a table with an
organization column was written by that organization, and NULL is not an
owner; a table with no organization column is deployment-level or
code-level, protected by permissions. The tenancy page answers whether a
platform table with no organization is by design, and its 18.0 callout
adds the scope: 18.0 databases take the 18.x upgrade path, and the walled
refusal covers the os boot path only. Text that read NULL as a global or
platform-wide row is reworded, and the SQL driver's tenant-scope docblock
says the NULL arm is the v17 reading the 18.x line removes.
Three operator messages ride along:
- the v18 boot refusal on a v17-shaped database says first that 18.0 does
not upgrade it and that it stays on 17.x until 18.x;
- the posture fix list says 18.0 refuses group and isolated at boot;
- os doctor reports a walled posture as a warning naming the os serve
refusal.
Claude-Session: https://claude.ai/code/session_01L9ZWcgyzEyyKR2nnDzto54
Co-authored-by: Claude <noreply@anthropic.com>
fix(cli, runtime): the 18.0 operator messages say that 18.0 supports fresh `single` installs only
7
+
8
+
Clause-②: no
9
+
10
+
-**The v18 boot refusal on a v17-shaped database** now says first that 18.0 does not upgrade a v17 database: keep it on a 17.x release until the 18.x release that carries the upgrade path. Before, it named only `os migrate organization-ownership`, which refuses in 18.0 as well, so the operator reached the answer in two hops.
11
+
-**The fix list for an unrecognized `OS_TENANCY_POSTURE`** (printed by `os serve` and `os doctor`) still lists `group` and `isolated`, and now says beside each that 18.0 refuses it at boot.
12
+
-**`os doctor` reports a walled posture.** Under `group` or `isolated` it prints a `Tenancy posture` warning: 18.0 supports `single` only, so the next `os serve` (and so `os dev` and `os start`) refuses the posture at boot. The row is a warning, so doctor's exit code does not change. Before, doctor printed nothing about a valid posture.
13
+
14
+
Nothing else changes. The refusals themselves, their codes and their exit codes are as before.
Copy file name to clipboardExpand all lines: content/docs/deployment/tenancy-modes.mdx
+42-1Lines changed: 42 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,6 +19,11 @@ still apply — widened to the three postures.
19
19
<Callouttype="warn"title="18.0: single only">
20
20
18.0 supports fresh `single` installs; upgrades and walled postures arrive in 18.x. In 18.0 `os serve` (and so `os dev` and `os start`) refuses `group` and
21
21
`isolated` at boot with `NOT_IMPLEMENTED`, before it reads a config.
22
+
A database an 18.0 install creates takes the same 18.x upgrade path as a v17 one.
23
+
The refusal covers the `os` boot path only. The one-shot `os migrate`, `os verify`,
24
+
`os secret` and `os storage` boots and embedded hosts (`createStandaloneStack`,
25
+
`@objectstack/adapter-hono`) are not refused, and none of them is a supported
26
+
walled deployment in 18.0.
22
27
</Callout>
23
28
24
29
<Callouttype="info"title="Renamed, not re-configured">
@@ -38,7 +43,7 @@ fallback **input** to posture resolution. See
38
43
| Layer 0 organization wall | none — the layer is inert |`organization_id IN accessible_org_ids` (union / MOAC) |`organization_id = <active organization>`|
39
44
| Read reach | the whole dataset, subject to RBAC | every organization the caller currently holds a membership in | the active organization only |
40
45
| Shape | one logical tenant; sub-units modelled as business units in one tree | organizations are membership / invitation boundaries over one shared dataset | legal-entity / sovereignty isolation — the hard wall |
41
-
|`organization_id` filled in on write |no| yes | yes |
46
+
|`organization_id` filled in on write |yes — the Default Organization| yes | yes |
42
47
| Enterprise `@objectstack/organizations`| not needed |**required**|**required**|
43
48
| Default organization | one bootstrapped "Default Organization" | owned by the enterprise runtime | owned by the enterprise runtime |
Copy file name to clipboardExpand all lines: content/docs/permissions/system-context.mdx
+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
@@ -129,7 +129,7 @@ that silently does not happen.
129
129
| 23 |**Referential-integrity check skipped**| objectql | Get: writes proceed against unreachable/unresolvable targets. Lose: an `isSystem` caller can write a **dangling reference**|`packages/objectql/src/engine.ts#assertReferencesResolve`|
130
130
| 23b |**Position-catalog check skipped** — a `sys_user_position` write whose `position` names no position in the security catalog is not refused | plugin-security | Get: a system writer can store an assignment naming no position — the seed loader writes `stack.data` from `AppPlugin.start()` under a system context, as invitation acceptance and the platform's own bootstraps do. Lose: such a row grants nothing and nothing says so. A non-system insert, or a non-system update that changes `position`, is refused `400 VALIDATION_FAILED` / `reference_not_found` instead when the security catalog holds no position of that name: the environment registry (ADR-0131 D3), one per deployment, which takes no organization, so a name only a `sys_position` row carries — any organization's — is refused like one nobody carries. It is the same stand-down as the engine's referential-integrity check for a lookup column |`packages/plugins/plugin-security/src/position-catalog-refusal.ts#assertPositionNamesCatalogRow`|
131
131
| 23c |**Grant-name catalog check skipped** — a `sys_user_permission_set` write whose `permission_set` names no permission set in the security catalog is not refused | plugin-security | Get: a system writer can store a grant naming a set not yet registered — seed replay and boot provisioning may write the grant before the definition it names is registered. Lose: such a row grants nothing and nothing says so. A non-system insert, or a non-system update that changes `permission_set`, is refused `400 VALIDATION_FAILED` / `reference_not_found` instead when the security catalog holds no set by that name; a grant that names no set at all is refused `required` for every caller. The grant names its set by name alone, and nothing derives the name from `permission_set_id` (ADR-0131 D4, D10) |`packages/plugins/plugin-security/src/grant-permission-set-name.ts#onInsert`, `#onUpdate`|
132
-
| 23d | **Grant-holder membership check skipped** — a `sys_user_position` or `sys_user_permission_set` write naming a user with no `sys_member` row in the row's organization is not refused | plugin-security | Get: a system writer can store such a grant — invitation acceptance writes the membership and its placement together, and seed replay, the organization-admin reconcile and the platform bootstraps write grants as the system. Lose: such a row takes effect once its user is admitted to the organization. A non-system insert, or a non-system update that moves `user_id` or `organization_id`, is refused `400 VALIDATION_FAILED` / `reference_not_found` at `user_id` instead, for every caller, a platform administrator included; the membership is read as `{ isSystem: true, tenantId }` with `tenantId` the row's own organization, never another one. A row stored with no organization is a global grant and is not judged | `packages/plugins/plugin-security/src/grant-holder-membership-refusal.ts#onInsert`, `#onUpdate` |
132
+
| 23d | **Grant-holder membership check skipped** — a `sys_user_position` or `sys_user_permission_set` write naming a user with no `sys_member` row in the row's organization is not refused | plugin-security | Get: a system writer can store such a grant — invitation acceptance writes the membership and its placement together, and seed replay, the organization-admin reconcile and the platform bootstraps write grants as the system. Lose: such a row takes effect once its user is admitted to the organization. A non-system insert, or a non-system update that moves `user_id` or `organization_id`, is refused `400 VALIDATION_FAILED` / `reference_not_found` at `user_id` instead, for every caller, a platform administrator included; the membership is read as `{ isSystem: true, tenantId }` with `tenantId` the row's own organization, never another one. A row stored with no organization is not judged. Under `single`, 18.0 stamps a new grant with the Default Organization, so such a row is one an earlier release wrote | `packages/plugins/plugin-security/src/grant-holder-membership-refusal.ts#onInsert`, `#onUpdate` |
133
133
| 24 | Tenant-audit warning silenced; `bypassTenantAudit` threaded to the driver | objectql | Get: unscoped system writes stop warning. Lose: the signal that would flag a genuine user-path scoping bug |`packages/objectql/src/engine.ts#buildDriverOptions`|
| 26 | Identity write guard bypassed (ADR-0092) | plugin-auth | Get: direct writes to identity tables through the generic data path |`packages/plugins/plugin-auth/src/identity-write-guard.ts#isUserContextWrite`|
0 commit comments