/goal /ultracode-workflows [POL-5] policy-govern the RBAC/identity invariants #43
Labels
No labels
bug
discussion
duplicate
enhancement
goal
help wanted
horizon:backlog
horizon:governance
horizon:mvp
invalid
operator-decision
question
roadmap
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Blocks
Depends on
#29 /goal /ultracode-workflows [RBAC-2] forwardAuth platform-auth service + Traefik middleware (apps private by Forgejo permission, zero app auth code)
open-platform/mitosis
Reference
open-platform/mitosis#43
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Track/Wave:
POL-5· Wave G5 · Size MRepos:
gitopsDepends on: POL-1, RBAC-2, RBAC-4
Why
The RBAC guarantees (private-by-permission, no god-PAT, scoped agent runs) must be continuously enforced so a future overlay change can't silently ship an app without forwardAuth or an over-scoped agent SA.
Scope
Kyverno ClusterPolicies: every app Ingress must carry the forwardAuth middleware annotation (RBAC-2); no ServiceAccount may bind an admin-scoped/god-PAT-equivalent ClusterRole; agent runs must use the per-app agent-ctx namespaced Role (RBAC-4), never a cluster-wide grant.
Acceptance
An app Ingress missing the forwardAuth middleware is rejected; a SA binding an admin ClusterRole is rejected; an agent-ctx SA with the scoped namespaced Role admits — validated on the staging platform.
Notes
Adds distinct policy files; shares only the kyverno kustomization include line.
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.
Enforce-flip prepared (POL-5 half): plat/gitops#14 — default-off, reviewable, NOT merged.
components: [enforce]in kyverno-policies).no-admin-clusterrole-bindingandagent-runs-use-scoped-roleflip to Enforce (zero live violations; offline matrix: tenant-SA→cluster-admin CRB denied, agent-ctx CRB denied, agent-ctx→ClusterRole/editdenied, the sanctionedRole/agent-ctxbinding admits) — but theirfailurePolicydeliberately stays Ignore: the ClusterRoleBinding rules match a cluster-scoped kind that escapes the webhook's namespaceSelector bound, andFailthere could let a Kyverno outage block Flux applying platform RBAC — wedging exactly the recovery path POL-0 Decision 4 requires to stay open. Deny-when-reachable + background audit is the honest posture.require-forwardauth-on-app-ingressis deferred by default (observed live: it correctly FAILs every app Ingress while PLAT_FORWARD_AUTH is off — flipping it would reject every app deploy). A separate opt-inenforce-forwardauth/component exists for platforms running PLAT_FORWARD_AUTH=1:components: [enforce, enforce-forwardauth].Operator pulls the trigger; ENFORCE.md carries the checklist (disposable germination with the component active + kill-the-webhook test).
Enforce flip DONE + live (2026-07-06), with 2 bugs found & fixed
The Audit→Enforce flip (
components: [enforce]) is merged to plat/gitops main (PR #15, on top of #14) and captured in the genesis seed r41, so every future germination + the nightly gate now carry Enforce. Verified live on theproduct-garden.comgranddaughter: admission controller 3 replicas (HA), 11 validate rules at Enforce, plaintext-Secret / unregistered-host / public-image all denied.Pre-flight (qa-d1) + this real-VPS app run surfaced 3 issues, all handled:
spec.valuesOVERvaluesFrom, so the enforce ConfigMap's replicas/namespaceSelector never landed. Fixed inline in the kyverno HelmRelease (PR #15).scale --replicas=0makes Kyverno delete its own webhooks; rewrote it to a crash-style kill (PR #15).disallow-unmanaged-secretsblocked cert-manager's issuance temporaries (wildcard-plat-tls-<rand>). Fixed with a glob allowlist (gitops#17). This is why the flip must not go onto a live app-serving platform without the fix — the current ENFORCE.md pre-flight doesn't deploy a real app+TLS.Enforce is delivered. Closing #42/#43; residual hardening (ENFORCE.md checklist gap) tracked in #91.