Blank white background with no objects or features visible.

We’re sharing complimentary access to the full Gartner Hype Cycle for AI Governance 2026. Get your copy →

AI Agent Identity and Access Control: TrueFoundry vs OpenRouter (2026)

By Chintan Donda

Updated: November 5, 2026

Published: November 5, 2026

TL;DR:

AI agent identity is the row where TrueFoundry and OpenRouter differ most. TrueFoundry models three principal types (users, virtual accounts for services, and agent identities), accepts your IdP's JWT at request time, rotates tokens into your secret manager, and authorises down to an individual MCP tool. OpenRouter models one: a human user in a workspace, whose keys die when they are deprovisioned, with two roles (Admin and Member) and no gateway-side governance of your own tools.

  • Choose OpenRouter if your callers are individual developers or a consumer app's end users, Admin/Member is enough, and you want its OAuth PKCE flow so users can spend their own credits without you running an auth backend.
  • Choose TrueFoundry if services, pipelines and agents need identities that outlive the people who created them, your IdP must be in the loop per request, you need roles finer than Admin/Member, or tool calls to your own MCP servers must be authorised per tool with user consent.
  • Both support SSO and SCIM, but TrueFoundry adds OIDC and ships them below the Enterprise tier; OpenRouter is SAML-only and Enterprise-only.
  • Neither documents native MFA, revocation propagation delay or RFC 8693 token exchange. Test those; do not assume them.

The question an AI gateway has to answer first is not which model to call but who, or what, is calling. Two years ago the answer was almost always a human with an API key. Today most requests through a gateway come from services, CI pipelines and agents, and the identity model decides whether a production system survives the day its creator leaves the company. That makes AI agent identity a primary evaluation criterion rather than a compliance footnote, and it is where TrueFoundry AI Gateway and OpenRouter diverge most sharply.

This post compares the two on the full identity heading: human identity (SSO, SCIM, MFA), workload and agent identity, authentication and authorization granularity, MCP authentication and tool authorization, credential lifecycle, and delegation. It is written for platform engineers and security teams running an evaluation, and every claim is drawn from the two vendors' public documentation. If you are already past the evaluation stage, you can book a TrueFoundry demo to see agent identities and tool-level RBAC live.

TrueFoundry vs OpenRouter on identity: at a glance

TrueFoundryOpenRouter
SSOSAML 2.0 and OIDCSAML only; Enterprise-only
SCIMYes (Okta, Entra, JumpCloud)Yes with group mappings; Enterprise-only
Workload identityVirtual accounts with their own tokensNone; keys belong to a human
Agent identityAgent Identity (beta)None
RolesRBAC at model, MCP-server and tool levelAdmin and Member
MCP tool authorizationInbound/outbound split, per-tool grants, OAuth user consentNot applicable to your tools
Runtime IdP JWTYesNo
OAuth for third-party appsMCP outbound consent flowsOAuth PKCE (strong)

Human identity: SSO, SCIM and MFA

TrueFoundry supports SSO over SAML 2.0 and OIDC, with per-IdP guides for Okta, Microsoft Entra, Google Workspace and JumpCloud, and SCIM provisioning of users and teams for Okta, Entra and JumpCloud (SSO overview). We keep our own user store and federate it three ways: SSO for login, SCIM for lifecycle, and Identity Providers for runtime token validation, covered below. One footnote belongs here as well as in our deployment post: by default, login transits our hosted auth server even in self-hosted deployments; on on-prem deployments on the higher-tier Enterprise plan, a Direct IdP integration removes that path — the control plane talks to your OIDC or SAML IdP directly and tokens are signed locally, so authentication traffic never leaves your environment (external SSO).

OpenRouter SSO is SAML, with named support for Okta, Microsoft Entra ID, Google Workspace or any custom SAML provider, on Enterprise plans only. Setup is self-serve: add your email domain, verify it with a DNS TXT record, connect the IdP, test and activate. OIDC is not named anywhere in its documentation. SCIM is supported with the IdP as source of truth, and SCIM Group Mappings map IdP groups to workspaces with a chosen role, including a “Refresh from IdP” action and audit-log entries for removals. One offboarding detail deserves attention from any security team: IdP deactivation revokes the organisation's access and deactivates the keys that user created in the organisation, but the individual's personal OpenRouter account and personal keys survive, and nothing stops that account calling the same models on its own credits, the keys that user created are deactivated across all of the organization's workspaces, and their memberships in other organizations are untouched; only deletion of the OpenRouter account itself ends personal access.

Neither vendor documents native MFA. Both delegate it to the identity provider through SSO, which is the right answer for an enterprise and the wrong answer for a team without an IdP.

AI agent identity and workload identity

This is the sharpest contrast on the heading, and the reason identity has become a procurement question rather than an admin setting.

