Designing ZTNA access policies for Cloudflare Access
Last updated Oct 12, 2026
Introduction
Organizations today are increasingly adopting a Zero Trust security ↗︎ posture to safeguard company assets and infrastructure in a constantly evolving threat landscape. The traditional security associated with legacy network design assumes trust within the corporate network perimeter. In contrast, Zero Trust operates on the principle of "Never trust, always verify" and implements continuous authentication and strict access controls ↗︎ for all users, devices, and applications, regardless of their location or network.
Typically two technologies play a role in a Zero Trust architecture. First, a Secure Web Gateway (SWG) ↗︎ filters outbound traffic destined for the Internet and blocks users from accessing high risk websites such as those involved in phishing campaigns. Then, to enable remote access for users to SaaS apps, internally-hosted applications and networks, Zero Trust Network Access (ZTNA ↗︎) services are used to create secure tunnels and provide access for remote users into private applications.
This guide is for customers looking to deploy Cloudflare's ZTNA service (Access) and provides best practices and guidelines for how to effectively build the right policies. If you have not already done so, we recommend also reading Cloudflare's SASE reference architecture, which goes into detail on all aspects of how to use Cloudflare as part of your Zero Trust initiatives.
Who is this document for and what will you learn?
This document is aimed at administrators who are evaluating or have adopted Cloudflare to replace existing VPN services or provide new remote access to internal resources. This serves as a starting point for designing your first ZTNA policies and as an ongoing reference. This guide covers three main sections:
- Technical prerequisites: What needs to be in place before you can secure access to your first application and define access policies.
- Building policies: The main components of an access policy and how they are combined.
- Use cases: Common use cases and policies that can serve as blueprints for your own policy designs.
This design guide assumes you have a basic understanding of Cloudflare's ZTNA solution, Cloudflare Access. Therefore, this guide focuses on designing effective access policies and assumes you have already configured DNS, identity and device posture providers as well as created connectivity to self-hosted applications and related networks.
By the end of this guide, you will be equipped to implement granular access policies that enforce Zero Trust principles across various common enterprise scenarios.
Prerequisites
This section covers the essential architectural components and concepts to understand before you can design granular access policies.
Note
We recommend reading the SASE reference architecture to get a deeper understanding of connecting applications, identity providers, and device posture providers.
Cloudflare allows organizations to facilitate application access using our connectivity cloud ↗︎, which securely connects users, applications and data regardless of their location. Core to the platform is Cloudflare's extensive global network ↗︎ which delivers low-latency connectivity for users worldwide. By running every service in every data center, Cloudflare applies networking, performance and security functions in a single pass, eliminating the need to route traffic through multiple, specialized security servers, and therefore reduces latency and avoids performance bottlenecks.

Figure 1 shows the basic components involved in remote access with Cloudflare's ZTNA service.
There are two main ways to provide access to private applications and networks: by public hostname, where requests are proxied to the application, or by private IP, where the user is on a device or network that is connecting them to their private corporate network via Cloudflare.
Active domain in Cloudflare
To use public hostnames, you need to have an active domain in Cloudflare. Most customers use Cloudflare as their primary DNS service, but it is possible to configure domains for use with Access and maintain DNS records elsewhere.
Network route to applications
For Cloudflare to control access, it needs to be in front of the application and have a secure and reliable network route for successfully authenticated users. Requests for application access come to Cloudflare first, where policy is applied, and then if successful, user requests are routed to the application.
Cloudflare supports access to the following types of applications:
- SaaS applications on the Internet
- Self-hosted applications accessed via public hostname
- Self-hosted applications accessed via private IP
For SaaS and other Internet-facing applications, access from Cloudflare is simple — it is already on the Internet. But for self-hosted applications, you create a tunnel from Cloudflare to the private network where the application is running. There are two methods for doing this:
- Our recommended approach is to use software agents such as cloudflared or Cloudflare Mesh. (Note, only cloudflared currently supports proxying of public hostnames to private applications.)
- For network-based connectivity, Cloudflare WAN (formerly Magic WAN) uses IPsec or GRE tunnels connecting Cloudflare to existing network appliances that are connected to the private networks, and Network Interconnect creates direct connectivity if your applications run on servers in a data center Cloudflare operates in. (For migrating from existing legacy VPN solutions to network-based tunnels, you may find this guide useful.)
Once we have established connectivity to your applications, it is time to facilitate user access. Depending on your policy requirements (more on this later) users can access the application directly over an Internet connection to a public hostname, or — for greater security — we recommend using our device agent, the Cloudflare One Client, which creates a tunnel directly to Cloudflare and also provides information about their device for use in access policies.
Identity
A critical part of application access is authenticating a user. Cloudflare has a built-in authentication method based on email. But we highly recommend configuring a third-party identity provider. We support both consumer and enterprise identity providers, and any SAML or OpenID compliant service can be used. Group membership is one of the most common attributes of defining application access and can be defined manually or imported using the System for Cross-Domain Identity Management (SCIM).
Device posture
The final prerequisite for building really effective access policies is to configure device posture. When using the device agent, Cloudflare has access to a variety of information about the device which can then be used in an access policy. When using an agentless method to access applications, only the user identity information is available. We also support using device posture information from other vendors, such as Microsoft, Crowdstrike and Sentinel One.

Figure 2 - two employees with different devices trying to access the same corporate application. Only the user with the device agent can access the SSH service.
Building policies
To quickly summarize the architecture described so far, Cloudflare is:
- In front of network access to the application.
- Integrated with your identity providers.
- Aware of device posture details for your users using our device agent or a third party vendor.
When a user makes a request to access an application, they must first authenticate, then, before access is granted, policies in the application are evaluated based on the data associated with the requesting user. Policies and other application specific settings are defined in an Access application.
Access application types
Cloudflare Access supports four main types of applications:
- Self-hosted refers to applications that your organization hosts and manages, either on premises or in the cloud. Cloudflare creates a public hostname which it uses to proxy traffic through a secure tunnel to the application. While access via public hostnames is supported if your server is just publicly facing on the Internet, we recommend you use
cloudflaredto create a secure, outbound-only connection from your application to Cloudflare's edge. Once that occurs, Cloudflare will then reverse proxy the target application/content to your users. - Private IP applications are similarly privately hosted, but lack fully-qualified public hostnames. Access can be facilitated via
cloudflared, Cloudflare Mesh, Cloudflare WAN, or Cloudflare Network Interconnect. Remote users not connected to a network already connected to Cloudflare will need to use the device client to get access to the application via private IP and to avoid using IP addresses with users, use internal DNS services to resolve private hostnames to private IP addresses. But it is possible to provide access without any software deployed to the client by using our agentless browser isolation service. - SaaS applications are accessed over the public Internet, and therefore do not require any tunnel connectivity to Cloudflare. Instead, Access acts as an identity proxy between users and the SaaS application. When a user attempts to access the SaaS app, they are first authenticated by Cloudflare, which redirects to your main identity service. SaaS applications are then configured via SAML or OAuth to trust Cloudflare. This allows organizations to implement additional security layers (like device posture checks) and centralize access control for their SaaS applications, even if the SaaS or identity provider does not natively support these features.
- Infrastructure applications enable users to control access to individual servers, clusters or databases in a private network. Infrastructure apps work by defining a 'target' proxied over
cloudflared, but allows users to group multiple machines under the same target - essentially, allowing users to define common access policies across potentially disparate infrastructure resources. Built-in access and command logging capabilities means organizations can maintain detailed audit trails for compliance and security investigation purposes.
Note
It is possible to configure SaaS applications to accept traffic only coming from Cloudflare. This forces all SaaS application traffic to be proxied and routed via Cloudflare Gateway which, in turn, allows for the use of security controls to inspect and filter traffic such as downloads of sensitive company data from SaaS applications. The second use case below will describe how to achieve this.
Access applications typically map directly to a single application. However, it is possible to have an Access application, and its associated policies sit in front of more than one application endpoint. This might be a range of IPs related to multiple Windows RDP servers where you wish to implement a common access policy. The same idea can also be applied to public hostnames, where you might have more than one hostname that refers to several applications you wish to have the same policies. For instance, you might have wiki.domain.com and wiki.domain.co.uk — different application instances, but with common access policy requirements.
Next, we examine the main elements of a ZTNA-protected application that need to be understood to create effective access policies, then later in the document we will examine some use cases that apply those specific elements.
Authentication
Authenticating a user's identity is a key component of any Zero Trust policy. When attempting to log into an application, a user will be redirected to a configured identity provider. If a user fails to authenticate with the identity provider, Cloudflare will not accept their request for the application.
