Architectural patterns for securing AI agents
Advanced Identity Cloud provides two distinct architectural patterns that let you secure and govern the way your AI agents interact with enterprise resources. Both patterns support core OAuth 2.0 flows, including delegated token exchange to allow your AI agents to securely act on behalf of end users.
Depending on an agent’s lifecycle, deployment scale, and how privileges are governed, you can implement one or both of the following:
-
AI agent identities: These model agents as registered, first-class managed identity objects with dedicated per-agent privileges. They are best suited for enterprise digital assistants acting on behalf of users and autonomous workers that require centralized identity governance.
-
Client ID Metadata Document (CIMD): These use dynamically fetched, zero-registration client metadata. They are best suited for high-volume agents, Model Context Protocol (MCP) clients, and short-lived containers where maintaining individual client records is impractical.
You can find a side-by-side comparison of these two patterns in Comparison of architectural patterns for securing AI agents.
Pattern 1: AI agent identities
In this pattern, Advanced Identity Cloud models each AI agent as an explicit, first-class identity.
Each agent is represented by a specialized OAuth 2.0 client linked to dedicated agent and privilege managed object types in the identity repository.
How it works
-
Object-driven delegated token exchange: When an agent acts on behalf of an end user (or another autonomous agent), it participates in an OAuth 2.0 Token Exchange flow. Advanced Identity Cloud validates the exchange against the agent’s assigned privileges and issues an access token asserting both the agent and user identities.
-
Per-agent privileges: Tenant administrators assign application privileges directly to each agent’s managed object, restricting the specific target applications, scopes, and actions that an individual agent instance can request.
-
Human-in-the-loop workflows: Token exchange supports step-up authentication and explicit user consent before high-risk or destructive actions execute.
-
Enterprise identity governance: Onboarded agent identities participate in lifecycle management, certification campaigns, and access reviews within Agent Governance.
|
Learn more and configure this pattern in Secure your AI-driven solutions using AI agent identities.
Pattern 2: Client ID Metadata Document (CIMD)
In this pattern, Advanced Identity Cloud eliminates the need to pre-register individual client records or managed identity objects.
Clients identify themselves using an HTTPS URL as their client_id.
How it works
-
Dynamic runtime configuration: The client’s
client_idpoints to an HTTPS URL hosting a JSON metadata document (aligned with the IETF OAuth Client ID Metadata Document draft specification). At runtime, Advanced Identity Cloud fetches and validates the document to configure the client dynamically. -
CIMD realm profiles: Tenant administrators define CIMD profiles with allowed URL patterns (for example,
https://agents.example.com/*) to restrict which client origins can interact with the authorization server. -
Delegated token exchange and flexible grants: CIMD clients support the OAuth 2.0 Token Exchange flow to act on behalf of users, as well as standard authorization code and client credentials grant flows. Delegation rules are governed through standard OAuth 2.0 delegation policies (such as may act scripts) and CIMD profile scopes.
-
Flexible authentication: Clients can authenticate as public clients or confidentially using asymmetric private keys (signed JSON Web Tokens) or mutual TLS (mTLS) without pre-shared secrets.
-
Zero per-agent administrative overhead: After you’ve created a CIMD profile, agents can use it to spin up, scale horizontally, or decommission dynamically with no configuration changes required in Advanced Identity Cloud.
|
Learn more and configure this pattern in Client ID Metadata Document (CIMD).