Ai Engineering 3 min read

Verified IdP Logins Replace Shared Keys in Cloudflare AI Gateway

Cloudflare's new Identity-aware AI Gateway and User Insights features enforce Zero Trust verification for model requests and automatically flag usage anomalies.

Cloudflare launched Identity-aware AI Gateway in open beta alongside the general availability of User Insights on August 5, 2026. Released during the company’s Agents Week, the updates shift AI access management away from anonymous shared API keys toward verified, user-linked requests. If you build AI systems across enterprise environments, these features provide the attribution necessary for granular cost control and behavioral anomaly detection.

Identity Integration and Access Control

Administrators can now place their AI Gateway endpoint behind a custom domain protected by Cloudflare Access. This forces incoming requests to authenticate through an organization’s existing Identity Provider (IdP), supporting Okta and Microsoft Entra ID via SAML or OIDC. Every verified request passing through the gateway is tagged with an Access user ID. This metadata appears in request logs as cf.user_id or cf-access-user-id.

This verified attribution enables per-user and per-team spending limits. You can configure model-access policies to restrict expensive models to specific developers or teams. The system generates detailed audit logs that name the specific individual or automated agent responsible for each prompt. Early adopters like Flexport noted this integration allows organizations to use existing identity policies rather than building parallel authentication systems for AI clients. For teams looking to improve LLM observability, tying logs to identity removes the attribution gap caused by shared API keys.

Behavioral Analytics and Anomaly Detection

The User Insights engine evaluates gateway traffic to build a behavioral baseline for every authenticated user and automated agent. The system requires 30 days of telemetry to establish a reliable baseline using the 95th percentile (p95) session cost.

Once the baseline exists, User Insights automatically flags anomalous activity. Spikes that exceed twice the user’s p95 cost, or breach the 99th percentile (p99) account-level ceiling, are categorized as “Stars” in the analytics dashboard. These flags signal potential insider risk, misconfigured autonomous loops, or compromised accounts. To further secure MCP infrastructure, User Insights also highlights cost efficiency opportunities. It identifies users spending heavy compute on complex models like GPT-5.5 for simple tasks that smaller models could resolve.

Ecosystem Support and Availability

The Identity-aware Gateway supports requests routed to OpenAI, Anthropic, Google, and Cloudflare’s own Workers AI. The User Insights engine is available immediately to all AI Gateway customers at no additional cost.

These releases accompany other Agents Week launches, including the open-source Cloudflare OS workspace and the private beta of WriteGuard for fine-grained Model Context Protocol (MCP) server controls. With a Stanford University report indicating that 59 percent of organizations view knowledge gaps as their primary obstacle to responsible AI governance, these tools centralize visibility across fragmented model usage. To see how these tools fit into broader architectures, you can explore deploying agent workspaces to manage persistent infrastructure.

If you manage internal AI developer platforms or shared agent infrastructure, audit your current API key distribution. Transitioning to identity-aware endpoints eliminates the security blind spots of shared keys and provides the exact usage metrics needed to enforce strict financial limits.

Get Insanely Good at AI

Get Insanely Good at AI

The book for developers who want to understand how AI actually works. LLMs, prompt engineering, RAG, AI agents, and production systems.

Keep Reading