Shared Runtime Operator Authz Model v1¶
Purpose¶
Define the authorization contract for delegated shared-runtime operator identity used by tenant-owned shared app runtimes.
This document narrows the follow-on work after:
- doc/architecture/App_Tenant_Shared_Attachment_Model_v1.md
- doc/architecture/App_Tenant_Shared_Runtime_API_Direction_v1.md
- doc/architecture/Tenant_Scoped_App_Machine_Identity_v1.md
Decision Summary¶
The delegated shared-runtime operator token is not a general tenant-admin token.
It is a machine token with authority limited to:
1. one tenant (org_id),
2. one shared runtime (shared_runtime_id),
3. one explicit allowlist of app-runtime control-plane actions.
It must not inherit: 1. generic tenant IAM administration, 2. generic tenant billing administration, 3. platform-admin powers, 4. arbitrary cross-project data visibility.
Actor Model¶
The token represents:
- a non-human delegated operator identity,
- bound to one tenant-owned shared runtime,
- acting on behalf of that runtime only.
Suggested actor semantics:
1. actor_type = shared_runtime_operator
2. org_id = <tenant>
3. shared_runtime_id = <runtime>
Claims Direction¶
The token should directionally carry:
subactor_typeorg_idshared_runtime_idscopeexpiatissaudjti
It should not require a consumer project_id claim because the owner resource is
tenant-scoped, not project-scoped.
If a project-targeted operation is allowed, that project must be checked against: 1. the shared runtime attachment model, 2. the endpoint allowlist, 3. the target resource itself.
First Endpoint Allowlist¶
The initial allowlist should be narrow.
Allowed directionally¶
GET /api/v1/orgs/{org_id}/shared-app-runtimes/{shared_runtime_id}GET /api/v1/orgs/{org_id}/shared-app-runtimes/{shared_runtime_id}/attachmentsGET /api/v1/orgs/{org_id}/shared-app-runtimes/{shared_runtime_id}/attachments/{attachment_id}- shared-runtime runtime/member report paths once those exist
- tenant-scoped credential delivery paths explicitly bound to the same runtime, if and only if that capability is introduced
- tenant-aware allocation read paths explicitly limited by attached-project and contribution policy, once those exist
Explicitly not allowed¶
- creating or deleting arbitrary shared runtimes outside the bound
shared_runtime_id - attaching or detaching arbitrary projects unless the specific endpoint is intentionally delegated to the operator
- generic tenant IAM or billing administration
- platform-admin endpoints
- unrestricted reads over all tenant projects or allocations
Authorization Rules¶
Evaluation should require all of:
actor_type == shared_runtime_operator- token
org_idmatches pathorg_id - token
shared_runtime_idmatches target runtime resource - endpoint is on the allowlist for this actor type
- any project-targeted resource is attached to that shared runtime
This means: - tenant scope alone is not enough, - runtime binding alone is not enough, - both identity scope and resource relationship must hold.
Audit Requirements¶
Every delegated shared-runtime operator action must record:
actor_typeactor_idorg_idshared_runtime_id- target resource type/id
- result
correlation_id
If a specific project is involved, audit metadata should also include that
project_id.
Relationship to Project Service Accounts¶
Project-scoped service accounts remain the correct model for: 1. project-scoped app controllers, 2. project-owned automation, 3. project-local access-credential delivery and placement flows.
Delegated shared-runtime operator identity is an additional model, not a replacement.
Non-Goals¶
- General tenant-wide machine admin.
- Broad cross-project read access by default.
- Replacing human tenant-admin flows.
- Final implementation in this slice.
Immediate Follow-On Work¶
- reserve the claim shape in OpenAPI,
- reserve or document the initial allowlist in OpenAPI descriptions,
- extend auth middleware to recognize
actor_type = shared_runtime_operator, - implement allowlist and resource binding checks in handlers/services.
Related Docs¶
doc/architecture/Tenant_Scoped_App_Machine_Identity_v1.mddoc/architecture/App_Tenant_Shared_Runtime_API_Direction_v1.mddoc/architecture/App_Tenant_Shared_Attachment_Model_v1.mddoc/architecture/Platform_IAM_Model_v1.md