docs(canon): reconcile workload and tenant grouping semantics
Assistant: codex Assistant-Model: gpt-5.6-sol Assistant-Session: 01a02929-244b-7391-b933-c04010e8eedb
This commit is contained in:
parent
ad2057acff
commit
bee22db620
21 changed files with 1118 additions and 59 deletions
|
|
@ -6,7 +6,7 @@ domain: netkingdom
|
|||
status: accepted
|
||||
version: "0.1"
|
||||
created: "2026-07-23"
|
||||
updated: "2026-07-23"
|
||||
updated: "2026-08-22"
|
||||
scope: tenant-domain-boundaries
|
||||
adr:
|
||||
- docs/adr/ADR-0006-recursive-multi-tenant-identity-authorization.md
|
||||
|
|
@ -55,16 +55,22 @@ deployments.
|
|||
|
||||
| Resource kind | Source of truth | tenant-engine relation | Boundary rule |
|
||||
| --- | --- | --- | --- |
|
||||
| Tenant record (existence, grouping, name/slug) | `tenant-engine` | Canonical owner | Grouping value must be one of ADR-0013's taxonomy, or the reserved ungrouped `platform`/`coulomb` identifiers |
|
||||
| Tenant record (existence, current grouping, name/slug) | `tenant-engine` | Canonical owner | Current grouping must be one of ADR-0013's taxonomy, or the reserved ungrouped `platform`/`coulomb` classifications; the identifier segment is historical and must not be used as current grouping |
|
||||
| Tenant capability roles | `tenant-engine` | Canonical owner | Non-exclusive; grant/revoke are audited mutations (see Grant Contract below), never free-form field updates |
|
||||
| Plan/subscription assignment | `tenant-engine` | Canonical owner | References an `adaptive-pricing` plan id; does not define plan terms |
|
||||
| Pricing-model / plan definitions | `adaptive-pricing` | Consume by reference only | `tenant-engine` must not cache plan terms beyond what's needed to resolve which roles a plan currently grants |
|
||||
| Guardrail/quota policy (spend limits, entity/action counts) | `tenant-engine` (reserved) | Canonical owner once designed | Not implemented by this contract version — reserved namespace only, see Guardrail Policy section |
|
||||
| `tenant_roles` token claim | `tenant-engine` (live) / `key-cape` (cached copy) | `tenant-engine` is authoritative; the token claim is a point-in-time cache | Privileged/high-stakes decisions MUST re-query `tenant-engine` live — see IAM Profile v0.3, "Tenant Roles" section — never trust the cached claim alone |
|
||||
| Tenant identifier claim shape (`tenant`) | NetKingdom / IAM Profile contract | `tenant-engine` validates against it; does not mint the claim format | The wire format stays owned by the profile; `tenant-engine` owns which concrete tenant values currently exist |
|
||||
| Tenant identifier claim shape (`tenant`) | NetKingdom / IAM Profile contract | `tenant-engine` validates against it; does not mint the claim format | The wire format stays owned by the profile; the identifier is immutable, including its historical grouping segment; `tenant-engine` owns which concrete tenant values currently exist |
|
||||
| User/membership records scoped by a tenant | `user-engine` | No relation | `tenant_id` is the only key shared between the two services; `tenant-engine` never stores or reads user data |
|
||||
| Authorization decisions | `flex-auth` | Data source only | `tenant-engine` never enforces access itself; it answers queries `flex-auth`'s policy packages issue |
|
||||
|
||||
The tenant identifier and current grouping are intentionally independent after
|
||||
creation. `tenant-engine` MAY change the record's `grouping` through an audited
|
||||
mutation without renaming `tenant_id`. Reads and domain events expose current
|
||||
grouping explicitly. No API, guardrail, pricing, or authorization consumer may
|
||||
recover current grouping by parsing `tenant_id`.
|
||||
|
||||
## Tenant Role & Plan Grant Contract
|
||||
|
||||
Every role grant or revocation is an audited mutation, not a direct field
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue