
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:media="http://search.yahoo.com/mrss/">
    <channel>
        <title><![CDATA[ The Cloudflare Blog ]]></title>
        <description><![CDATA[ Get the latest news on how products at Cloudflare are built, technologies used, and join the teams helping to build a better Internet. ]]></description>
        <link>https://blog.cloudflare.com</link>
        <atom:link href="https://blog.cloudflare.com/" rel="self" type="application/rss+xml"/>
        <language>en-us</language>
        <image>
            <url>https://blog.cloudflare.com/favicon.png</url>
            <title>The Cloudflare Blog</title>
            <link>https://blog.cloudflare.com</link>
        </image>
        <lastBuildDate>Wed, 15 Apr 2026 17:48:42 GMT</lastBuildDate>
        <item>
            <title><![CDATA[Managed OAuth for Access: make internal apps agent-ready in one click]]></title>
            <link>https://blog.cloudflare.com/managed-oauth-for-access/</link>
            <pubDate>Tue, 14 Apr 2026 13:00:10 GMT</pubDate>
            <description><![CDATA[ Managed OAuth for Cloudflare Access helps AI agents securely navigate internal applications. By adopting RFC 9728, agents can authenticate on behalf of users without using insecure service accounts. ]]></description>
            <content:encoded><![CDATA[ <p>We have thousands of internal apps at Cloudflare. Some are things we’ve built ourselves, others are self-hosted instances of software built by others. They range from business-critical apps nearly every person uses, to side projects and prototypes.</p><p>All of these apps are protected by <a href="https://developers.cloudflare.com/cloudflare-one/access-controls/policies/"><u>Cloudflare Access</u></a>. But when we started using and building agents — particularly for uses beyond writing code — we hit a wall. People could access apps behind Access, but their agents couldn’t.</p><p>Access sits in front of internal apps. You define a policy, and then Access will send unauthenticated users to a login page to choose how to authenticate. </p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3867rU5n4IkRilnfCAvOLD/8ec5ea3c25dbd6620a8644d231893732/BLOG-3146_2.png" />
          </figure><p><sup><i>Example of a Cloudflare Access login page</i></sup></p><p>This flow worked great for humans. But all agents could see was a redirect to a login page that they couldn’t act on.</p><p>Providing agents with access to internal app data is so vital that we immediately implemented a stopgap for our own internal use. We modified OpenCode’s <a href="https://opencode.ai/docs/tools/#webfetch"><u>web fetch tool</u></a> such that for specific domains, it triggered the <a href="https://developers.cloudflare.com/cloudflare-one/tutorials/cli/"><u>cloudflared</u></a> CLI to open an authorization flow to fetch a <a href="https://www.cloudflare.com/learning/access-management/token-based-authentication/"><u>JWT</u></a> (JSON Web Token). By appending this token to requests, we enabled secure, immediate access to our internal ecosystem.</p><p>While this solution was a temporary answer to our own dilemma, today we’re retiring this workaround and fixing this problem for everyone. Now in open beta, every Access application supports managed OAuth. One click to enable it for an Access app, and agents that speak OAuth 2.0 can easily discover how to authenticate (<a href="https://datatracker.ietf.org/doc/html/rfc9728"><u>RFC 9728</u></a>), send the user through the auth flow, and receive back an authorization token (the same JWT from our initial solution). </p><p>Now, the flow works smoothly for both humans and agents. Cloudflare Access has a generous <a href="https://www.cloudflare.com/plans/zero-trust-services/"><u>free tier</u></a>. And building off our newly-introduced <a href="https://blog.cloudflare.com/organizations-beta/"><u>Organizations beta</u></a>, you’ll soon be able to bridge identity providers across Cloudflare accounts too.</p>
    <div>
      <h2>How managed OAuth works</h2>
      <a href="#how-managed-oauth-works">
        
      </a>
    </div>
    <p>For a given internal app protected by Cloudflare Access, you enable managed OAuth in one click:</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/79FSFNeaDbqn9DkSyfKrtz/5f0fd06ce9e127c06474263a529ec284/BLOG-3146_3.png" />
          </figure><p>Once managed OAuth is enabled, Cloudflare Access acts as the authorization server. It returns the <code>www-authenticate</code> header, telling unauthorized agents where to look up information on how to get an authorization token. They find this at <code>https://&lt;your-app-domain&gt;/.well-known/oauth-authorization-server</code>. Equipped with that direction, agents can just follow OAuth standards: </p><ol><li><p>The agent dynamically registers itself as a client (a process known as Dynamic Client Registration — <a href="https://datatracker.ietf.org/doc/html/rfc7591"><u>RFC 7591</u></a>), </p></li><li><p>The agent sends the human through a PKCE (Proof Key for Code Exchange) authorization flow (<a href="https://datatracker.ietf.org/doc/html/rfc7636"><u>RFC 7636</u></a>)</p></li><li><p>The human authorizes access, which grants a token to the agent that it can use to make authenticated requests on behalf of the user</p></li></ol><p>Here’s what the authorization flow looks like:</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/2LkJMuPCNX1Mu7MfEnFinH/fef5cf3f87e83d93c49ffeadbe6aed4d/BLOG-3146_4.png" />
          </figure><p>If this authorization flow looks familiar, that’s because it’s what the <a href="https://modelcontextprotocol.io/specification/"><u>Model Context Protocol (MCP)</u></a> uses. We originally built support for this into our <a href="https://developers.cloudflare.com/cloudflare-one/access-controls/ai-controls/mcp-portals/"><u>MCP server portals</u></a> product, which proxies and controls access to many MCP servers, to allow the portal to act as the OAuth server. Now, we’re bringing this to all Access apps so agents can access not only MCP servers that require authorization, but also web pages, web apps, and REST APIs.</p>
    <div>
      <h2>Mass upgrading your internal apps to be agent-ready</h2>
      <a href="#mass-upgrading-your-internal-apps-to-be-agent-ready">
        
      </a>
    </div>
    <p>Upgrading the long tail of internal software to work with agents is a daunting task. In principle, in order to be agent-ready, every internal and external app would ideally have discoverable APIs, a CLI, a well-crafted MCP server, and have adopted the many emerging agent standards.</p><p>AI adoption is not something that can wait for everything to be retrofitted. Most organizations have a significant backlog of apps built over many years. And many internal “apps” work great when treated by agents as simple websites. For something like an internal wiki, all you really need is to enable <a href="https://blog.cloudflare.com/markdown-for-agents/"><u>Markdown for Agents</u></a>, turn on managed OAuth, and agents have what they need to read protected content.</p><p>To make the basics work across the widest set of internal applications, we use Managed OAuth. By putting Access in front of your legacy internal apps, you make them agent-ready instantly. No code changes, no retrofitting. Instead, just immediate compatibility.</p>
    <div>
      <h2>It’s the user’s agent. No service accounts and tokens needed</h2>
      <a href="#its-the-users-agent-no-service-accounts-and-tokens-needed">
        
      </a>
    </div>
    <p>Agents need to act on behalf of users inside organizations. One of the biggest anti-patterns we’ve seen is people provisioning service accounts for their agents and MCP servers, authenticated using static credentials. These have their place in simple use cases and quick prototypes, and Cloudflare Access supports <a href="https://developers.cloudflare.com/cloudflare-one/access-controls/service-credentials/service-tokens/"><u>service tokens</u></a> for this purpose.</p><p>But the service account approach quickly shows its limits when fine-grained access controls and audit logs are required. We believe that every action an agent performs must be easily attributable to the human who initiated it, and that an agent must only be able to perform actions that its human operator is likewise authorized to do. Service accounts and static credentials become points at which attribution is lost. Agents that launder all of their actions through a service account are susceptible to <a href="https://en.wikipedia.org/wiki/Confused_deputy_problem"><u>confused deputy problems</u></a> and result in audit logs that appear to originate from the agent itself.</p><p>For security and accountability, agents must use security primitives capable of expressing this user–agent relationship. OAuth is the industry standard protocol for requesting and delegating access to third parties. It gives agents a way to talk to your APIs on behalf of the user, with a token scoped to the user’s identity, so that access controls correctly apply and audit logs correctly attribute actions to the end user.</p>
    <div>
      <h2>Standards for the win: how agents can and should adopt RFC 9728 in their web fetch tools</h2>
      <a href="#standards-for-the-win-how-agents-can-and-should-adopt-rfc-9728-in-their-web-fetch-tools">
        
      </a>
    </div>
    <p><a href="https://datatracker.ietf.org/doc/html/rfc9728"><u>RFC 9728</u></a> is the OAuth standard that makes it possible for agents to discover where and how to authenticate. It standardizes where this information lives and how it’s structured. This RFC became official in April 2025 and was quickly adopted by the Model Context Protocol (MCP), which now <a href="https://modelcontextprotocol.io/specification/2025-11-25/basic/authorization"><u>requires that both MCP servers and clients support it</u></a>.</p><p>But outside of MCP, agents should adopt RFC 9728 for an even more essential use case: making requests to web pages that are protected behind OAuth and making requests to plain old REST APIs.</p><p>Most agents have a tool for making basic HTTP requests to web pages. This is commonly called the <a href="https://platform.claude.com/docs/en/agents-and-tools/tool-use/web-fetch-tool"><u>“web fetch” tool</u></a>. It’s similar to using the <a href="https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API"><u>fetch()</u></a> API in JavaScript, often with some additional post-processing on the response. It’s what lets you paste a URL into your agent and have your agent go look up the content.</p><p>Today, most agents’ web fetch tools won’t do anything with the <code>www-authenticate</code> header that a URL returns. The underlying model might choose to introspect the response headers and figure this out on its own, but the tool itself does not follow <code>www-authenticate</code>, look up <code>/.well-known/oauth-authorization-server</code>, and act as the client in the OAuth flow. But it <i>can</i>, and we strongly believe it <i>should</i>! Agents already do this to act as remote MCP clients.</p><p>To demonstrate this, we’ve put up a draft pull request that <a href="https://github.com/anomalyco/opencode/pull/22096/"><u>adapts the web fetch tool in Opencode</u></a> to show this in action. Before making a request, the adapted tool first checks whether it already has credentials ; if it does, it uses them to make the initial request. If the tool gets back a 401 or a 403 with a <code>www-authenticate</code> header, it asks the user for consent to be sent through the server’s OAuth flow.</p><p>Here’s how that OAuth flow works. If you give the agent a URL that is protected by OAuth and complies with RFC 9728, the agent prompts the human for consent to open the authorization flow:</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/1vo4hGtVz7ovlNQslTvTal/3d2b1a861b9342842bd6297e1869aed4/BLOG-3146_5.png" />
          </figure><p>…sending the human to the login page:</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3867rU5n4IkRilnfCAvOLD/8ec5ea3c25dbd6620a8644d231893732/BLOG-3146_2.png" />
          </figure><p>…and then to a consent dialog that prompts the human to grant access to the agent:</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/39I0yjWXKGLNG4mhV5jEPQ/793559a5f18a04e807939b9560118ccb/BLOG-3146_6.png" />
          </figure><p>Once the human grants access to the agent, the agent uses the token it has received to make an authenticated request:</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/4e0mNkih5xtbAoQpwBrB32/701089e8ea256804890d45af08ef04ca/BLOG-3146_7.png" />
          </figure><p>Any agent from Codex to Claude Code to Goose and beyond can implement this, and there’s nothing bespoke to Cloudflare. It’s all built using OAuth standards.</p><p>We think this flow is powerful, and that supporting RFC 9728 can help agents with more than just making basic web fetch requests. If a REST API supports RFC 9728 (and the agent does too), the agent has everything it needs to start making authenticated requests against that API. If the REST API supports <a href="https://www.rfc-editor.org/rfc/rfc9727"><u>RFC 9727</u></a>, then the client can discover a catalog of REST API endpoints on its own, and do even more without additional documentation, agent skills, MCP servers or CLIs. </p><p>Each of these play important roles with agents — Cloudflare itself provides an <a href="https://blog.cloudflare.com/code-mode-mcp/"><u>MCP server for the Cloudflare API</u></a> (built using <a href="https://blog.cloudflare.com/code-mode/"><u>Code Mode</u></a>), <a href="https://developers.cloudflare.com/workers/wrangler/commands/"><u>Wrangler CLI</u></a>, and <a href="https://github.com/cloudflare/skills"><u>Agent Skills</u></a>, and a <a href="https://x.com/CloudflareDev/status/2037336582815175122"><u>Plugin</u></a>. But supporting RFC 9728 helps ensure that even when none of these are preinstalled, agents have a clear path forward. If the agent has a <a href="https://blog.cloudflare.com/dynamic-workers/"><u>sandbox to execute untrusted code</u></a>, it can just write and execute code that calls the API that the human has granted it access to. We’re working on supporting this for Cloudflare’s own APIs, to help your agents understand how to use Cloudflare.</p>
    <div>
      <h2>Coming soon: share one identity provider (IdP) across many Cloudflare accounts</h2>
      <a href="#coming-soon-share-one-identity-provider-idp-across-many-cloudflare-accounts">
        
      </a>
    </div>
    <p>At Cloudflare our own internal apps are deployed to dozens of different Cloudflare accounts, which are all part of an Organization — a <a href="https://blog.cloudflare.com/organizations-beta/"><u>newly introduced</u></a> way for administrators to manage users, configurations, and view analytics across many Cloudflare accounts. We have had the same challenge as many of our customers: each Cloudflare account has to separately configure an IdP, so Cloudflare Access uses our identity provider. It’s critical that this is consistent across an organization — you don’t want one Cloudflare account to inadvertently allow people to sign in just with a one-time PIN, rather than requiring that they authenticate via single-sign on (SSO).</p><p>To solve this, we’re currently working on making it possible to share an identity provider across Cloudflare accounts, giving organizations a way to designate a single primary IdP for use across every account in their organization.</p><p>As new Cloudflare accounts are created within an organization, administrators will be able to configure a bridge to the primary IdP with a single click, so Access applications across accounts can be protected by one identity provider. This removes the need to manually configure IdPs account by account, which is a process that doesn’t scale for organizations with many teams and individuals each operating their own accounts.</p>
    <div>
      <h2>What’s next</h2>
      <a href="#whats-next">
        
      </a>
    </div>
    <p>Across companies, people in every role and business function are now using agents to build internal apps, and expect their agents to be able to access context from internal apps. We are responding to this step function growth in internal software development by making the <a href="https://workers.cloudflare.com/"><u>Workers Platform</u></a> and <a href="https://developers.cloudflare.com/cloudflare-one/"><u>Cloudflare One</u></a> work better together — so that it is easier to build and secure internal apps on Cloudflare. </p><p>Expect more to come soon, including:</p><ul><li><p>More direct integration between Cloudflare Access and Cloudflare Workers, without the need to validate JWTs or remember which of many routes a particular Worker is exposed on.</p></li><li><p><a href="https://github.com/cloudflare/workers-sdk/pull/13126"><u>wrangler dev --tunnel</u></a> — an easy way to expose your local development server to others when you’re building something new, and want to share it with others before deploying</p></li><li><p>A CLI interface for Cloudflare Access and the <a href="https://blog.cloudflare.com/cf-cli-local-explorer/"><u>entire Cloudflare API</u></a></p></li><li><p>More announcements to come during Agents Week 2026</p></li></ul>
    <div>
      <h2>Enable Managed OAuth for your internal apps behind Cloudflare Access</h2>
      <a href="#enable-managed-oauth-for-your-internal-apps-behind-cloudflare-access">
        
      </a>
    </div>
    <p>Managed OAuth is now available, in open beta, to all Cloudflare customers. Head over to the <a href="https://dash.cloudflare.com/"><u>Cloudflare dashboard</u></a> to enable it for your Access applications. You can use it for any internal app, whether it’s one built on <a href="https://workers.cloudflare.com/"><u>Cloudflare Workers</u></a>, or hosted elsewhere. And if you haven’t built internal apps on the Workers Platform yet — it’s the fastest way for your team to go from zero to deployed (and protected) in production.</p> ]]></content:encoded>
            <category><![CDATA[Agents Week]]></category>
            <category><![CDATA[Agents]]></category>
            <category><![CDATA[Security]]></category>
            <category><![CDATA[Zero Trust]]></category>
            <category><![CDATA[SASE]]></category>
            <category><![CDATA[Cloudflare Access]]></category>
            <category><![CDATA[Cloudflare One]]></category>
            <category><![CDATA[AI]]></category>
            <category><![CDATA[Developers]]></category>
            <category><![CDATA[Developer Platform]]></category>
            <guid isPermaLink="false">6pXy7tbG2SlwZZPQuO14Rq</guid>
            <dc:creator>Eduardo Gomes</dc:creator>
            <dc:creator>James Royal</dc:creator>
            <dc:creator>Ann Ming Samborski</dc:creator>
        </item>
        <item>
            <title><![CDATA[Infinitely extensible Access policies]]></title>
            <link>https://blog.cloudflare.com/access-external-validation-rules/</link>
            <pubDate>Tue, 21 Jun 2022 13:44:43 GMT</pubDate>
            <description><![CDATA[ Starting today, we’re excited that Access policies can consider anything before allowing a user access to an application. And by anything, we really do mean absolutely anything. ]]></description>
            <content:encoded><![CDATA[ <p></p><p>Zero Trust application security means that every request to an application is denied unless it passes a specific set of defined security policies. Most <a href="https://www.cloudflare.com/learning/security/glossary/what-is-zero-trust/">Zero Trust</a> solutions allow the use of a user’s identity, device, and location as variables to define these security policies.</p><p>We heard from customers that they wanted more control and more customizability in defining their Zero Trust policies.</p><p>Starting today, we’re excited that Access policies can consider anything before allowing a user access to an application. And by anything, we really do mean absolutely <i>anything</i>. You can now build infinitely customizable policies through the External Evaluation rule option, which allows you to call any <a href="https://www.cloudflare.com/learning/security/api/what-is-an-api/">API</a> during the evaluation of an Access policy.</p>
    <div>
      <h3>Why we built external evaluation rules</h3>
      <a href="#why-we-built-external-evaluation-rules">
        
      </a>
    </div>
    <p>Over the past few years we added the ability to check location and device posture information in Access. However, there are always additional signals that can be considered depending on the application and specific requirements of an organization. We set out to give customers the ability to check whatever signal they require without any direct support in Access policies.</p><p>The Cloudflare security team, as an example, needed the ability to verify a user’s mTLS certificate against a registry to ensure applications can only be accessed by the right user from a corporate device. Originally, they considered using a Worker to check the user’s certificate after Access evaluated the request. However, this was going to take custom software development and maintenance over time. With External Evaluation rules, an API call can be made to verify whether a user is presenting the correct certificate for their device. The API call is made to a Worker that stores the mapping of mTLS certificates and user devices. The Worker executes the custom logic and then returns a true or false to Access.</p>
    <div>
      <h3>How it works</h3>
      <a href="#how-it-works">
        
      </a>
    </div>
    <p>Cloudflare Access is a reverse proxy in front of any web application. If a user has not yet authenticated, they will be presented with a login screen to authenticate. The user must meet the criteria defined in your Access policy. A typical policy would look something like:</p><ul><li><p>The user’s email ends in @example.com</p></li><li><p>The user authenticated with a hardware based token</p></li><li><p>The user logged in from the United States</p></li></ul><p>If the user passes the policy, they are granted a cookie that will give them access to the application until their session expires.</p><p>To evaluate the user on other custom criteria, you can add an external evaluation rule to the Access policy. The external evaluation rule requires two values: an API endpoint to call and a key to verify that any request response is coming from a trusted source.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/EF4L7OHVla686FO6GbGWA/e3e6db51af877feb8f930a118eeb62e4/image1-25.png" />
            
            </figure><p>After the user authenticates with your identity provider, all information about the user, device and location is passed to your external API. The API returns a pass or fail response to Access which will then either allow or deny access to the user.</p><p>Example logic for the API would look like this:</p>
            <pre><code>/**
 * Where your business logic should go
 * @param {*} claims
 * @returns boolean
 */
async function externalEvaluation(claims) {
  return claims.identity.email === 'address@example.com'
}</code></pre>
            <p>Where the claims object contains all the information about the user, device and network making the request. This <code>externalEvaluation</code> function can be extended to perform any desired business logic. We have made an <a href="https://github.com/cloudflare/workers-access-external-auth-example">open-source repository</a> available with example code for consuming the Access claims and verifying the signing keys from Access.</p><p>This is really powerful! Any Access policy can now be infinitely extended to consider any information before allowing a user access. Potential examples include:</p><ul><li><p>Integrating with endpoint protection tools we don’t yet integrate with by building a middleware that checks the endpoint protection tool’s API.</p></li><li><p>Checking IP addresses against external threat feeds</p></li><li><p>Calling industry-specific user registries</p></li><li><p>And much more!</p></li></ul><p>We’re just getting started with extending Access policies. In the future we’ll make it easier to programmatically decide how a user should be treated before accessing an application, not just allow or deny access.</p><p>This feature is available in the Cloudflare Zero Trust dashboard today. Follow <a href="https://developers.cloudflare.com/cloudflare-one/policies/access/external-evaluation/">this guide</a> to get started!</p> ]]></content:encoded>
            <category><![CDATA[Cloudflare One Week]]></category>
            <category><![CDATA[Zero Trust]]></category>
            <category><![CDATA[Cloudflare Access]]></category>
            <guid isPermaLink="false">9DR224nlfTdsZnRvA2s7v</guid>
            <dc:creator>Kenny Johnson</dc:creator>
            <dc:creator>James Royal</dc:creator>
        </item>
    </channel>
</rss>