Designing ZTNA access policies for Cloud·续3

This is important not only for securing access to Salesforce, but also for adequately protecting its contents while in use. The next step is to examine the access policy which is similar to the one we just created for the wiki. However, this policy is limiting access to members of the Sales or Executives groups. We are also using our Crowdstrike integration to ensure that users are on company managed devices.

Policy name Account executives on trusted devices
Action Allow
Include
Member of group Sales, Executives
Require
Authentication method MFA - multi-factor authentication
Gateway On
Crowdstrike Service to Service Overall Score above 80

The second policy now applies to all employees but we are going to apply a few more steps before access is granted.

Policy name Employees on trusted devices
Action Allow
Include
Member of group All Employees
Require
Authentication method MFA - multi-factor authentication
Gateway On
Crowdstrike Service to Service Overall Score above 80
Additional Settings
Purpose justification On
Temporary authentication On
Email addresses of approvers salesforce-admin@company.com

We are going to add in temporary authentication to this second policy. That means if Cloudflare determines that the incoming request is from someone outside of the Sales or Executives department, an administrator will need to explicitly grant them temporary access. In context, this policy could be used to secure access to Salesforce for employees outside the Sales department, as the customer information could be sensitive and confidential.

This approach is important for several reasons:

  • It allows for human oversight on potentially risky access attempts, reducing the chance of unauthorized access through compromised or insecure devices.
  • It provides flexibility for legitimate users to access the application even when their device fails to meet the highest security standards. This encourages users to maintain good security practices on their devices.
  • In addition, since all user traffic is routed through Cloudflare, we can enforce additional security measures (such as preventing the download of sensitive data) via web traffic policies.

Only allow secure admins access to database tools

This scenario covers protecting a PostgreSQL database administration tool. This represents a privately-hosted, high-value target due to its access to sensitive data. It also requires taking extra care in designing secure access for it. Given the nature of database tools, access policies will not be layered for this use case.

Policy name Only IT admin access
Action Allow
Include
Assign a group IT Admins
Require
Authentication method MFA - multi-factor authentication
Gateway On
Device Posture - Serial Number List Company Managed Device Serial Numbers
OS Version Latest version of Windows
Domain Joined Joined to corporate AD domain
Exclude
Authentication method SMS
Additional Settings
Purpose justification On

Here, we are introducing a high number of security posture checks, starting with MFA. We have two expressions regarding MFA: the first one requires that users authenticate with a MFA method. The second 'excludes' expression pointing out that SMS is not considered a valid authentication method. We do this because SMS is one of the easier methods for attackers to exploit and subvert, and therefore considered less secure ↗︎ than other MFA methods. As a result, we are only allowing access when the user provides stronger credentials such as a hard key or an OTP from an authenticator app. Enforcing these stricter MFA requirements reduces the risk of credential-based attacks, and makes it much more challenging for potential attackers to gain unauthorized access to this critical database—even if they have obtained the user's password.

Other posture elements here include:

  • Requiring the latest OS.
  • The user's device is joined to a Microsoft Active Directory domain.
  • The user's device is explicitly a company-managed device (shown by referencing a list of managed device serial numbers).

These combined posture checks ensure that only up-to-date, company-controlled devices within your managed environment can access the database, further reducing the attack surface and the risk of access from potentially compromised or uncontrolled endpoints.

Under additional settings, we are also requiring that users enter a purpose justification for accessing the database. This allows your security teams to analyze access patterns and identify potentially suspicious behavior. This set of security controls also ensures that access to your critical database is tightly regulated, logged, and justified — significantly reducing the risk of unauthorized access or misuse.

This level of protection and visibility would be significantly more complex and resource-intensive to achieve with disparate, standalone security solutions. Centralizing security policy enforcement via Cloudflare allows you to simplify how you implement fine-grained access to critical internal resources.

Secure RDP access

This final use case centers on securing remote access to devices via RDP in two ways — self-hosted or private IP. Both options offer unique benefits, but ultimately it comes down to your priorities: is it more important to simplify access, or to tightly monitor activity?

We will start with the self-hosted option — proxying port 3389 over a tunnel, mapping it to a hostname.

Application Configuration
Application Name RDP service on database server
Hostname rdp.databaseserver.company.internal

Define the policy:

Policy name Admin Access
Action Allow
Include
Member of Group IT Admins
Require
Authentication method MFA - multi-factor authentication
Gateway On
WARP On
Device Posture - Serial Number List Company Managed Device Serial Numbers
External Evaluation [Time Evaluator URL]

Inside the policy, we have made this application available to our new access group for IT Admins. Under "Require," we are enforcing the use of the Cloudflare One Client specifically (as opposed to only Cloudflare Gateway). The user must be on a company-managed device, with an active device client that is authenticated to the company's instance of Cloudflare, MFA must be used during login, and there is an additional option below for external evaluation.

External evaluation means we have an API endpoint containing some sort of access logic ↗︎ — in this case, time of day access. We are making an API call to this endpoint, and defining the key that Cloudflare is using to verify that the response came from the API. This is useful for several reasons:

