From 7eb2a786fe4fe318aed86bf765c3ab9725f73896 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 16 Nov 2026 16:47:51 +0000 Subject: [PATCH 1/2] docs(adr-0135): on a cloud-managed environment, credentials live in the cloud and the roster and authorization live in the environment One dated note under D5.2 mirrors the 2026-11-14 amendment of cloud ADR-0024 at this record's granularity: who starts a person's lifecycle on a hosted environment, the one authorization projected from the cloud, and what stays unchanged. Each mechanism sentence carries a symbol anchor into this tree; what the host does is marked cloud-side. No D-body is rewritten. Claude-Session: https://claude.ai/code/session_01WGufzfvoBdrQVCDNd5EDyG Co-authored-by: Claude --- .../0135-identity-and-access-architecture.md | 62 +++++++++++++++++++ 1 file changed, 62 insertions(+) diff --git a/docs/adr/0135-identity-and-access-architecture.md b/docs/adr/0135-identity-and-access-architecture.md index 2f221dfb769..7e0e7c985ef 100644 --- a/docs/adr/0135-identity-and-access-architecture.md +++ b/docs/adr/0135-identity-and-access-architecture.md @@ -255,6 +255,68 @@ An environment that has adopted SSO still needs a user-management surface, and t > deployments are unchanged: the split by population above, break-glass included, holds there. > Cloud ADR-0024's own text is not amended here. +> **Note (2026-11-16, objectstack, #33184; mirrors cloud ADR-0024, amended 2026-11-14, cloud#4465 +> rulings 7, 9 and 10, cloud PR #4474 @ 312f2e5e) — on a cloud-managed environment, credentials +> live in the cloud; the roster and authorization live in the environment.** Every person on a +> hosted environment (`OS_CLOUD_MANAGED=1`) remains their own cloud account and signs in through +> the hosting cloud's identity provider, and the cloud's own sign-in gate (`cloud ADR-0024 D5.1`, +> which stays in the cloud record) is unchanged. What moves is who starts a person's lifecycle: an +> environment administrator adds, imports and deactivates people in Setup → Users. For hosted, the +> managed side of D5.2's surface therefore reads: add and deactivate in the environment, the +> invitation sent by the cloud on the environment's request, and password management still none. +> +> - **Add and import.** Setup → Users offers a platform administrator two actions, on a managed +> environment only: `packages/platform-objects/src/identity/sys-user.object.ts#add_sso_user` and +> `packages/platform-objects/src/identity/sys-user.object.ts#import_sso_users`. Their doors are +> `admin/add-sso-user` and `admin/import-sso-users` +> (`packages/plugins/plugin-auth/src/pending-sso-users.ts#runAddSsoUser`, `#runImportSsoUsers`). +> Each adds the person ahead of their first sign-in as a pending row: `sys_user.source` reads +> `idp_pending` (`packages/plugins/plugin-auth/src/pending-sso-marker.ts#PENDING_SSO_SOURCE`, a +> third stored value beside the two D2 names), with no password and no account link, and with +> the positions, permission sets and manager the administrator chose. The person's first sign-in +> through the hosting cloud's identity provider binds to that row. +> - **Deactivate.** `admin/ban-user` and `admin/unban-user` deactivate and reactivate a person +> (`packages/plugins/plugin-auth/src/admin-ban-endpoints.ts#runAdminBanUser`, `#runAdminUnbanUser`), +> and `admin/remove-sso-user` removes one who is still pending +> (`packages/plugins/plugin-auth/src/pending-sso-users.ts#runRemoveSsoUser`). +> - **The environment asks; the cloud invites.** The environment sends no invitation of its own. +> It reaches its host through one seam, +> `packages/plugins/plugin-auth/src/environment-user-host.ts#EnvironmentUserHost`, which the host +> wires as `packages/plugins/plugin-auth/src/auth-plugin.ts#environmentUserHost`: the host is told +> after a person is added, and asked before a person is deactivated, reactivated or removed. What +> the host does with the call is cloud-side, not in this repo. By the cloud record, the control +> plane invites the address as `member`, through better-auth's own `sys_invitation` and +> `sys_member` writes and every gate a console invitation passes (no second invitation store and +> no cloud-side roster, D9), and deactivating a plain member ends that membership. +> - **An owner or admin is changed in the console only.** The seam carries a typed refusal for +> that case (`packages/plugins/plugin-auth/src/environment-user-host.ts#EnvironmentUserHostRefusal`): +> the host answers `409` and the row stays as it was, and a deactivation whose host call fails is +> refused too. The environment's own doors that invite a member, remove one or change a member's +> role answer `409` on a managed environment (`packages/plugins/plugin-auth/src/cloud-managed.ts`). +> +> **One authorization is projected from the cloud, and it is the only exception to D5**: an +> organization owner or admin holds `admin_full_access` in the environment while that role lasts +> (ruling 9). Every other position and permission set is assigned in the environment, and nothing +> is projected upward, from the environment to the cloud. What gives and withdraws it as the +> cloud role changes is cloud-side, not in this repo; D5's derivation is unchanged and reads the +> standing from the environment's own tables +> (`packages/core/src/security/resolve-authz-context.ts#hasPlatformAdminStanding`). +> +> The same amendment's ruling 10, no local break-glass administrator on a hosted environment, is +> the note above and is not restated here. The amendment also finds the cloud-to-environment SCIM +> fan-out not needed: if hosted ever offers a bring-your-own identity provider with SCIM, that +> provider provisions straight into the environment's roster through this repository's SCIM path +> (D6), and whether such a person also holds a cloud membership is decided with that offer. +> Unchanged: D1, self-hosted deployments (off a managed environment the two add doors answer +> `409`, and the local doors hold as D5.2 states them) and the cloud console's own invitation. +> +> The D-bodies are not rewritten. For a hosted environment this note governs where they disagree, +> as far as the roster lifecycle goes: D2 reads a managed person's row as a mirror of the directory +> that owns it, and on a hosted environment the environment itself adds, imports and deactivates +> that person while the credential stays the cloud's. What the amendment supersedes in the cloud's +> own text and console copy is listed in the cloud record and stays there. The cloud record is the +> decision: a difference between it and this note is this note's bug. + ### D6 — SSO per production environment, configured in the environment A production environment federates login to the customer's own identity provider, and that From aeebe2529e4c90e010406bf32549ac8c9829695a Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 16 Nov 2026 16:52:00 +0000 Subject: [PATCH 2/2] docs(adr-0135): the projected authorization leaves D5's derivation as it is, with no claim about where the standing is read The note said D5's derivation reads the standing from the environment's own tables. Under a walled posture platform standing is config-derived, so the sentence now says only that the derivation is not changed for the projection. Claude-Session: https://claude.ai/code/session_01WGufzfvoBdrQVCDNd5EDyG Co-authored-by: Claude --- docs/adr/0135-identity-and-access-architecture.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/adr/0135-identity-and-access-architecture.md b/docs/adr/0135-identity-and-access-architecture.md index 7e0e7c985ef..1d6564815e5 100644 --- a/docs/adr/0135-identity-and-access-architecture.md +++ b/docs/adr/0135-identity-and-access-architecture.md @@ -298,8 +298,7 @@ An environment that has adopted SSO still needs a user-management surface, and t > organization owner or admin holds `admin_full_access` in the environment while that role lasts > (ruling 9). Every other position and permission set is assigned in the environment, and nothing > is projected upward, from the environment to the cloud. What gives and withdraws it as the -> cloud role changes is cloud-side, not in this repo; D5's derivation is unchanged and reads the -> standing from the environment's own tables +> cloud role changes is cloud-side, not in this repo, and D5's derivation is not changed for it > (`packages/core/src/security/resolve-authz-context.ts#hasPlatformAdminStanding`). > > The same amendment's ruling 10, no local break-glass administrator on a hosted environment, is