SECURITY & EVALS
The Agent Should Never Have Permissions of Its Own
By Subhojit Banerjee (Staff Engineering) · Dec 2026 · 4 min read
Giving an AI agent a service account turns any prompt injection into broad infrastructure access. Here is the delegated human-identity flow we use instead.
The most common security mistake in enterprise agent designs is giving the agent a service account and attaching access to that account. Once you do that, a single prompt injection is enough for the agent to do anything the service account can do.
Six-Step Delegated Authorization Flow
In our Kafka copilot, the agent has no permissions of its own:
- The on-call engineer signs in through SSO and asks for a diagnosis.
- The orchestrator mints a short-lived delegation token with the engineer as subject, the agent as actor, and one server as audience. It is bound to the agent’s key with DPoP, so a stolen copy is useless.
- The tool server verifies the token offline against cached public keys: signature, issuer (RFC 9207), audience, expiry, and proof of possession.
- The resulting identity is always the human. Policy is deny-overrides and fail-closed. Anything unknown means deny.
- Every decision is written to a write-once audit log before the response goes out, denials included.
- The server calls AWS with its own read-only role and never forwards the user’s token. The MCP specification forbids token passthrough for good reason.
Two Locks Covering Both Tools and Knowledge
That design establishes two independent locks: the human’s permissions and a read-only infrastructure role. Both have to say yes.
One detail teams often miss is that policy covers knowledge, not just tools. Which runbooks someone can read is enforced at the exact same checkpoint as which clusters they can query. The token proves who asked; only the domain layer knows what that person may touch.
Key Takeaways
- Eliminate standalone agent service accounts; delegate short-lived, DPoP-bound human identity per request.
- Enforce deny-overrides, fail-closed policy across both live cluster queries and internal runbook reads.
- Record every allow and deny decision to a write-once audit log before returning any data.