Technical

CIEM for agents: granted vs. used

Most AI agents are provisioned like a nervous new hire's manager requested access for them: broad, 'just in case,' and never revisited. Here's how to right-size it without breaking the workflow.

Xtrom TeamOct 6, 20266 min read

CIEM — cloud infrastructure entitlement management — exists because of a pattern that repeats in every cloud environment: permissions get granted generously, at the start of a project, under time pressure, and essentially never get revisited unless an audit forces the question. Ten years in, most enterprises are governing a sprawling gap between what identities are authorized to do and what they actually do. Agentic AI is inheriting this pattern wholesale, and it's inheriting it faster than humans ever did.

Why agents get over-provisioned faster than humans did

When a human engineer needs access to a new system, there's usually some friction: a ticket, an approval, a manager who asks "do you really need write access to prod, or just read?" That friction is annoying, and it's also the thing that's historically kept entitlement sprawl from being even worse than it is.

Agent provisioning tends to skip that friction entirely. A team building an agent workflow grants it the same IAM role the underlying service uses, because scoping a narrower role takes engineering time nobody budgted for, and because "let's get the demo working" takes priority over "let's figure out the minimal permission set." The agent ships with access to everything the service account could theoretically touch, and uses a sliver of it.

The gap is the attack surface

This matters because of a simple, uncomfortable fact: an attacker — or a successfully manipulated agent — doesn't need the entitlement to be used normally to be dangerous. They need it to exist. An agent that reads customer support tickets and, for convenience, was granted a role that can also modify billing records, is one well-crafted ticket away from a billing incident, even though "modify billing records" was never part of its actual job.

Granted-but-unused permissions aren't neutral. They're a standing option an attacker gets to exercise on your behalf, for free, the moment they find a way to steer the agent that holds them.

What right-sizing actually looks like in practice

The CIEM playbook, applied to agents, isn't conceptually new — it's the same granted-vs-used analysis cloud security teams have run on service accounts for years, with a few agent-specific additions:

  • Observe before you restrict. Log every tool call and API permission an agent actually exercises over a representative window (days to weeks, depending on usage patterns), before touching its grant.
  • Right-size to observed usage plus headroom — not to the broadest role that was convenient to assign at creation time.
  • Prefer just-in-time grants over standing access for anything destructive or rarely used: the agent requests elevated scope for a specific task, it's approved (by policy or a human), it expires automatically.
  • Re-run the analysis continuously, not once. Agent workflows change as prompts, tools, and use cases evolve — an entitlement that was correctly scoped three months ago may now be stale in either direction.
  • Treat "we don't know what this agent can really do" as a P1, not a backlog item — you cannot right-size an entitlement you haven't discovered.

The workflow-breaking fear is usually overstated

The most common objection to right-sizing is that it'll break something — the agent will hit a wall mid-task because it lacks a permission nobody remembered it occasionally needed. This is a real risk, which is exactly why "observe before you restrict" matters: a few weeks of usage data almost always reveals that actual tool-call patterns are far narrower and more predictable than the provisioned role suggests. The fix for the genuine edge cases isn't leaving the broad grant in place for everyone — it's a fast, logged, just-in-time escalation path for the rare legitimate exception.

A test worth running this week: pick one production agent. Pull its actual IAM role or API scope. Then pull 30 days of its real tool-call logs. Put the two side by side. Most teams who do this exercise are surprised by how wide the gap is — and that gap is, today, completely unmonitored attack surface.

None of this requires waiting for better models or smarter guardrails. It requires treating agent entitlements the way mature cloud security teams learned, the hard way, to treat every other non-human identity: measured, right-sized, and re-evaluated — not granted once and forgotten.


Keep reading: the non-human identity explosion and why every AI agent needs an identity.

Start free · no card

See what your agents would do.

Monitor mode first — observe real tool calls, nothing is blocked until you enforce.