← All articles

ARTICLE · DATA LEAK ACTIVE TESTING

CASB and SaaS DLP: testing the coverage of your cloud controls

  • By channel
  • 6 min read
  • Updated
Cubes connected by thin lines, an image of SaaS applications linked to one anotherAPI or inline: two promises

In short

  • API mode cleans up after the upload; only inline mode can stop it in transit.
  • Most often missed: the personal instance of an app you think you protect.

To test CASB DLP, put a decoy file into each SaaS application by every route your users have, then read the CASB and proxy logs for each attempt. A CASB (Cloud Access Security Broker) works inline on traffic, or through each app’s API on stored data.

API or inline CASB: what each mode can stop

In Microsoft Defender for Cloud Apps the split shows in the policy type: a file policy works through the API connector, while a session policy only applies to traffic routed through Conditional Access App Control, its reverse proxy. Netskope draws the same line between API Data Protection and Real-time Protection policies.

Diagram · when the control acts

When the CASB acts: inline or APIBetween the workstation and the SaaS application, inline mode controls the flow during the transaction and can block before sending. API mode intervenes after the fact, once the data is stored in the application: the data is already exposed until remediation.EndpointSaaSInlineBlocks duringthe transactionAPIActs after the fact:data already exposedThe flow to the application

Criterion API mode Inline mode (forward or reverse proxy)
When the control acts After the fact, once the data is stored in the SaaS application During the transaction, before the data leaves the device or reaches the application
Blocking capability Remediation after the fact (quarantine, removal of a share) Real-time blocking possible
Applications covered Only the SaaS applications whose API is connected to the CASB Any traffic that goes through the proxy
Typical blind spot Analysis latency, API quota limits, file types not inspected Forward proxy: off-tunnel laptops, unmanaged devices, apps that ignore the system proxy or pin certificates. Reverse proxy (Conditional Access App Control in Defender for Cloud Apps): anything outside a browser session, such as the OneDrive sync client or desktop Teams
Question to test How long does the data remain exposed before remediation? Does every path go through the proxy?

Where an “active” CASB policy stops applying

An “active” policy relies on the connector, the proxy, the content engine and the rule all working. What turns up most often in testing:

  • The API connector has lost its rights after a token renewal or the departure of the admin who authorised it. In the Microsoft Defender portal, the App Connectors page (under Settings, Cloud Apps) shows each connector’s status; anything other than connected deserves a ticket.
  • Only the official tenant is covered: a personal or partner instance sits on the same domain, so a URL category or domain rule cannot tell it apart. You need instance-aware policies in the CASB (Netskope calls them app instances) or the vendor’s own control: Tenant Restrictions v2 in Microsoft Entra ID, or the X-GoogApps-Allowed-Domains header injected by your proxy for Google Workspace.
  • The detection engine cannot read the content: encrypted archive, password-protected document, image containing text, proprietary business format. The CASB then falls back on its default for files it cannot inspect (allow, alert or block), set in the policy or DLP profile depending on the vendor. If that default is allow, the archive leaves quietly.
  • The action falls outside the rule: it covers uploads, but not pasting into a web form or creating an external sharing link.

Only the first gives a signal: Defender for Cloud Apps shows each connector’s health, though someone still has to look. The other three stay silent; they are DLP false negatives that only a test upload brings out.

Building a SaaS coverage matrix

One upload and one alert fill a single cell of a matrix that maps applications against user actions and contexts.

1. The applications

Start from what is in use, not the list of contracts, and sort SaaS apps into three groups: sanctioned, tolerated (used without formal approval) and unauthorised. For a tolerated app you expect at least an alert; for an unauthorised one, a block. For usage IT never sees, see our article on shadow IT and the browser.

2. User actions

Data leaves through an upload, text pasted into a field, an external sharing link, a desktop sync client or a download to an unmanaged device.

3. Contexts

Office, home outside the tunnel, unmanaged browser. A rule proven on a head-office desktop says nothing about a sales laptop on hotel wifi.

Multiplied out, that is soon several hundred cases. Start with the apps holding your most sensitive data and the actions people take daily.

A concrete scenario: a customer spreadsheet to cloud storage

The rule under test is content-based: a file holding customer data may be shared internally on the official tenant and must go no further. MITRE ATT&CK files that kind of leak under T1567.002, Exfiltration to Cloud Storage. To check that it holds:

  1. Prepare a decoy: a synthetic spreadsheet in a realistic format (names, fictitious bank account numbers in a valid format, contract numbers), carrying a unique marker (method in our article on synthetic data in production).
  2. Upload and share the file: an external sharing link on the official tenant, then uploads to a personal instance of the same app (browser and sync client), then to an unauthorised app.
  3. Change the context and the form: corporate network, then outside the tunnel; raw file, zipped file, pasted content.
  4. Record three results per case: blocked or not, alert raised or not, and the delay from the action’s timestamp to the quarantine or unshare event in the SaaS audit log. Connectors driven by change notifications tend to react in minutes; those that scan on a schedule can take hours.

Illustrative example, made-up figures: on the official tenant, inline, five external shares attempted, none created, five refusals in the session log. To the rule, a personal instance of the same app looks like the official tenant, where uploads are allowed: five browser uploads attempted, five transmitted, five collected in the destination account, no alert; the sync client, the same. Outside the tunnel, on the official tenant, all five external shares go through and the API policy removes them 40 minutes later. The risk owner then either accepts those 40 minutes in writing or has off-tunnel laptops routed back through the proxy.

The five refusals do not cover the zipped spreadsheet; it needs its own row. Alert handling is a separate test: see detecting exfiltration on the SOC side.

Next step

Filling the Google Drive and HTTPS rows

Two rows of this matrix fall within the eight channels we test, Google Drive uploads and HTTPS; the other SaaS rows stay yours to run. A 30-minute guided demo on pre-built results shows both, with nothing to install and no access to your environment. To run them on your network: a quick, usually free POC (standard scenario, synthetic data, one of your machines, your real egress controls), then a paid pilot on a limited part of production.

Checklist before declaring a SaaS application “covered”

  • The control mode (API, inline or both) is documented for the app.
  • The API connector’s status has been read since the last token renewal.
  • Signing in to a personal account of the same app from a managed device fails.
  • All five user actions have been tried, at least one from outside the corporate network.
  • The gap between the action and remediation is measured and signed off by the risk owner.
  • Alerts land in the SOC’s own tool.

Retest as SaaS keeps changing

The vendor adds a sharing feature, changes an API, launches an AI assistant that opens a new channel (see Generative AI and data leakage). Your CASB catches up late, or not at all. Give the job to the CASB administrator, who reads release notes for your most sensitive apps and re-runs the rows a change affects.

Endpoint, network and email are tested separately, as part of broader data exfiltration testing.

Frequently asked questions

Can a CASB’s API mode block a leak?

No. It acts on files already stored (removing a share, quarantine), which shortens exposure but does not prevent it.

Do you need to test with real sensitive data?

No. A decoy in the right format triggers pattern-based rules (account numbers, contract numbers). Exact data match and document fingerprinting rules only fire on a decoy you have registered in the rule.

How often should a CASB be retested?

Priority rows of the matrix on a fixed cycle written into your control plan; the rest after a CASB update or a SaaS change that touches them.

Does the CASB replace endpoint DLP?

No. It covers flows to cloud applications, not USB sticks, printing or non-SaaS network channels.

Cloud egress, tested with decoys

We show you what synthetic data sent to Google Drive and over HTTPS achieved against your real egress controls: attempted, transmitted, collected. Then we decide with you what to fix first.