Skip to content

Commit a491387

Browse files
[Gateway] DLP precedence caveat (#23270)
Co-authored-by: Kate Tungusova <[email protected]>
1 parent 6094845 commit a491387

File tree

2 files changed

+22
-20
lines changed

2 files changed

+22
-20
lines changed

src/content/partials/cloudflare-one/gateway/order-of-enforcement.mdx

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -198,19 +198,35 @@ The only exception is if you are using [Clientless Web Isolation](/cloudflare-on
198198

199199
Next, Gateway checks decrypted traffic against your Isolate policies. When a user makes a request which triggers an Isolate policy, the request will be rerouted to a [remote browser](/cloudflare-one/policies/browser-isolation/).
200200

201-
Lastly, Gateway evaluates all Allow, Block, and Do Not Scan policies. These policies apply to both isolated and non-isolated traffic. For example, if `example.com` is isolated and `example.com/subpage` is blocked, Gateway will block the subpage inside of the remote browser.
201+
Next, Gateway evaluates all Allow, Block, and Do Not Scan policies. These policies apply to both isolated and non-isolated traffic. For example, if `example.com` is isolated and `example.com/subpage` is blocked, Gateway will block the subpage (`example.com/subpage`) inside of the remote browser.
202+
203+
Lastly, Gateway inspects the body of the HTTP request by evaluating it against DLP policies, and running anti-virus scanning and file sandboxing. If DLP Block policies are present, the action Gateway ultimately takes may not match the action it initially logs. For more information, refer to [DLP policy precedence](#dlp-policy-precedence).
202204

203205
### Resolver policies
204206

205207
When [resolver policies](/cloudflare-one/policies/gateway/resolver-policies/) are present, Gateway first evaluates any DNS policies with pre-resolution selectors, then routes any DNS queries according to the [order of precedence](#order-of-precedence) of your resolver policies, and lastly evaluates any DNS policies with post-resolution selectors.
206208

207209
### Order of precedence
208210

209-
<Render
210-
file="gateway/order-of-precedence"
211-
product="cloudflare-one"
212-
params={{ one: "DNS, network, or HTTP" }}
213-
/>
211+
Order of precedence refers to the priority of individual policies within the DNS, network, or HTTP policy builder. Gateway evaluates policies in ascending order beginning with the lowest value.
212+
213+
The order of precedence follows the first match principle. Once traffic matches an Allow or Block policy, evaluation stops and no subsequent policies can override the decision. Therefore, Cloudflare recommends assigning the most specific policies and exceptions with the highest precedence and the most general policies with the lowest precedence.
214+
215+
#### Zero Trust dashboard
216+
217+
In the Zero Trust dashboard, policies are in order of precedence from top to bottom of the list. Policies begin with precedence `1` and count upward. You can modify the order of precedence by dragging and dropping individual policies in the dashboard.
218+
219+
#### Cloudflare API
220+
221+
To update the precedence of a policy with the Cloudflare API, use the [Update a Zero Trust Gateway rule](/api/resources/zero_trust/subresources/gateway/subresources/rules/methods/update/) endpoint to update the `precedence` field.
222+
223+
#### DLP policy precedence
224+
225+
For Gateway configurations with DLP policies, Gateway will filter and log traffic based on first match, then scan the body of the HTTP request for matching content. Because of the first match principle, Gateway may perform and log a decision for traffic, then perform a contradicting decision. For example, if traffic is first allowed with an Allow HTTP policy, then blocked with a DLP Block policy, Gateway will log the initial Allow action despite ultimately blocking the request.
226+
227+
#### Access applications
228+
229+
If Gateway traffic is headed to a private IP address protected as an Access application, that traffic will still be evaluated by the destination application's Access policies, even if a Gateway Allow policy matched first. Gateway Block policies that match traffic will terminate any other policy evaluation. This is expected behavior. A Gateway Allow policy does not override or bypass Access policies.
214230

215231
<Render file="gateway/terraform-precedence-warning" product="cloudflare-one" />
216232

src/content/partials/cloudflare-one/gateway/order-of-precedence.mdx

Lines changed: 0 additions & 14 deletions
This file was deleted.

0 commit comments

Comments
 (0)