DEV Community

Casey Zhang
Casey Zhang

Posted on

Who Changed the Shared Eval Config? Make RBAC Prove It

Illustrative scenario, not a reported incident: four engineers share a Kubernetes namespace containing a coding-agent eval harness, model config, and scoring job. On Monday the pass rate shifts four points. The team cannot tell whether a model bump, prompt edit, or permissions change caused it. The score is not the only issue: the shared object has no named owner and no attributable write path.

Prerequisites: a namespace with RBAC enabled; an audit policy and sink you control; a written list of shared contracts (harness, model config, scorer). This is a governance pattern, not a Kubernetes feature.

Steps

  1. Name one owner group per shared object. Proposed practice: record the owner group in the repo beside the manifest so the mapping is reviewable.
  2. Grant writes narrowly. Documented: RBAC grants combine additively. A RoleBinding grants its subjects permissions in the binding's namespace even when it references a ClusterRole; a ClusterRoleBinding grants the referenced permissions cluster-wide. (Kubernetes RBAC)
  3. Add a read-only binding for everyone else in that namespace, so review is not blocked by access.
  4. Enumerate before tightening. Documented: removing one binding may leave equivalent access through another grant. Find the other grant first.
  5. Attach evidence to the change via an annotation with ticket and date. This is a convention, not an enforced control.

Test

Use an authorization review for a sample engineer identity against the namespace; confirm current kubectl flags in the official reference rather than copying an unverified command. Expected: write verbs on the config appear only for the owner group; other engineers show get/list and no update/patch. If write verbs appear from another role, do not edit the owner binding first—enumerate every grant for that identity. If no verbs appear, check the binding namespace, since RoleBinding scope is namespace-local.

Then inspect one week of audit events. Documented: the first matching audit policy rule determines the level; metadata can capture user, time, resource, and verb without bodies, while Request/RequestResponse can capture bodies. (Kubernetes auditing) If the policy captures request bodies for update/patch, compare the annotation ticket and date. If it records only metadata, you can attribute who and when but not reconstruct the annotation; report that as an evidence gap.

Failure modes: group membership managed outside the cluster drifts from manifest review; remaining grants preserve access after one binding is removed; metadata-only audit cannot prove annotation content.

Tradeoffs and limits: for a two-person project or namespaces created and destroyed per run, the bookkeeping may cost more than it returns. This design attributes writes; it does not stop an owner from making a bad change.

This article was created with AI assistance.

Top comments (0)