Illustrative scenario, not a real incident: two engineers pair with a coding agent. It needs to push a branch and comment on a ticket. The quick path is pasting a personal access token into session config. The session ends; the token remains.
The decision: does the agent act as a borrowed human identity, or as its own scoped identity? This is proposed practice, not a documented standard.
Steps
- List every agent write action (branch push, ticket comment, deploy trigger) and its system.
- Write a decision record: owner, allowed writes, credential lifetime, approver.
- Check grants. Kubernetes RBAC is additive: a RoleBinding grants namespace permissions even if it references a ClusterRole; a ClusterRoleBinding grants them cluster-wide. Removing one binding may leave equivalent access. See Kubernetes RBAC.
- Choose: borrowed human token (quick, but misattributes actions and revocation affects that person); scoped agent identity (one account per role, limited to inventory, but needs review and owner); or no-write agent (agent emits a patch).
- Proposed rule: if the agent writes to multiple systems, or the credential outlives one session, issue a scoped identity; otherwise prefer no-write. This is a heuristic, not a NIST requirement.
Test
Ask the scoped identity to write to a canary resource outside its inventory: a scratch namespace or throwaway repo.
- Expected: the write is denied. With audit logging and metadata enabled, the event should name the agent identity. Metadata records user, time, resource and verb, not bodies; RequestResponse can capture request bodies. Metadata cannot reconstruct omitted bodies. See Kubernetes auditing.
- If the write succeeds: narrow the grant and retest.
- If the log names a human: the agent may still borrow a token, or the audit policy may not capture the expected identity. Check audit configuration before changing the grant.
- If no event appears: confirm audit logging is enabled and includes the fields you need.
Record the result. A grant not re-tested is a guess.
Boundaries
Read-only exploration needs no ceremony. Additive grants hide scope creep. The NIST AI RMF is voluntary; Govern 2.1 addresses documented responsibility, and Manage 4.1 covers monitoring, incident response, recovery and change management. See NIST AI RMF.
This article was created with AI assistance.