TrueFoundry has three principal types. Users hold personal access tokens, which our documentation explicitly warns against using in production. Virtual accounts are first-class non-human identities for applications, services and CI, one per application recommended, with their own tokens that are separate from any user's (virtual accounts). Agent Identity, currently in beta, is a third principal type created 1:1 when an agent is registered, issued either by TrueFoundry or by your IdP, so an agent neither borrows a user's token nor hides behind a shared service account; an embedded agent's outbound calls are governed even when the gateway does not front its inbound traffic (agent identity). The beta label matters and we state it: the capability is documented, not GA.

Figure 1: The Agent Identity step of the Integrate a Remote Agent flow.

OpenRouter has no distinct non-human principal. There is no service account, virtual account or agent identity; every key is created by and belongs to a human user inside a workspace. What exists instead is programmatic key management. An OpenRouter provisioning key, generated in the dashboard, can manage other keys but cannot call completions; you use it against the /api/v1/keys endpoints to mint per-developer or per-project keys, each with an optional label and spend limit, and management keys operate at account level. A labelled, spend-limited key is better hygiene than one shared secret, but it is still a user's credential, and OpenRouter's own SCIM behaviour proves the coupling: deprovision the human and the keys they created are deactivated. A production service whose key was minted by an engineer who has since left stops working. That is the concrete operational risk, and it is the row to put in front of anyone evaluating OpenRouter for a fleet of services rather than a team of developers.

AI agent authentication and authorization: how fine-grained?

Authentication proves who is calling; authorization decides what they may do. In the first half both vendors accept bearer tokens at an OpenAI-compatible endpoint. In the second half they diverge.

TrueFoundry's authorization is RBAC, evaluated against the resolved identity, whether that is a user, a virtual account or an agent, at three levels: which models a principal may call, which MCP servers it may reach, and which individual tools within an MCP server it may invoke (user, team and account management). It is not ABAC; attribute- and condition-based rules live in our guardrail layer (Cedar and OPA policies), not in the authorization model. Scoping is identity-mediated: you scope the principal, not the token, which keeps the lifecycle clean when tokens rotate.

OpenRouter's authorization is RBAC with two roles. Org admins hold admin permissions across every workspace (keys, guardrails, BYOK, routing, presets, plugins, observability, members, settings) and only they can create or delete workspaces; members hold member permissions in each workspace they belong to; SCIM group mappings choose between those same two roles. Finer control arrives through guardrails attached to keys or members (budgets, model and provider allowlists, privacy and content controls), with the account-level policy as a ceiling a workspace can only narrow. Model-level restriction is possible via policy; route-, tool- and parameter-level restriction is not. What sits between “admin of everything” and “member” is thin: Workspace Admins can now issue workspace-scoped management keys that act only inside their workspace — a real delegation of key administration — but there is still no read-only auditor and no budget-owner role, and SCIM group mappings still choose between the same two org roles. For a 50-engineer organisation that wants one person to own a team's budget without owning the account, that is the row to watch.

For a broader look at how agents themselves are governed once authenticated, our agent gateway explainer covers the runtime side.

MCP authentication and tool authorization

MCP authentication is where the two products stop being comparable, because only one of them sits in front of your MCP servers.