External evaluation allows users to create bespoke security posture checks based on criteria that may not be covered by the default set of posture checks. For this example, we will be using a service built on Cloudflare Workers ↗︎.

  • Restricting access to the terminal outside of business hours implements a form of time-based access control. This adds an extra layer of security by limiting the window of opportunity for potential attackers.

Now, you will learn how to secure RDP access as a private IP application:

Application Configuration
Application Name RDP
Destination IP 169.254.255.254

As mentioned before, private IP applications work because Cloudflare proxies the IP range across its network. The nature of this application necessitates the use of the device client, as unless the user is connected to Cloudflare (and more specifically, unless they can take advantage of the Client-to-Tunnel connectivity), they will not be able to reach non-local RFC 1918 addresses.

Traffic
Destination IP 169.254.255.254
Destination Port 3389
Identity
User Group Names Server Admins
Device Posture
Passed Device Posture Checks WARP Check (Mac OS) (File) Latest Version of macOS (OS version)
Action Allow
Enforce Cloudflare One Client session duration 60m0s

Defining the application here is simple, as Cloudflare automatically fills in the IP range, and you need to limit the detected protocol to RDP. However, the rules for private IP applications are slightly different. You will notice they appear as network policies under the Cloudflare Gateway menu, despite managing them in Access. Certain options, such as checking for MFA and external evaluation, do not appear here. However, these attributes can be verified when the user activates their device client and authenticates to their organization.

One option available here is enforcing the device agent client session duration. This means that after a certain amount of time, the user will be forced to reauthenticate. This feature allows you to take a Zero Trust approach to protecting private IP applications as well. It ensures that even if a user's credentials are compromised or their device is left unattended, the potential window for unauthorized access is limited. By regularly requiring reauthentication, we are continuously verifying the user's identity and authorization status, aligning with the core Zero Trust principle of "never trust, always verify."

By combining granular access controls with detailed activity logging, Cloudflare provides a comprehensive security solution for protecting and monitoring access to critical resources in a Zero Trust methodology.

Summary

Successful ZTNA implementation is about more than just technical configuration — it requires careful consideration of your organization's specific needs, user workflows, and security requirements. Cloudflare's flexibility allows you to start with basic secure access policies, then evolve them as your organization's needs change and security requirements mature. By following the principles and practices outlined in this guide, you can create a robust security posture that protects you as precisely and transparently as possible.

If you are interested in learning more about ZTNA, SASE, or other aspects of the Cloudflare One platform, please visit our reference architecture library or our developer docs to get started.

Related resources

Was this helpful?

YesNo

On this page

Designing ZTNA access policies for Cloud·续3 - 图1Docs

{"@context":"https://schema.org","@type":"TechArticle","@id":"https://developers.cloudflare.com/reference-architecture/design-guides/designing-ztna-access-policies/#page","headline":"Designing ZTNA access policies for Cloudflare Access","description":"This guide is for customers looking to deploy Cloudflare's ZTNA service. It provides best practices and guidelines for how to effectively build the right policies.","url":"https://developers.cloudflare.com/reference-architecture/design-guides/designing-ztna-access-policies/","inLanguage":"en","image":"https://developers.cloudflare.com/reference-architecture/design-guides/designing-ztna-access-policies/og.png?v=7c1fb60ebe0cc83f","dateModified":"2026-10-12","publisher":{"@type":"Organization","name":"Cloudflare","description":"One platform for your apps, agents, and workforce. Build, secure, and scale without managing infrastructure","url":"https://www.cloudflare.com/","sameAs":["https://github.com/cloudflare","https://www.linkedin.com/company/cloudflare","https://x.com/cloudflare"],"logo":{"@type":"ImageObject","url":"https://developers.cloudflare.com/logo.svg"},"address":{"@type":"PostalAddress","streetAddress":"101 Townsend St","addressLocality":"San Francisco","addressRegion":"CA","postalCode":"94107","addressCountry":"US"},"contactPoint":[{"@type":"ContactPoint","contactType":"Customer Support","url":"https://support.cloudflare.com/","availableLanguage":["English"]},{"@type":"ContactPoint","contactType":"Sales","url":"https://www.cloudflare.com/contact/","availableLanguage":["English"]}]},"isPartOf":{"@type":"WebSite","@id":"https://developers.cloudflare.com/#website","name":"Cloudflare Docs","url":"https://developers.cloudflare.com/"}}


description: Learn how to use Cloudflare to extend performance, security, and data localization to your end users. title: Extend Cloudflare's benefits to SaaS providers' end-customers image: https://developers.cloudflare.com/reference-architecture/design-guides/extending-cloudflares-benefits-to-saas-providers-end-customers/og.png?v=a61dddf8204fd8ff


Skip to content

Documentation Index
Fetch the complete documentation index at: https://developers.cloudflare.com/reference-architecture/llms.txt
Use this file to discover all available pages before exploring further.