Most engineers think…
Most engineers hear 'CASB' and picture 'just a firewall for cloud apps' — one box in the path that blocks the bad SaaS sites and waves the good ones through. So they treat it like a URL filter with a cloud sticker.
Wrong — and that mental model misses the whole point. A firewall or SWG can stop you reaching random Dropbox, but it is blind inside your sanctioned Google Workspace or M365 tenant. CASB's actual job is to govern the SaaS you do allow — who shares what file with whom, whether a Confidential document can be downloaded to an unmanaged laptop, and to scan the data already sitting at rest in the cloud. It does this two ways at once: inline (a proxy in the live path that can block in real time) and API (out-of-band, talking to the SaaS's own API to inspect data-at-rest and fix old leaks). It is a data-and-identity control point, not a website blocklist.
① The shadow-IT problem — the SaaS you cannot see
Meet Priya, an L1 security analyst at Flipkart. Her firewall and SWG are clean: malware blocked, bad URLs filtered, every laptop reporting in. Then an audit asks one question she can't answer: which cloud apps is the company actually using? She assumed maybe 30. The CASB discovery report comes back with 340 — free PDF converters, AI writing tools, personal Dropbox and Google Drive accounts, a no-name file-sharing site an intern found on Google. None of them went through IT. That gap is Shadow IT.
Why does it happen? Not malice — friction. Signing up for a SaaS app is a credit-card-free, two-minute act: an email address and a password and you're in. An employee at TCS on a deadline pastes a client contract into a free online PDF tool to compress it; an intern at Zomato drops the pricing sheet into a personal Google Drive to 'finish at home'. No download, no executable, no alarm — and yet corporate data has just left the building into an app IT never sanctioned and cannot govern.
Here is the uncomfortable part for a network person: your perimeter controls don't help. A firewall sees an IP and a port; an SWG can block you from reaching a sketchy site, but it is blind to what happens inside an app you allow. Once a user is logged into a sanctioned Google Workspace or Microsoft 365 tenant, the SWG just sees encrypted HTTPS to google.com — it cannot tell a normal save from a customer list being shared to an external Gmail. Cloud broke the old model: the data isn't on your network any more, it's in someone else's.
A CASB (Cloud Access Security Broker) is the answer. The name says it: it brokers — it sits as a control point between your users and the cloud apps, and it gives you the two things the perimeter lost: visibility (every app in use, sanctioned or shadow, risk-scored) and control (policy on what data can move where). It is the SASE/SSE building block that governs the SaaS layer — the layer your firewall was never designed to see.
Think of your apartment society. The main gate guard (the firewall/SWG) checks everyone who drives in the front. But there's a side gate the delivery boys use, and nobody writes them in the register — that's shadow IT. A CASB is hiring a second guard who watches every gate, keeps a register of who carried what in and out (visibility), and is allowed to say 'that parcel of company papers does not leave through the side gate' (control). The front guard alone gives you a false sense of safety.
Pause & Predict
Predict: your SWG already blocks malware and bad URLs perfectly. Name ONE data-loss event it still cannot stop inside a sanctioned, allowed app like Google Workspace. Type your guess.
Aditya at HCL says: "We have a great firewall and SWG, so we don't need a CASB." What is the flaw in that reasoning?
② The 4 CASB pillars — Visibility, Compliance, Data Security, Threat Protection
Gartner, who coined the term, frames every CASB around four pillars. Learn them as four jobs, not four products — a single CASB does all four. They are Visibility, Compliance, Data Security and Threat Protection. Walk through each with the question it answers.
Pillar 1 — Visibility. The question: what cloud apps are we actually using, and how risky is each one? The CASB does Cloud Discovery — it ingests your firewall and proxy logs and produces a list of every app touched, then assigns each a risk score based on its certifications, encryption, breach history and data-residency. Now Priya's 340 apps become a ranked list: sanction the good, coach users off the risky, block the worst.
Pillar 2 — Compliance. The question: does our cloud use satisfy the rules we're bound by? An Indian fintech under RBI rules, a hospital under data-protection law, a card processor under PCI DSS — each has constraints on where data may live (data residency) and what may be exposed. The CASB enforces and reports on this: flag any app storing regulated data in the wrong region, alert on a card number sitting in a public link.
Pillar 3 — Data Security. The question: is our sensitive data protected inside the cloud? This is DLP on cloud data — detecting a PAN/Aadhaar number, an 'Internal-Confidential' label, source code; plus encryption / tokenisation so the SaaS only ever holds a useless surrogate. This is the pillar that stops the pricing sheet leaving.
Pillar 4 — Threat Protection. The question: is someone abusing our cloud accounts or hiding malware in them? The CASB watches for account takeover (impossible-travel logins, a login from Mumbai then Brazil ten minutes later), and scans cloud storage for malware sitting in a shared OneDrive folder waiting to be opened. It's the anti-abuse pillar.
The four pillars, one tap each
Tap each card. This is the exact list a CCSP question or an interviewer will expect you to recite cold.
Discover every sanctioned + shadow app from logs and risk-score it. So: you finally know your real cloud footprint, not the 30 you assumed.
Enforce + report on data residency and regs (PCI, privacy law). So: regulated data stays where the law says, and you can prove it.
DLP on cloud data + encryption/tokenisation. So: a Confidential file or PAN number can't quietly leave or over-share.
Catch account takeover (impossible-travel) + malware in cloud storage. So: a stolen login or a planted file gets flagged fast.
Pause & Predict
Predict: a hospital in Pune must keep patient records inside India. A doctor starts using a free US-hosted note app. Which TWO CASB pillars light up, and what does each do? Type your guess.
Karthik at ICICI gets a CASB alert: a user logged in from Mumbai at 10:00, then the same account logged in from Brazil at 10:08. Which pillar caught this and what is it called?
③ Inline vs API (out-of-band) — block live, or scan at rest
A CASB can connect to your cloud world two completely different ways, and the single most-tested fact about CASB is knowing both. The first is inline; the second is API (out-of-band). They are not rivals — mature deployments run both. Let's take them one at a time.
Inline mode — sit in the live path, act in real time
Inline means the CASB is in the path of the traffic, as a proxy, so it can block a transaction the instant it happens — the moment a user clicks 'upload' to a personal drive, the proxy can deny it before a single byte lands. There are two flavours. A forward proxy steers traffic from the user side (an endpoint agent or a tunnel), so it sees every app — sanctioned and shadow — but needs the device to be managed/steered. A reverse proxy steers from the app side via the identity provider (SAML), so even an unmanaged BYOD phone is forced through the CASB for a chosen sanctioned app — without installing anything on the device. That last point is the reverse proxy's whole reason to exist.
API mode — talk to the SaaS, scan what is already there
API mode (also called out-of-band) doesn't sit in the path at all. The CASB connects to the SaaS using the app's own admin API — you grant it OAuth access to your Microsoft 365 or Box tenant — and from there it can scan data-at-rest (every file already sitting in OneDrive), retro-inspect history (find the card number someone made public last month, before the CASB even existed), and fix it (revoke the public link, apply a label, quarantine the file). Because it's off-path, it adds zero latency to users — but it's not real-time: it acts a beat after the event, and only on sanctioned apps whose API it has access to.
▶ Watch one risky share — caught two different ways
Neha at PhonePe tries to make a Confidential deck 'anyone with the link'. Follow how inline catches it live, and how API would have caught it if it had already happened. Press Play for the healthy path, then Break it to see the failure.
{
"policy": "block-confidential-external-download",
"applies_to": { "apps": ["Office365", "GoogleDrive", "Box"] },
"match": {
"sensitivity_label": "Confidential",
"content_dlp": ["PAN", "Aadhaar", "PCI-card"]
},
"condition": {
"device_state": "unmanaged",
"action": "download"
},
"enforce": { "mode": "inline", "do": "block", "notify_user": true }
}policy 'block-confidential-external-download' compiled OK
scope: 3 apps · inline (reverse-proxy) for unmanaged devices
match: label=Confidential OR dlp{PAN,Aadhaar,PCI-card}
action on download from unmanaged: BLOCK + user coaching page
status: ENABLED — 0 matches (last 24h)Symptom: after turning on inline reverse proxy for a SAML app, users get login loops or a broken app. Cause is almost always that the proxy must re-sign the SAML assertion (it rewrites the IdP response so the session is steered through the CASB) and that option wasn't enabled, or the IdP's reply URL still points straight at the app and bypasses the proxy. Fix: enable Re-Sign SAML Assertions on the reverse-proxy app config and point the IdP's ACS/reply URL at the CASB's proxy URL, not the app's native URL. Separately, a certificate-pinned app (it hard-codes the real server's cert) will refuse the proxy's cert entirely — for those, inline can't decrypt, so you cover them with API mode instead.
Sneha at Infosys faces this
Sneha, an L1 analyst, gets a ticket: a contractor on an unmanaged personal laptop can log into the corporate Microsoft 365 tenant fine, but the CASB DLP rule meant to block downloading 'Confidential' files to that device never fires — the contractor downloaded a labelled deck anyway.
The contractor's device is unmanaged, so the forward-proxy agent (which only runs on managed devices) isn't in the path. The reverse proxy — the mode meant for unmanaged BYOD — was configured but the M365 app wasn't actually steered through it: the IdP reply URL still pointed at the native login.microsoftonline.com, so the session bypassed the CASB and DLP never saw the download.
She separates the two reaches: managed-device traffic uses the forward-proxy agent; unmanaged BYOD must be forced through the reverse proxy via SAML. She checks whether this session ever traversed the CASB at all (it didn't), then checks the IdP app's reply/ACS URL and the Re-Sign SAML Assertions toggle.
Microsoft Defender Portal → Cloud Apps → Conditional Access App Control (or Netskope → Settings → Reverse Proxy → App config → Re-Sign SAML Assertions)Point the IdP's reply/ACS URL for the M365 app at the CASB reverse-proxy URL and enable Re-Sign SAML Assertions, so every BYOD session is steered through the CASB. Add a session policy: device-state = unmanaged AND label = Confidential AND action = download → block.
Re-test from the unmanaged laptop: login still works, but downloading a Confidential file now returns the CASB block/coach page; the policy shows a match in the activity log.
Pause & Predict
Predict: an attacker steals a Drift-style OAuth token your tenant granted to a third-party app. Which CASB mode is positioned to even SEE that, and why does inline-only miss it? Type your guess.
Arjun at Airtel needs to retroactively find and unshare every file that was made public in the company OneDrive over the last 3 months — including before the CASB was bought. Which mode does this, and why can't the other?
④ CASB in SSE — sharing the stream with SWG + DLP, real policy & gotchas
CASB doesn't live alone. In a SSE platform it sits beside the SWG (from the last lesson) and shares one decrypted stream. When the SWG already terminates TLS to inspect web traffic, it hands that same decrypted view to the CASB engine — so the CASB can identify the app, the user and the action without decrypting twice. DLP is then a shared engine on top: one set of detectors (PAN, Aadhaar, 'Confidential' label) that the SWG uses on web uploads and the CASB uses on SaaS sharing alike. That sharing is the whole efficiency of SSE — decrypt once, let every module read it.
Concretely, a real policy reads like an English sentence built from those shared parts: "block download of files labelled Confidential to unmanaged devices." CASB supplies the app + device-state context (it knows this is M365 on an unmanaged BYOD phone via the reverse proxy), DLP supplies the content/label match (the file is 'Confidential'), and the SWG/proxy supplies the enforcement point (it's in the path to deny). No single box could write that rule — it's the integration that makes it possible.
Now the production gotchas — the things that turn a clean demo into a 2 a.m. ticket. Gotcha 1: API coverage gaps. API mode only works for SaaS apps that expose a rich admin API and that you've connected — M365, Google Workspace, Box, Salesforce are well covered; that niche app the marketing team loves may expose nothing, so its data-at-rest is invisible to your CASB. Gotcha 2: app sprawl. Discovery routinely finds hundreds of apps; you cannot sanction or block all of them by hand, and over-blocking just pushes users to worse workarounds. Gotcha 3: API rate limits. Out-of-band scanning calls the SaaS API constantly — vendors throttle it (Netskope's data-protection API, for instance, returns HTTP 429 past roughly 300 requests/minute per token), so a huge retro-scan can lag for hours. Gotcha 4: certificate pinning (from sec3) — some apps refuse inline decryption outright, so you must cover them by API instead.
Inline CASB is the security guard frisking you at the door in real time — he stops the banned item before you enter. API mode is the Aadhaar/KYC back-office audit that runs over your records after account opening: it can't stop a transaction as it happens, but it methodically reviews everything already on file and flags what's wrong. A good bank uses both — a guard at the door and a back-office audit. So does a good CASB deployment.
For your CCSP path, CASB sits squarely in Domain 4 — Cloud Application Security (17% of the exam). The exam expects you to define a CASB, recite the four pillars, and crucially distinguish proxy (inline) from API deployment and say when each fits — the exact distinction you just learned. It also threads into the SSE/SASE topics across the cloud-security blueprint. Nail inline-vs-API and the pillars and you own the CASB questions cold.
Cold, in 45 seconds: name the four pillars (Visibility, Compliance, Data Security, Threat Protection); explain inline vs API (in-path real-time block vs out-of-band data-at-rest scan) and when you'd choose each; say why you'd reach for a reverse proxy (unmanaged BYOD, no agent, via SAML); and write the policy 'block download of Confidential to unmanaged devices' in terms of which piece (CASB / DLP / proxy) supplies what. If you can do that without notes, you're ready for CCSP Domain 4 and the next lesson.
An interviewer asks Meera: "In one sentence, why does a real CASB deployment almost always run BOTH inline and API mode rather than picking one?"
🤖 Ask the AI Tutor
Tap any question — instant, scoped to this lesson. No login, no waiting.
Pre-curated from SASE docs + community Q&A, scoped to this lesson. For a live prod issue, paste your export into chat.techclick.in.
📝 Wrap-up assessment — six more
You've answered 4 inline. Six left. 70% (7 of 10) marks the lesson complete on your profile. Tap Submit all answers at the end.
🧠 In your own words
Type one line: In one line, why must a CASB run inline AND API mode rather than just one? Then compare to the expert version.
🗣 Teach a friend
Best way to lock it in — explain it in one line to a teammate. Tap to generate a paste-ready summary.
📖 Glossary
- CASB
- Cloud Access Security Broker — a control point between users and cloud apps that gives visibility and enforces policy.
- Shadow IT
- Cloud apps employees adopt without IT approval, leaking data into apps no one governs.
- The 4 pillars
- Gartner CASB framework: Visibility, Compliance, Data Security, Threat Protection.
- Cloud Discovery
- CASB analysis of firewall/proxy logs to find and risk-score every cloud app in use, including shadow IT.
- Risk score
- A rating of an app based on its certifications, encryption, breach history and data-residency — used to triage apps.
- Inline mode
- CASB sits in the live traffic path (as a proxy) so it can block an action in real time.
- API (out-of-band) mode
- CASB connects to the SaaS's own admin API off-path to scan data-at-rest and retro-inspect history; zero added latency.
- Forward proxy
- Steers traffic from the user side (agent/tunnel) — sees all apps but needs a managed/steered device.
- Reverse proxy
- Steers from the app side via the IdP (SAML) — forces unmanaged BYOD through the CASB for one app, no agent.
- DLP
- Data Loss Prevention — detects and blocks sensitive content (PII, card numbers, Confidential labels) from leaking or over-sharing.
- Data residency
- The legal requirement that certain data be stored within a specific country or region.
- SSE
- Security Service Edge — the cloud-delivered security stack (SWG + CASB + ZTNA + DLP) where CASB shares one decrypted stream.
📚 Sources
- Microsoft Learn — "File policies in Microsoft Defender for Cloud Apps" (exact console path: Cloud Apps → Policies → Policy management → Information Protection → Create policy → File policy; fields: Policy name, Policy severity, Category=DLP, Access level filter, Content inspection method = Data Classification Services, Sensitivity label, governance actions; API-based, 50-policy limit, ms.date 2025-09). learn.microsoft.com/en-us/defender-cloud-apps/data-protection-policies
- Netskope — "What is a CASB?" + "Deployment Options" (the four Gartner pillars Visibility/Compliance/Data Security/Threat Protection; most customers combine API with forward and/or reverse proxy for full use-case coverage). netskope.com/security-defined/what-is-casb · netskope.com/products/deployment-options
- TechTarget SearchSecurity — "Choosing between proxy vs. API CASB deployment modes" + CSA "API vs. Proxy: best protection from your CASB" (inline proxy acts in real time and can block; API is out-of-band, off the data path, scans data-at-rest, needs admin API access to sanctioned apps). techtarget.com/searchsecurity/tip/Choosing-between-proxy-vs-API-CASB-deployment-modes · cloudsecurityalliance.org/blog/2016/08/11/api-vs-proxy-get-best-protection-casb
- Netskope docs — "SAML Reverse Proxy" + "Universal Reverse Proxy" (reverse proxy steers unmanaged BYOD via the IdP/SAML, requires Re-Sign SAML Assertions; API Rate Limits doc notes HTTP 429 throttling on the data-protection API). docs.netskope.com/en/saml-reverse-proxy/ · docs.netskope.com/en/api-rate-limits-on-next-generation-api-data-protection/
- Google Cloud / Mandiant Threat Intelligence — "Widespread Data Theft Targets Salesforce Instances via Salesloft Drift" (Aug 2025 UNC6395 stole third-party Drift OAuth tokens to bulk-export Salesforce/Workspace data across 700+ orgs — the real shadow-IT/OAuth-grant risk CASB API mode is meant to surface). cloud.google.com/blog/topics/threat-intelligence/data-theft-salesforce-instances-via-salesloft-drift
- ISC2 CCSP Certification Exam Outline — Domain 4 Cloud Application Security (17%): define CASB, the four pillars, and proxy (inline) vs API deployment models. isc2.org/certifications/ccsp/ccsp-certification-exam-outline · ccsp.alukos.com/certification/domain-4/
- Cloudflare Learning Center — "What is a CASB?" (vendor-neutral explainer of the broker concept, shadow IT, and the four pillars). cloudflare.com/learning/access-management/what-is-a-casb/
What's next?
A CASB governs the SaaS and data you can see into — but what about the attacker who's already slipped past every gate and is moving quietly inside your network? Signature defences and the firewall already waved them through. NDR is the control that watches behaviour and east-west traffic to catch the intruder the perimeter missed.