Tenant-Scoped App Machine Identity v1¶
Purpose¶
Define the machine-identity direction for app controllers that operate tenant-owned shared runtimes.
This is the follow-on identity contract required by:
- doc/architecture/App_Tenant_Shared_Attachment_Model_v1.md
- doc/architecture/App_Tenant_Shared_Runtime_API_Direction_v1.md
Current State¶
The current implemented machine-identity model is project-scoped:
- service accounts belong to one project,
- tokens carry project-bounded authority,
- this is the correct model for project-scoped app controllers.
That model should not be stretched to mean tenant-owned shared runtime control.
Decision Summary¶
Tenant-owned shared runtimes need tenant-bounded machine identity.
Requirements: 1. authority must be scoped to one tenant, 2. identity must not become platform-global, 3. actions must remain auditable, 4. permissions must still be explicit and allowlisted, 5. project-scoped service accounts must remain intact for project-scoped apps.
Why Project-Scoped Service Accounts Are Not Enough¶
For a tenant-owned shared runtime, the controller may need to:
- read the tenant-owned runtime object,
- read and manage attached projects,
- resolve placement across eligible tenant projects,
- act on behalf of the tenant-owned runtime rather than one consumer project.
If a project-scoped service account is reused here, one of two bad things happens:
- one arbitrary project becomes the fake owner of a tenant-owned runtime,
- the project-scoped token is widened until it no longer behaves like a project-scoped identity.
Both are the wrong boundary.
Recommended First Model¶
The first tenant-shared model should use a delegated shared-runtime operator identity with these properties:
- bound to one
org_id, - bound to one
shared_runtime_id, - not bound to one consumer
project_id, - explicit allowlist of tenant-scoped app-runtime actions,
- auditable as
actor_type = shared_runtime_operatoror equivalent, - separate from human tenant-admin tokens,
- separate from the existing project-scoped service-account model.
Contract Direction¶
The platform should reserve a distinct identity concept rather than overloading the current project-scoped service-account object.
Direction: 1. delegated app-operator identity issued for one tenant-owned shared runtime
This model is preferred over a generic tenant-wide service account because it keeps authority narrow and tied to one runtime owner object.
Invariants: 1. tenant-bounded authority 2. no cross-tenant operation 3. no platform-global privilege 4. explicit allowlisted endpoints 5. audit-safe attribution
Token Semantics Direction¶
A delegated shared-runtime operator token should directionally include:
subactor_typeorg_idshared_runtime_id- explicit permission scope
exp,iat,iss,aud,jti
It should not require a project_id claim when the owning resource is
tenant-scoped.
If project-local actions are needed, those actions should be authorized through: 1. attachment policy, 2. endpoint allowlist, 3. tenant-bounded runtime ownership, 4. explicit target-project checks.
Authorization Direction¶
The first allowlist should likely include only:
- tenant-shared runtime read/write paths for the bound tenant,
- attachment read/write paths for the bound tenant,
- tenant-eligible allocation read paths where policy allows,
- tenant-scoped credential delivery paths when required,
- runtime status/member reporting paths for the bound shared runtime.
It should not include:
- generic tenant IAM administration,
- billing administration,
- platform-admin endpoints,
- cross-tenant reads or writes.
Audit Direction¶
Every tenant-scoped machine action should record:
- actor type
- actor id
org_id- target resource type/id
- result
correlation_id
If a tenant-scoped action affects one consumer project, the audit trail should
also capture that project_id in target or details fields where appropriate.
Credential Custody Direction¶
Tenant-scoped machine identity does not imply a new secret-custody model by itself.
But if the controller needs bootstrap or runtime credentials, the platform will need tenant-scoped custody and delivery semantics that match the chosen identity scope.
This should remain generic app-platform capability, not a Slurm-only exception.
Non-Goals¶
- Platform-global machine identity.
- Replacing project-scoped service accounts.
- Broadening human tenant-admin tokens into automation tokens.
- Final implementation in this slice.
Immediate Follow-On Work¶
- Add the delegated shared-runtime operator token model to the OpenAPI contract.
- Define endpoint allowlist for shared-runtime operator tokens.
- Align credential-delivery semantics with the chosen scope.
- Only then implement tenant-owned shared app controllers.
Related Docs¶
doc/architecture/Service_Account_Model.mddoc/architecture/App_Tenant_Shared_Attachment_Model_v1.mddoc/architecture/App_Tenant_Shared_Runtime_API_Direction_v1.mddoc/architecture/App_Control_Plane_v1.mddoc/architecture/Shared_Runtime_Operator_Authz_Model_v1.md