PLAT_TOKEN (write:admin+read:admin) is shared by MCP, dispatcher, registry; a prompt-injected run can act with full admin across every tenant. The validated per-app namespaced read-only Role is the target shape.
Scope
gitops: per-app agent-ctx SA + namespaced read-only Role (pods/logs/events/services/deployments get/list/watch, no secrets) rendered per overlay. mcp: a TokenRequest-based short-lived namespace-scoped token replacing the embedded admin token. agents: authenticate the run AS the triggering user. DECISION NEEDED (resolve in-issue): Forgejo admin sudo/impersonation vs a platform-managed per-user PAT. Land behind a flag, one repo first.
Acceptance
A run by user A (write on X, no access to Y) can only touch X: agent calls against Y are rejected by RBAC-1, and the minted token lists pods/logs in X's namespace but 403s on Y, cluster-wide resources, or any secret — validated with two apps owned by different users in one org.
Notes
Seam B (overlay renderer) — after RBAC-2.
---
Part of the First Client Deploy → Governance roadmap. The owning agent may recurse into its own subagent team (ultracode workflow) if the task warrants. Honor the seam-serialization: land on a shared seam by rebase, and don't start a seam position until the prior one has merged.
Track/Wave:
RBAC-4· Wave G4 · Size L Repos:mcp,agents,gitopsDepends on: RBAC-1, RBAC-2Why
PLAT_TOKEN (write:admin+read:admin) is shared by MCP, dispatcher, registry; a prompt-injected run can act with full admin across every tenant. The validated per-app namespaced read-only Role is the target shape.
Scope
gitops: per-app
agent-ctxSA + namespaced read-only Role (pods/logs/events/services/deployments get/list/watch, no secrets) rendered per overlay. mcp: a TokenRequest-based short-lived namespace-scoped token replacing the embedded admin token. agents: authenticate the run AS the triggering user. DECISION NEEDED (resolve in-issue): Forgejo admin sudo/impersonation vs a platform-managed per-user PAT. Land behind a flag, one repo first.Acceptance
A run by user A (write on X, no access to Y) can only touch X: agent calls against Y are rejected by RBAC-1, and the minted token lists pods/logs in X's namespace but 403s on Y, cluster-wide resources, or any secret — validated with two apps owned by different users in one org.
Notes
Seam B (overlay renderer) — after RBAC-2.
--- Part of the First Client Deploy → Governance roadmap. The owning agent may recurse into its own subagent team (ultracode workflow) if the task warrants. Honor the seam-serialization: land on a shared seam by rebase, and don't start a seam position until the prior one has merged.