Secure AI Architecture, Guardrails & Agentic IAM, 30 min read

Authorisation for agents and the AI identity lifecycle

In this lesson you will:

  • Apply least privilege and separation of duties across models and agentic workflows
  • Choose between RBAC, ABAC, PBAC and just-in-time access for AI
  • Set execution boundaries and API scope limitations
  • Prevent excessive agency, over-delegation and lateral movement by agents
  • Manage AI identity inventories, provisioning, access reviews, ISPM and resource-use audits

Authentication says who an agent is. Authorisation decides what it may do — and for agents, that decision has to be made constantly, at the level of individual tool calls.

1. Least privilege and separation of duties

Least privilege (PoLP) for AI means:

  • Each agent gets only the tools, scopes and data its task needs — not everything its owner can access.
  • Permissions are task-scoped and time-bound where possible.
  • Read and write capabilities are separate; destructive capabilities (delete, transfer, deploy) are rare and gated.

Separation of duties (SoD) applies to agentic workflows too:

  • The agent that proposes a payment should not also approve it.
  • An agent that writes code should not be able to merge and deploy it without independent review.
  • A model-development pipeline identity should not promote its own models (Module 5).
  • In multi-agent systems, avoid one agent holding a complete set of conflicting permissions.

2. Authorisation models

RBAC, ABAC, PBAC and JIT compared for AI agents.
Figure 6.12 Authorisation models for AI. Agents usually need attribute- and policy-based decisions made per call, with just-in-time elevation for rare actions.
Model How it decides Fit for AI
RBAC (role-based) Permissions attached to roles Good baseline for humans and coarse agent roles; too coarse for per-call decisions
ABAC (attribute-based) Attributes of user, agent, resource, action and context Good for "this user's records only", "amounts under ₹10,000", "business hours"
PBAC (policy-based) Central, versioned policies evaluated by a policy engine (policy as code) Best fit for agent harnesses: consistent, auditable, testable decisions per tool call
JIT (just-in-time) Temporary elevation for a specific task, often approved For rare high-risk actions; no standing privilege

In practice: RBAC defines which agent types exist; ABAC/PBAC decide each tool call; JIT covers exceptions.

3. Execution boundaries and API scope limitations

  • API scopes — OAuth scopes narrowed to specific operations (invoices.read, not erp.admin).
  • Resource boundaries — specific projects, mailboxes, folders, tenants.
  • Network boundaries — agents can reach only the endpoints their tools need.
  • Quantitative boundaries — amounts, counts, rates and time windows.
  • Environmental boundaries — test agents cannot reach production; sandboxes for code.

4. Excessive agency, over-delegation and lateral movement

Excessive agency: excessive functionality, permissions and autonomy, with lateral movement paths.
Figure 6.13 Excessive agency has three parts — too much functionality, too many permissions, too much autonomy. Together they create lateral-movement paths.

Excessive agency (an OWASP LLM Top 10 risk) has three components:

  1. Excessive functionality — tools the task doesn't need (a summariser that can also send email).
  2. Excessive permissions — tools with broader rights than needed (read-write when read-only would do; all mailboxes instead of one).
  3. Excessive autonomy — high-impact actions without human approval.

Over-delegation — passing broad authority down a chain of agents, so a sub-agent ends up with more power than its task needs. Delegate narrowed, time-limited scopes, and cap delegation depth.

Lateral movement by agents — a compromised or manipulated agent uses its credentials and tool access to reach other systems — for example, reading secrets from a file system tool, then using them against another service. Contain it with per-agent identities, network segmentation, no shared credentials, and monitoring for unusual tool sequences.

5. Identity lifecycle and auditing

Lifecycle of an AI identity from request to deprovisioning, with reviews.
Figure 6.14 The AI identity lifecycle. Orphaned agent identities with live credentials are a growing source of risk.
  • AI identity inventory — every human and non-human identity used by AI systems, with owner, purpose, scopes, credentials and linked use case. Link it to the AI use-case inventory.
  • Provisioning — identities created through a request with an owner and justification; scopes approved by the resource owner.
  • Deprovisioning — when an agent is retired, its project ends or its owner leaves: revoke tokens, delete credentials, remove grants. Orphaned agent identities are a classic gap.
  • Periodic access reviews — owners recertify agent scopes, as they do for humans; unused permissions are removed.
  • Identity Security Posture Management (ISPM) — tools that continuously analyse identity configurations for risk: over-privileged service accounts, stale credentials, missing MFA, risky OAuth grants, toxic permission combinations.
  • Audit of AI resource utilisation — token accounting per identity, rate-limit hits, session timeouts, spend per agent. Anomalies can reveal compromise, abuse or runaway loops.

Worked example — a quarterly agent access review

Agent Finding Action
Sales-research agent Holds crm.write but only ever reads Reduce to crm.read
HR policy assistant Retrieval covers all HR folders including investigations Restrict index to published policies only
Deploy-helper agent Owner left the company 2 months ago; token still valid Disable, revoke, assign new owner or retire
Finance AP agent Uses token exchange; scopes match task No change
Coding agent Can merge to main without review Enforce branch protection; agent may open pull requests only
Unknown service principal calling model API Not in inventory Investigate as possible shadow AI; block until registered

🔐 Security lens

Ask of every agent: "If this agent were fully controlled by an attacker for an hour, what could they do?" The answer is its real privilege — design it down until you can accept it.

Key takeaways

  • Least privilege and separation of duties apply to agents: task-scoped, time-bound, separate read/write, no single agent with conflicting powers.
  • RBAC for coarse roles; ABAC/PBAC for per-call decisions in the harness; JIT for rare elevation.
  • Set boundaries on scopes, resources, networks, quantities and environments.
  • Excessive agency = too much functionality, permission or autonomy; over-delegation and lateral movement extend the damage.
  • Keep an AI identity inventory, provision and deprovision deliberately, review access, use ISPM and audit resource use.

Self-check

  1. Give an example of each of the three components of excessive agency.
  2. Why is PBAC a good fit for agent harnesses?
  3. What should happen to an agent's identity when its owner leaves the organisation?