Skip to main content
Back

Ends Soon: Get 20% off all AlphaSignal Pro subscriptions. Subscribe here.

What OpenAI's identity stack reveals about securing AI agents

OpenAI's work with Ory shows why control over identity infrastructure matters at scale. Agent workloads bring those same questions into enterprise systems, along with a harder one: who authorized each action?

  • Ory's OpenAI case study describes an identity platform supporting more than 1.2 billion weekly active users. The requirements included self-hosting, better observability, and control over the login experience.
  • Agent workflows can multiply authenticated requests as one task branches into tool calls and sub-agents. Teams need to plan for token traffic and trace each action back through its delegation chain.
  • Local JWT validation reduces database lookups, but introduces revocation trade-offs. Agent security also needs action-level visibility, scoped credentials, and a deliberate rollout from observation to enforcement.

Why OpenAI wanted control over identity

Before an AI service can answer a request, it needs to establish who is making it and what access they have. At OpenAI's scale, the infrastructure behind that decision has to keep up with rapid product growth while giving engineers room to change the user experience.

In its OpenAI case study, Ory describes an identity platform supporting more than 1.2 billion weekly active users. OpenAI wanted to self-host its identity infrastructure, gain more operational visibility, and run experiments on signup and login flows. Those requirements shaped its choice of technology.

OpenAI adopted an Ory Enterprise License for Ory Hydra, Ory's OAuth 2.0 and OpenID Connect server. Ory's account also describes scalability testing with Ory Network and CockroachDB. The combination gave OpenAI more control over its customer identity and access management stack and the data needed to improve it.

For engineering teams, the useful lesson is how identity decisions affect product development. Owning the login experience makes it possible to test a change without fitting it into a vendor-hosted template. Better telemetry gives engineers a way to investigate authentication behavior as traffic grows.

Separate token issuance from user identity

Ory Hydra handles OAuth 2.0 and OpenID Connect, including issuing access tokens and ID tokens. It delegates user authentication to an external login provider, such as Ory Kratos or a team's existing system. That separation lets developers keep their identity backend while using Hydra for the protocol layer.

It also makes token design an explicit engineering choice. Hydra supports opaque access tokens, which are validated through a lookup, and self-contained JWT access tokens, which services can verify cryptographically without a database call.

The trade-off matters. Local JWT verification can reduce validation round-trips, but a signed token does not automatically stop working everywhere when a central record changes. Ory's documentation notes that opaque tokens are immediately revocable, while JWT access tokens cannot be instantly revoked. Teams need to choose token lifetimes and validation behavior around the access they are protecting.

These are capabilities of Hydra, rather than a description of OpenAI's exact token-validation deployment. The public case study establishes OpenAI's use of Hydra and its infrastructure requirements; it does not document every component in the request path.

One agent task can become many access checks

An enterprise does not need a billion users to encounter demanding identity traffic. Consider a hypothetical agent asked to reconcile vendor invoices. It might delegate work to sub-agents, query an internal database, and invoke external tools through Model Context Protocol (MCP). Each step can introduce another access decision.

The number of employees alone becomes a poor guide to the workload. Engineers need to understand how many downstream calls a task generates, which calls require token issuance or validation, and what happens when several workflows run at once.

That changes capacity planning and cost modeling. A system priced around active users can behave differently from one priced around machine-to-machine token issuance. Teams should model the expected workflow against the actual deployment and contract, including refreshes and validation traffic, before assuming costs will track headcount.

Throughput is only part of the problem. When several agents share a service account, an audit record may identify the credential without showing which agent performed the action or who delegated the work. More requests make that attribution gap harder to investigate.

Observe actions before enforcing policy

Ory Agent Security addresses that attribution problem inside the agent harness, the runtime that executes actions. Ory says each agent and sub-agent authenticates with its own credentials, with the delegation chain recorded before tools run. Action records can be exported through OpenTelemetry to a team's existing security systems.

That gives a security team a more specific record to examine: the agent that acted, the upstream user or agent, and the action it attempted. The delegation trail remains available after the credential expires.

A rollout can begin in observe mode, recording behavior without blocking it. Teams can use those records to see which tools agents actually invoke and where their access is broader than the task requires. Enforcement can then be introduced for selected categories or individual commands.

Credential policy needs the same care. Short-lived, narrowly scoped OAuth tokens can limit exposure, but task completion and token expiration are separate events unless the implementation explicitly connects them. A rollout should define how access ends, how revocation reaches the systems checking credentials, and what happens when a policy service is unavailable.

OpenAI's case offers a starting point for that design work: control over identity infrastructure, visibility into its behavior, and room to adapt it as usage changes. For agents, teams also need a record of delegated authority at the point where software takes action.

Teams evaluating this approach can explore Ory Agent Security and start with Observe Mode to understand agent activity before introducing enforcement.