TrueFoundry models two layers explicitly. Inbound authentication (who is calling the gateway: a PAT, a virtual account token or your IdP's JWT) is separated from outbound authentication (whose credentials reach the downstream MCP server), with RBAC deciding which users and agents can reach which servers and which individual tools in between. User consent is modelled on the outbound leg as an OAuth flow in which the end user authorises the MCP server with their own identity, documented end to end for Okta and Azure Entra, with per-server auth overrides (MCP gateway auth and security, tool approval). If you are new to the protocol side of this, our primer on MCP authorization covers the sp

Figure 2: MCP Gateway Authentication and Authorization Flow

OpenRouter does not govern your MCP servers. Its Agent SDK can now wire a remote MCP server into an agent loop client-side (@openrouter/mcp, HTTP/SSE), but that connection carries whatever credentials your application holds — there is no gateway-side model for how a tool call carries or checks identity, no per-tool grants, and no consent step. Its own MCP server authenticates you to OpenRouter's catalogue, which is inbound access to OpenRouter, not authorization of your tools. The closest surface is its server-operated tools: shell and bash run in containers scoped per account and workspace and never shared across tenants, and bash's engine field decides whether execution happens server-side or is returned to your application. It is isolation, not authorization: no per-tool grants, no consent.

Credential lifecycle: issuance, rotation, revocation

TrueFoundry virtual account tokens support auto-rotation on a configurable interval with a configurable grace period for the old token, rotation notifications by email or Slack, and automatic sync of rotated tokens into AWS Secrets Manager and Parameter Store, GCP Secret Manager, HashiCorp Vault and Azure Key Vault (virtual accounts). Personal tokens die with the user. Revocation propagation delay is not documented; configuration syncs to gateway planes over NATS, so it should be near real time, but it is a test-it-yourself item.

OpenRouter has three issuance paths: the dashboard, the Management API via a provisioning key, and OAuth PKCE. For inference keys, spend limits and reset intervals (daily, weekly or monthly at midnight UTC) substitute for TTLs and no expiry is documented. Management keys now support an expiration date — fixed at creation, not extendable (create a new key to extend), with requests failing 401 “API key expired” afterwards — and OpenRouter recommends setting one on every management key. Rotation is programmatic regeneration, with no scheduled auto-rotation or grace-period mechanism. Revocation is via dashboard, Management API or SCIM deactivation, with propagation delay not documented. One operational wrinkle: removing a member from a workspace requires deleting the keys they created there first.

Delegation: OAuth PKCE vs runtime IdP JWT

Both vendors support delegation, in forms built for different buyers.

OpenRouter OAuth is PKCE, and it is unusually well developed. A third-party app sends the user to openrouter.ai/auth with a callback URL and a code_challenge; after the user authorises, the app exchanges the code at /api/v1/auth/keys for a key that spends from that user's own credits. The authorization codes are single-use and expire after 10 minutes. No client registration, no client secret, no backend, and localhost callbacks on any port for local CLI tools. For consumer apps and developer tools this is a real strength and we concede it fully. What it is not: the result is a long-lived API key rather than a scoped, expiring token, there is no refresh mechanism, and delegation happens once at authorisation time with no per-request identity propagation. There is also no documented path to present your IdP's JWT to the inference API; every request carries an OpenRouter-issued key, so the caller's real identity has to be reconstructed downstream from key labels.

TrueFoundry's delegation is built for the enterprise case. With Identity Providers, an external app or user presents your IdP's JWT directly to the gateway; we validate it via JWKS and resolve it to a TrueFoundry identity for RBAC, preserving the upstream user's identity on every request without minting a TrueFoundry token at all (identity providers). The MCP outbound OAuth leg acts as user-delegated access to downstream tools. Formal RFC 8693 token exchange is not documented on either side.

TrueFoundry vs OpenRouter: identity head-to-head

TrueFoundry capabilities are from our documentation; OpenRouter capabilities reflect its publicly documented functionality at the time of writing.

CapabilityTrueFoundryOpenRouter
SSO protocolsSAML 2.0 and OIDC; Okta, Entra, Google Workspace, JumpCloudSAML only; Enterprise-only; OIDC not named
SCIMUsers and teams (Okta, Entra, JumpCloud)Yes (Enterprise); group-to-workspace mappings; personal account survives deprovisioning
Native MFANot documented (IdP-delegated)Not documented (IdP-delegated)
Workload identityVirtual accounts with their own tokensNone; keys belong to a human user
Agent identityAgent Identity (beta), TrueFoundry- or IdP-issuedNone
Effect of offboarding a humanPersonal tokens die; virtual accounts unaffectedKeys the human created in the org are deactivated; services using them stop
Authorization modelRBAC at model, MCP-server and tool level; not ABACRBAC with Admin and Member; granularity via guardrails; not ABAC
Intermediate rolesTeam managers; model-account Manager vs UserWorkspace Admins can issue workspace-scoped management keys; no auditor or budget-owner roles
MCP / tool authorizationInbound/outbound split; per-server and per-tool RBAC; OAuth user consentNo model for your tools; server-tool containers isolated per workspace
Token rotationAuto-rotation, grace period, notifications, sync to AWS/GCP/Azure/VaultProgrammatic regeneration only
Token TTLConfigurable rotation intervalManagement keys: fixed expiration at creation; inference keys: spend limits and resets, no expiry documented
Revocation propagation delayNot documentedNot documented
DelegationRuntime IdP JWT resolution per request; MCP outbound OAuthOAuth PKCE issuing a long-lived key; no refresh; no per-request propagation
RFC 8693 token exchangeNot documentedNot documented
User storeOwn store; federated via SSO, SCIM and runtime JWT; login transits TrueFoundry auth server by default; Direct IdP removes it on on-prem EnterpriseOwn store; federated via SAML and SCIM (Enterprise)

When to choose OpenRouter

  • Your callers are individual developers, each with their own key and spend limit, and a two-role model covers how your organisation actually works.
  • You are building a consumer app or a CLI tool where end users should pay for their own inference; OpenRouter's OAuth PKCE flow is the cleanest implementation of that pattern available.
  • You do not have an IdP in the loop yet and are not ready to pay for Enterprise to get SSO and SCIM; OpenRouter's provisioning keys give you labelled, capped per-project keys at no extra cost.

When to choose TrueFoundry

  • Services, pipelines and agents make most of your calls and need identities that outlive the people who set them up. Virtual accounts and agent identities exist for exactly this.
  • Your identity provider must be in the loop at request time, not only at login, so that a user's real identity reaches the gateway on every call without a gateway-issued token in between.
  • You need roles between “everything” and “member”: a team manager who owns a budget, a model-account manager who does not own the tenant.
  • Your traffic includes your own MCP tools and agents, and tool calls must be authorised per tool with the end user's consent and the right downstream credentials.
  • Rotation has to be automatic and land in your secret manager, not be a calendar reminder.

For the wider field of gateways that offer workload identity and SSO below an Enterprise tier, see our guide to OpenRouter alternatives.

Related reading

Conclusion

OpenRouter's identity model is a developer's: humans own keys, two roles cover the organisation, and its best feature lets other people's apps spend a user's credits safely. TrueFoundry's identity model is a platform's: three principal types, runtime federation with your IdP, rotation that lands in your secret manager, and authorization that reaches down to an individual MCP tool. On AI agent identity specifically, one product has it and one does not, and that single row will decide the evaluation for any organisation whose services and agents outnumber its developers.

If you are evaluating how agents and services will authenticate to your models and tools, book a demo to see virtual accounts, agent identities and tool-level RBAC on the TrueFoundry AI Gateway.

Try now.

One gateway for all your models, MCP servers, and agents.
No credit card needed.

Start free
Table of Contents

One Gateway for Every LLM, Agent and MCP Server

Book a 30-min with our AI expert

Book a Demo

The fastest way to build, govern and scale your AI

Book Demo
Summarize with
ChatGPT logo by OpenAI
Perplexity AI logo
Blurry red snowflake on white background, symmetrical frosty design with soft edges and abstract shape.

Discover More

No items found.
November 5, 2026
|
5 min read

AI Agent Identity and Access Control: TrueFoundry vs OpenRouter (2026)

No items found.
November 5, 2026
|
5 min read

Can You Run OpenRouter Self-Hosted? TrueFoundry vs OpenRouter on Deployment and Architecture

No items found.
November 5, 2026
|
5 min read

TrueFoundry vs OpenRouter: Enterprise AI Gateway vs Model Marketplace (2026)

No items found.
November 5, 2026
|
5 min read

TrueFoundry vs OpenRouter: Privacy, Tenancy and Isolation — Who Can See Your Prompts? (2026)

No items found.
No items found.

Recent Blogs

Black left pointing arrow symbol on white background, directional indicator.
Black left pointing arrow symbol on white background, directional indicator.

Frequently asked questions

What is AI agent identity in an AI gateway?

AI agent identity is a first-class principal that an agent authenticates as, distinct from any human user's credential and from a shared service account, so the gateway can apply RBAC, budgets and audit to the agent itself. TrueFoundry issues agent identities 1:1 at registration (beta), either TrueFoundry- or IdP-issued; OpenRouter has no agent or workload identity, so an agent runs on a human's key.

Does OpenRouter support SSO and SCIM?

Yes, on its Enterprise plan. SSO is SAML only (Okta, Entra, Google Workspace or custom SAML; OIDC is not documented), and SCIM supports group-to-workspace mappings. Deprovisioning a user deactivates the keys they created in the organisation but leaves their personal OpenRouter account and personal keys active.

How does MCP authentication work through an AI gateway?

TrueFoundry separates inbound authentication (who is calling the gateway: a user token, a virtual account token or your IdP's JWT) from outbound authentication (whose credentials reach the MCP server), with RBAC on which servers and individual tools a principal can call and an OAuth consent flow for the end user on the outbound leg. OpenRouter does not sit in front of your MCP servers, so it has no equivalent.

Does TrueFoundry support MCP and AI agents?

Yes. TrueFoundry includes an MCP Gateway with tool-level access control and pre/post-tool guardrails, an Agent Gateway with agent identities, and an agent harness, so agents built on LangGraph, CrewAI, Strands, the OpenAI Agents SDK or custom frameworks can be governed centrally alongside 1,000+ LLMs behind one OpenAI-compatible API, with single-digit-millisecond added latency and a published benchmark of 250 RPS on a single 1 vCPU / 1 GB pod, scaling to ~350 RPS before CPU saturation.

Can I deploy TrueFoundry in my own VPC or on-prem?

Yes. TrueFoundry runs as managed SaaS, in hybrid mode with the gateway plane in your VPC, or fully self-hosted including air-gapped environments, on one control plane. In hybrid and self-hosted modes, prompt and response traffic never leaves your network.

Is TrueFoundry SOC 2 / HIPAA / GDPR compliant?

TrueFoundry documents SOC 2 Type II, HIPAA and GDPR for its managed infrastructure, with RBAC, SSO and audit logging built in; current attestations are available through the Trust Center at trust.truefoundry.com.

Take a quick product tour
Start Product Tour
Product Tour