DLP Detects Sensitive Data in Defined Traffic
A payroll analyst downloads payroll-q3.xlsx, needs it as CSV, and uploads it to a free conversion site. Nothing looks like malware: the domain is not new, the certificate is valid, the laptop is managed. Every reputation signal says allow, and none of them read the file.
That is Data Loss Prevention (DLP): inspect content, decide whether it holds sensitive data, and hand that verdict to a policy that can log, allow, or block. The operative word is defined. It classifies only what an inspection point you inserted can read — like a customs officer who can open bags passing his lane, but not a bag from another terminal, a sealed pouch, or a photograph of a bag.
Three objects, one path. Cloudflare separates detection from enforcement, and that separation is the mental model:
- A detection entry is reusable logic: a Rust regex, a predefined detection, an Exact Data Match dataset, a wordlist, a document fingerprint, or an AI prompt topic.
- A DLP profile bundles entries and adds sensitivity settings: match count, confidence threshold, OCR, AI context analysis.
- A policy attaches that profile to a path and picks an action — allow, log, or block in a Gateway HTTP policy, scanning in a CASB integration, or outbound inspection in Email security.
The profile is inert alone. Teams build a good profile for account numbers, save it, and assume something is protected. It protects traffic only when a policy references it, on a path that policy can see. Figure 1 traces those gates.
%%{init: {'theme':'base','themeCSS':'.edgeLabel .label text, .edgeLabel text, .edgeLabel span { fill:#132440 !important; color:#132440 !important; }','themeVariables': {'primaryColor':'#16476A','primaryTextColor':'#ffffff','primaryBorderColor':'#132440','secondaryColor':'#3B9797','secondaryTextColor':'#ffffff','secondaryBorderColor':'#132440','tertiaryColor':'#c4873b','tertiaryTextColor':'#132440','tertiaryBorderColor':'#132440','lineColor':'#5a6e82','textColor':'#132440','titleColor':'#132440','mainBkg':'#16476A','nodeBorder':'#132440','clusterBkg':'#eef3f7','clusterBorder':'#132440','edgeLabelBackground':'#ffffff','actorBkg':'#16476A','actorTextColor':'#ffffff','actorBorder':'#132440','activationBkgColor':'#3B9797','activationBorderColor':'#132440','signalColor':'#5a6e82','signalTextColor':'#132440','noteBkgColor':'#c4873b','noteTextColor':'#132440','noteBorderColor':'#132440','labelBoxBkgColor':'#a8dede','labelBoxBorderColor':'#132440','labelTextColor':'#132440','loopTextColor':'#132440','altBackground':'#f8f9fa','fontFamily':'DM Sans, sans-serif'}}}%%
flowchart TD
A[HTTPS request from a managed device] --> B{Matches Do Not Inspect?}
B -- Yes --> Z1[Bypass: no body scan, no DLP log]
B -- No --> C{TLS decrypted by Gateway?}
C -- No --> Z2[Metadata only: DLP cannot match]
C -- Yes --> D[Extract HTTP body, excluding headers]
D --> E{Supported file type?}
E -- No --> Z3[Unscanned: images, deep archives, unknown formats]
E -- Yes --> F[Evaluate enabled detection entries]
F --> G{Match count and confidence threshold met?}
G -- No --> H[Allow: no finding recorded]
G -- Yes --> I{Policy action}
I -- Log --> J[DLP log plus optional encrypted payload]
I -- Block --> K[Block response returned to the user]
I -- Allow --> L[Allowed destination: finding without enforcement]
classDef primary fill:#132440,color:#ffffff,stroke:#0b172b;
classDef secondary fill:#16476A,color:#ffffff,stroke:#0f314a;
classDef ok fill:#3B9797,color:#ffffff,stroke:#2a6f6f;
classDef danger fill:#BF092F,color:#ffffff,stroke:#7a0420;
classDef warn fill:#c4873b,color:#132440,stroke:#8a5a1f;
class C,I primary;
class A,B,Z2,D,E,Z3,F,G secondary;
class H,J,L ok;
class Z1,K danger;
What the inspection point can read is narrower than the name suggests. DLP scans HTTP bodies, not headers: a token in a custom header, a credential the application strips from the body, or a file sent over a non-HTTP protocol is invisible.
Inline scanning has hard prerequisites: traffic must reach Gateway through an HTTP filtering on-ramp, and HTTPS must be decrypted with the Cloudflare root certificate installed on the device. Without decryption, Gateway sees a CONNECT tunnel and metadata. Traffic matching a Do Not Inspect policy is skipped entirely — deliberate for certificate-pinned apps, and every such exclusion is also a DLP blind spot.
Enforcement order matters: Do Not Inspect, then Isolate, then request policies such as Allow and Block, then body inspection including DLP. A request can be blocked or isolated before anyone reads its body — which also means a DLP match cannot drive an isolation decision.
Formats are the next boundary. DLP reads text and CSV, Office 2007 and later, PDF, and ZIP archives of those to depth 10; images only through OCR, for JPEG and PNG between 4 KB and 1 MB. A screenshot pasted into chat is a different detection problem from the spreadsheet. Figure 2 contrasts inline inspection inside the request path with API-based inspection outside it.
Tuning false positives. A regex catching all sixteen-digit numbers catches credit cards, and also SKUs and order IDs. Match count sets a floor on detections per body or file: at 10, one test card number produces nothing while a stolen dump blocks. Confidence threshold is per profile — Low (default) sits closest to raw regex, Medium adds validation, High fires only on high-confidence detections. AI context analysis reads surrounding text, so a number near "invoice" scores higher than one in a product catalogue; it covers Gateway HTTP and HTTPS only, not CASB file scans.
Run Passive Detection before writing a blocking policy: it samples request and response bodies and shows which entries matched and whether a policy covered them, without changing traffic handling. Then use Test scan, which accepts text, a file up to 10 MB, or a HAR file and stores nothing. It evaluates no policies and creates no logs, so a profile matching there but not in live traffic points at the policy, the path, or decryption — not the regex.
CASB Finds SaaS Configuration and Data Risks
Two leaks, same company, same afternoon.
At 09:15 a finance manager shares the Q3-forecast folder in Google Drive with "anyone with the link." No request crosses Gateway when an outsider opens it: the outsider is not your user, and the file already sits in Google's storage. Inline DLP is structurally blind. CASB reports a posture finding — File publicly accessible with view access — with one instance per affected file.
At 11:40 a marketing manager uploads a customer list to a niche conversion site nobody integrated with. CASB has no API to call; Gateway with DLP is the only control positioned to see it.
CASB answers "what is exposed right now?" Inline DLP answers "what is leaving right now?" Buying one expecting the other is the most common architectural mistake here.
| Surface | Sees | Enforces | Blind spot | Availability |
|---|---|---|---|---|
| Gateway inline DLP | Decrypted HTTP bodies on managed paths | Allow, log, or block before origin | Do Not Inspect, headers, unsupported formats | Enterprise add-on |
| CASB posture scan | SaaS config, users, sharing via provider API | API remediation for M365 and Google Workspace files | No request path, periodic, supported types only | All plans; two integrations on Free |
| CASB content scan | File contents in supported SaaS stores | Flags exposed content with sharing findings | Supported integrations only | Requires CASB and DLP |
| Browser Isolation | Page execution, clipboard, transfers, keyboard | Constrains those actions in-session | Not a classifier; HTTPS only | Pay-as-you-go and Enterprise add-on |
| Email security | Inbound mail, rewritten links, M365 outbound | Quarantine, isolate a link, block a send | Link actions need MX/Inline | Enterprise tiers for disposition isolation |
Cloudflare CASB is API-based and agentless. You authorize an integration with OAuth, permissions are read-only and least-privilege, and Cloudflare enumerates users, files, sharing settings, and configuration. Nothing is installed and nothing is proxied. Findings have three levels: a finding type defines an issue, a posture finding groups detections of one type in one integration, and a finding instance is the individual asset.
Remediation sharpens the boundary. CASB policies can act the moment a matching instance appears: a first-party fix through the SaaS API, a webhook, or both. Automated remediation covers file and folder finding types in Microsoft 365 and Google Workspace, such as revoking a public share, and requires read-write permission. A read-only integration detects but cannot fix.
Shadow IT is a different data source. It is Gateway telemetry: HTTP logs show which SaaS apps users reach, and its prerequisite is HTTP filtering, not a SaaS integration. And approval status does not block anything — marking an app Unapproved is a label; enforcement needs a Gateway policy using the Application or Application Approval Status selector. Figure 3 shows the lifecycle and the two failure branches behind most stale dashboards.
%%{init: {'theme':'base','themeCSS':'.edgeLabel .label text, .edgeLabel text, .edgeLabel span { fill:#132440 !important; color:#132440 !important; }','themeVariables': {'primaryColor':'#16476A','primaryTextColor':'#ffffff','primaryBorderColor':'#132440','secondaryColor':'#3B9797','secondaryTextColor':'#ffffff','secondaryBorderColor':'#132440','tertiaryColor':'#c4873b','tertiaryTextColor':'#132440','tertiaryBorderColor':'#132440','lineColor':'#5a6e82','textColor':'#132440','mainBkg':'#16476A','nodeBorder':'#132440','clusterBkg':'#eef3f7','clusterBorder':'#132440','edgeLabelBackground':'#ffffff','actorBkg':'#16476A','actorTextColor':'#ffffff','actorBorder':'#132440','activationBkgColor':'#3B9797','activationBorderColor':'#132440','signalColor':'#5a6e82','signalTextColor':'#132440','noteBkgColor':'#c4873b','noteTextColor':'#132440','noteBorderColor':'#132440','labelBoxBkgColor':'#a8dede','labelBoxBorderColor':'#132440','labelTextColor':'#132440','loopTextColor':'#132440','altBackground':'#f8f9fa','fontFamily':'DM Sans, sans-serif'}}}%%
sequenceDiagram
autonumber
participant Admin
participant CASB as Cloudflare CASB
participant API as SaaS provider API
participant Ops as Owner queue
Admin->>CASB: Authorize integration with read-only scopes
CASB->>API: Enumerate users, files, sharing settings
alt Token expired or scope revoked
API-->>CASB: 401 insufficient_scope
CASB-->>Admin: Integration unhealthy, findings now stale
else Scan succeeds
API-->>CASB: Asset metadata and content sample
CASB->>CASB: Match finding types and DLP profiles
alt Finding supports remediation and scope is read-write
CASB->>API: Revoke public share
CASB->>Ops: Webhook with instance and action taken
else No automated remediation available
CASB->>Ops: Webhook only, manual fix required
end
end
The privacy tradeoff deserves a direct sentence: an API-based CASB reads your files. For content scanning, samples leave the provider and are processed by Cloudflare; for posture scanning, metadata and configuration are read. Availability is narrower than marketing implies, too: Free accounts get two integrations and no instance detail, remediation needs a paid plan, DLP is an Enterprise add-on, Browser Isolation is a Pay-as-you-go or Enterprise add-on, and email link actions need MX/Inline. They are separate purchases.
Browser Isolation and Email Security Change Different Paths
Remote browser isolation (RBI) does not inspect data. It relocates execution. Cloudflare runs a headless Chromium-based browser, executes JavaScript and rendering there, and sends drawing instructions to the local browser through Network Vector Rendering rather than a video stream. The session is deleted on close, and active content never runs on the endpoint.
Users find the tradeoffs within an hour:
- One active window per local browser. Background tabs stop rendering, so audio pauses, dashboards freeze, and multi-window workflows break.
- HTTPS only; a plain HTTP site cannot be isolated.
- No webcam or microphone, unreliable WebGL, no H.265/HEVC, and streaming players break.
- Unsupported inside virtual machines; on iOS the first tap focuses a field and the second begins typing.
Isolation also carries data controls: copy out, paste in, downloads, uploads, keyboard, and printing can each be allowed, restricted to the isolated browser, or denied. These are coarse. "Do not allow downloads" stops a file leaving the session, but View in remote browser still lets it download into the remote browser, and upload controls do not cover files arriving from third-party cloud file managers. Those need MIME-type policies.
Email security changes a third path: the click. Cloudflare rewrites links so a click lands on an interstitial and opens the destination in an isolated browser, recrawled live at click time. Link actions are configurable only with MX/Inline deployment; API, BCC, and journaling are post-delivery and cannot rewrite the message. Inside an isolated email link, copy, paste, keyboard, printing, downloads, and uploads are unavailable.
That is strong against credential phishing and drive-by exploits. It does nothing about a user reading a fake invoice and wiring money, and it is not a classifier. Outbound DLP is separate and narrower: Microsoft 365 E3 or E5 only, through an Outlook add-in that inspects the message before sending.
Isolation contains execution, not disclosure. A remote browser stops a malicious page from running on the endpoint, but it does not classify what a user types into that page — and an Isolate policy cannot be selected by DLP Profile, so "isolate anything that matches PII" is not expressible as one rule. If the risk is data leaving, use content inspection or an action restriction; isolation is for code you do not trust.
Cloud Workload Findings and Remediation Ownership
A CASB finding is not an incident. It is an assertion about an asset, and it becomes an incident only when a named owner accepts it. Cloud workload findings expose that gap fastest, because the asset owner and the Cloudflare administrator are almost never the same person.
A public S3 bucket is a configuration fact. The integration reports it with severity and an instance count. Someone must decide whether it is a marketing CDN that is supposed to be public or a staging bucket that is not. Platform knows the account structure, the application team knows the data, security knows the policy — and none of them owns it by default.
Figure 4 is the difference between a finding queue and a remediation system. On the left, an unrouted finding is reassigned, ages, and is re-detected with no evidence anything happened. On the right, the instance carries the integration, asset, and a tag mapping to an owner and a service-level target; remediation runs through the API or a human; a rescan verifies the change; and before-and-after state is attached to the ticket.
Automated remediation is narrow, and detection is periodic: a finding marked resolved is not proof until a later scan stops reporting it.
This is where control choice becomes concrete. Inline controls suit data in motion because they interrupt an action inside a latency budget. API findings suit stored data and configuration drift because they see what never crosses your network, but they act after the fact. Isolation suits untrusted code execution, at a visible UX cost. Email covers the click and, on Microsoft 365 only, the outbound message.
Map a Data-Leak Scenario to Concrete Controls
Map a Data-Leak Scenario to Concrete Controls
Status: design-only. Execution not performed. No Cloudflare organization or add-on was used. Steps are a reproducible plan; expected observations are predictions from documented behavior, not measurements.
Scenario. A finance analyst downloads a synthetic vendor file, then tries two paths out: an upload to an unsanctioned endpoint, and a public share inside an approved SaaS drive. One should be caught inline, the other only by an API scan.
Prerequisites. Gateway HTTP filtering with TLS decryption (One Client or network on-ramp plus root certificate); a DLP Enterprise add-on, or Test scan on Free for two predefined profiles; any CASB plan for two integrations, Enterprise for instance detail. Without these, run the fixture steps only and record the exercise as design-only. Browser Isolation requires a Pay-as-you-go or Enterprise add-on, and email link actions require MX/Inline deployment; this card does not exercise either.
Synthetic inputs. Build locally and label as test data; never use real personal data.
vendor-test.csvwith one test card number4111 1111 1111 1111, one fabricated tax identifier, and twenty invoice rows.vendor-test.pdf, a PDF export of the same rows.screenshot-test.png, a 200 KB screenshot of the CSV, to exercise OCR.archive-test.zip, with the CSV nested one folder deep.
Actions.
- Enable the Financial Information profile at match count 1, and add a document fingerprint built from
vendor-test.pdf. - Test scan all four inputs; record matching entries and confidence.
- Add the profile to a Gateway policy for a test group,
POSTonly, destination not in the approved app list, action Block. Add a lower-precedence Log policy for the same profile. - Place a Do Not Inspect rule for one test domain above it, then send the CSV to that domain and a non-excluded one, followed by the archive and the screenshot.
- In CASB, connect a test tenant, place the CSV in a drive, and create an anyone-with-link share. After the next scan, record finding type, severity, instance asset, and whether remediation is offered.
Expected observations (predicted).
| Check | Predicted result |
|---|---|
| Test scan on CSV and PDF | Both match; PDF text is extracted |
| Test scan on PNG | Matches only with OCR on, within 4 KB to 1 MB |
| Upload to non-excluded domain | Blocked, with a DLP entry in HTTP logs |
| Upload to Do Not Inspect domain | Allowed and absent from DLP logs |
| Isolate rule using DLP Profile | Not configurable; selector is not offered |
| CASB finding for the public share | Posture finding, one instance per file |
| CASB detection of the upload endpoint | No finding; no integration exists |
Failure checks. If the upload is not blocked but Test scan matched, check decryption, the destination condition, a higher-precedence Allow or Do Not Inspect rule, and whether the site split the upload. If CASB shows nothing, confirm token health and scan completion — a 401 leaves stale data, not an empty dashboard.
Cost and cleanup. Per-seat add-ons for DLP and Isolation, CASB tier for instance detail, Email security package for link actions, plus operator time. Prices are unverified. Afterwards delete the test profile and policies, restore the Do Not Inspect set, remove the share, disconnect the integration, and delete synthetic files and payload logs.
Document Inspection Prerequisites and an Exception Process
Verification date: 2026-11-05. Pages consulted carried last-updated stamps between 2026-05-01 and 2026-11-04. No lab was executed, no product version was tested, and no pricing was verified.
Pass/fail evidence. Each check below names the artifact a reviewer can inspect.
| Check | Pass condition | Evidence artifact | Status |
|---|---|---|---|
| Inspection path is real | A test upload appears in HTTP logs with a DLP match | Log entry with timestamp, user, destination, profile ID | Not run |
| Decryption works | The same HTTPS upload produces a body match | Paired entries for one request | Not run |
| Do Not Inspect is intentional | Every exclusion has an owner and reason | Exception register entry | Not run |
| Accuracy is measured | A labelled sample yields recorded false-positive and false-negative counts | Test scan export plus reviewer notes | Not run |
| CASB coverage is known | Scope, token health, and last scan recorded | Integration inventory | Not run |
| Remediation is verified | A rescan no longer reports the instance | Before-and-after finding state | Not run |
"Not run" is not "failed." A control never tested is unknown, and unknown is the state most programs report as green.
Self-check.
1. A file is blocked on one site but allowed on another with the same profile. Two likely causes?
A higher-precedence Allow or Do Not Inspect rule matched the second destination, or the site sends content DLP cannot read — a split upload, an unsupported format, or a body never received because decryption was bypassed.
2. Why can't one Gateway policy isolate any page containing sensitive data?
Isolation is a request-stage decision and DLP is a body-stage decision. Isolate runs before body inspection, applies only to Accept: text/html* requests, and cannot be selected by DLP Profile.
3. CASB reports zero findings for an app. Is it clean?
No. The integration may be unauthorized, the token expired leaving an old scan visible, the finding type may not be covered for that vendor, or the exposure may sit in an asset class the integration does not enumerate.
An exception process that survives review.
- Scope. Name destination, data class, and user group. "The Brand team may upload Public-tagged images to figma.com, no PII profiles apply" is a scope; "Marketing needs Figma" is not.
- Reason. State the business function that fails without it, and what was tried first.
- Compensating control. Prefer narrower over none: log-only instead of block, isolation instead of allow, download restriction instead of open access.
- Owner and expiry. A named individual accepts residual risk, with a date inside one review cycle. Expired exceptions should fail closed.
- Evidence. Record the policy ID, rule, or finding covered, so a later reviewer can prove it is still the approved one.
An exception never revisited is usually an undocumented policy change.
Unresolved limitations.
- No measured accuracy. No false-positive rate is given, because none was measured.
- Pricing and quotas unverified. Licensing and limits are described qualitatively.
- Coverage gaps are structural. Headers, Do Not Inspect traffic, unsupported archives, and unintegrated SaaS sit outside the controls by design.
References.
- Cloudflare One — https://developers.cloudflare.com/cloudflare-one/
- Data loss prevention — https://developers.cloudflare.com/cloudflare-one/data-loss-prevention/
- DLP profiles — https://developers.cloudflare.com/cloudflare-one/data-loss-prevention/dlp-profiles/
- Detection entries — https://developers.cloudflare.com/cloudflare-one/data-loss-prevention/detection-entries/configure-detection-entries/
- Scan HTTP traffic with DLP — https://developers.cloudflare.com/cloudflare-one/data-loss-prevention/dlp-policies/
- Passive Detection — https://developers.cloudflare.com/cloudflare-one/data-loss-prevention/passive-detection/
- Test scan — https://developers.cloudflare.com/cloudflare-one/data-loss-prevention/test-scan/
- Cloud and SaaS findings — https://developers.cloudflare.com/cloudflare-one/cloud-and-saas-findings/
- CASB content scanning — https://developers.cloudflare.com/cloudflare-one/cloud-and-saas-findings/casb-dlp/
- CASB remediation policies — https://developers.cloudflare.com/cloudflare-one/cloud-and-saas-findings/policies/
- Shadow IT SaaS analytics — https://developers.cloudflare.com/cloudflare-one/insights/analytics/shadow-it-discovery/
- Remote browser isolation — https://developers.cloudflare.com/cloudflare-one/remote-browser-isolation/
- Isolation known limitations — https://developers.cloudflare.com/cloudflare-one/remote-browser-isolation/known-limitations/
- Isolation policies — https://developers.cloudflare.com/cloudflare-one/remote-browser-isolation/isolation-policies/
- Email security — https://developers.cloudflare.com/cloudflare-one/email-security/
- Configure link actions — https://developers.cloudflare.com/cloudflare-one/email-security/settings/detection-settings/configure-link-actions/
- Outbound DLP — https://developers.cloudflare.com/cloudflare-one/email-security/policies/outbound/outbound-dlp/
- Gateway HTTP policies — https://developers.cloudflare.com/cloudflare-one/traffic-controls/http-policies/
- Gateway order of enforcement — https://developers.cloudflare.com/cloudflare-one/traffic-controls/order-of-enforcement/
Next in the Series
In Operate Zero Trust Policies Over Their Full Lifecycle, we'll explore Keep device posture, identity changes, and service access observable.