DEV Community

Mike Anderson
Mike Anderson

Posted on

How CASB Helps Control External AI Platforms Without Killing Innovation

CASB to data security

How CASB Helps Control External AI Platforms Without Killing Innovation

Let’s start with a problem.

People are not using ChatGPT, Claude, Canva, Midjourney, Gemini, or other AI tools because they want to create a security incident.

Most of the time, they are using them because they are trying to get work done.

  • A developer wants help with an error message.
  • A project manager wants to summarize a messy document.
  • A designer wants to create a quick draft.
  • A security engineer wants help writing a detection query.
  • An operations team member wants to understand a cloud log or runbook faster.

That behavior makes sense.

The security issue starts when internal data goes with the prompt.

A user may paste a customer name, an AWS error log, a security architecture snippet, source code, HR content, contract details, or a Confluence policy into an external AI tool. Once that happens, the organization may lose control over where that data is processed, retained, reviewed, or used.

So the goal should not be:

“How do we stop everyone from using AI?”

The better question is:

“How do we help people use AI safely, while stopping confidential or restricted data from leaving the organization?”

That is where CASB, Secure Web Gateway, DLP, secure browser controls, and a strong internal AI alternative come together.


The short version

CASB helps control external AI platforms by sitting between users and SaaS applications. It gives security teams visibility into AI usage and lets them apply policy based on the user, device, app, data, and action.

For example:

User wants to use ChatGPT, Claude, Canva, Midjourney, or another AI SaaS
        |
        v
CASB / SWG / DLP / Secure Browser
        |
        |-- Discover the app
        |-- Identify the user and device
        |-- Inspect prompt, upload, or paste activity
        |-- Check data classification
        |-- Apply policy
        v
Allow / Warn / Block / Coach / Log / Exception workflow
Enter fullscreen mode Exit fullscreen mode

In an enterprise RAG design, this matters because ** AWS Kendra and AWS Bedrock protect the approved internal AI path*, while **CASB helps control the unmanaged external AI path*.

They solve different parts of the same problem.


Where CASB fits in the AI governance architecture

Assume the organization already has an internal AI assistant using Amazon Kendra and Amazon Bedrock.

That internal assistant is the safe path for internal knowledge:

Internal policy / runbook / client-project question
        |
        v
Approved internal AI assistant
        |
        v
Amazon Kendra retrieves authorized content
        |
        v
Amazon Bedrock generates a grounded answer
Enter fullscreen mode Exit fullscreen mode

But users may still open external AI tools directly:

User
  |
  | tries to paste internal content into external AI
  v
ChatGPT / Claude / Canva / Midjourney / other AI SaaS
Enter fullscreen mode Exit fullscreen mode

That is where CASB, SWG, DLP, and secure browser controls are needed:

User
  |
  v
CASB / SWG / DLP / Secure Browser
  |
  | inspect destination, content, identity, device, and risk
  v
External AI Platform
Enter fullscreen mode Exit fullscreen mode

The internal RAG platform gives users a better place to ask internal questions.

The CASB layer reduces the chance that users bypass the safe path and paste sensitive data into unmanaged AI tools.


What CASB actually does

CASB is often described in abstract terms, so let’s keep it simple.

For external AI platforms, CASB helps answer five questions:

  1. Which AI tools are people using?
  2. Who is using them?
  3. What data are they sending?
  4. Should this action be allowed, warned, blocked, coached, or logged?
  5. What should the SOC or data owner review?

That gives security a practical control point without treating every user like a bad actor.


1. Discover external AI usage

Before blocking anything, get visibility.

Most organizations already have shadow AI usage before they have an approved AI policy. That is normal. The first job is to understand what is happening.

A CASB or SWG can help identify:

Visibility area Example
AI apps in use ChatGPT, Claude, Gemini, Canva, Midjourney, Perplexity, unknown AI SaaS
Users and groups engineering, marketing, HR, finance, contractors
Access source corporate laptop, unmanaged device, personal device
Activity type login, prompt, paste, upload, download, API use
Volume occasional use, daily use, unusually high usage
App status approved, limited-use, unapproved, blocked
Data risk public, internal, confidential, restricted

This phase is important because hard blocking too early can break legitimate workflows and push users toward workarounds.

Start with visibility. Then tune the policy.


2. Classify AI platforms

Not every AI platform carries the same risk.

A contracted enterprise AI service with approved terms is different from an unknown consumer AI website. A design tool used for public marketing content is different from a chatbot receiving customer data or source code.

A simple AI app register helps:

AI app category Example Recommended action
Approved enterprise AI Enterprise ChatGPT, Claude Enterprise, Gemini for Workspace, Copilot, approved Canva plan Allow with monitoring and DLP
Approved limited-use AI Tools approved only for public or low-risk content Allow public data, warn or block sensitive data
Unapproved AI Consumer AI tools, unknown AI SaaS, browser extensions Block or restrict uploads/paste
High-risk AI Tools with unclear retention, training, legal, or privacy terms Block until reviewed
Internal RAG assistant Amazon Kendra + Amazon Bedrock internal assistant Preferred path for internal knowledge

This keeps the policy balanced.

The message to users becomes:

“Use approved AI tools for the right kind of work. Use the internal assistant for internal data.”

That is much easier to adopt than a blanket “No AI” policy.


3. Inspect prompts, uploads, and pasted content

This is the core data security control.

The CASB or integrated DLP engine should inspect the content users send to external AI platforms.

The high-value detections are:

  • AWS access keys
  • API tokens
  • private keys
  • passwords
  • source code
  • customer records
  • regulated personal data
  • HR, legal, or finance content
  • internal architecture diagrams
  • incident response details
  • client or project names
  • documents labeled Confidential or Restricted
  • security policies, vulnerability reports, and runbooks
  • Google Drive or Microsoft Purview sensitivity labels, if used

A practical policy could look like this:

IF destination category = External AI
AND content contains AWS access key OR private key OR password
THEN block the action
AND alert the SOC
AND show the user safe guidance.
Enter fullscreen mode Exit fullscreen mode

Another policy:

IF destination app = consumer AI
AND content classification = Confidential or Restricted
THEN block upload or paste
AND recommend the approved internal AI assistant.
Enter fullscreen mode Exit fullscreen mode

The user-facing message matters.

A bad message says:

Blocked by security policy.
Enter fullscreen mode Exit fullscreen mode

A better message says:

This looks like internal or restricted information.
Please use the approved internal AI assistant for company policies, AWS runbooks,
client/project information, source code, or security procedures.
Enter fullscreen mode Exit fullscreen mode

That kind of message teaches the user and gives them a safe next step.


4. Apply contextual policy

Good CASB policy should not be flat.

The decision should depend on the user, device, app, action, and data.

Here is a practical matrix:

Scenario Recommended decision
Corporate device, approved enterprise AI, public data Allow
Corporate device, approved enterprise AI, internal data Allow with monitoring
Corporate device, consumer AI, public data Allow or warn
Corporate device, consumer AI, confidential data Block
Unmanaged device, any external AI, internal data Block
Privileged engineer pasting AWS logs or secrets Block and alert
User uploading client architecture to unapproved AI Block and create DLP case
Marketing using Canva with public campaign content Allow
HR or legal content going to external AI Block unless approved by exception
Contractor accessing unapproved AI with internal data Block

This avoids the two common extremes:

  • allowing everything because enforcement is hard;
  • blocking everything and frustrating users.

The better approach is risk-based control.


5. Log the right events

CASB events should feed the SIEM or SOAR platform.

But there is an important caution: do not turn the CASB or DLP system into another sensitive data repository.

Log the event details needed for investigation, but be careful with full prompt capture, full file capture, and sensitive snippets.

Useful events include:

Event Why it matters
User accessed external AI app Shadow AI visibility
User received AI usage warning Coaching and adoption tracking
DLP block Potential data leakage attempt
Prompt or upload blocked Sensitive data movement control
Repeated violations Training, misuse, or insider-risk review
High-volume AI usage Possible scraping or automation
Unapproved AI app discovered Vendor review or blocking decision
Exception requested Governance evidence
Exception approved/expired Auditability

Example SOC detection:

IF user has 3 or more blocked AI DLP events in 24 hours
THEN create a SOC case for review.
Enter fullscreen mode Exit fullscreen mode

Another example:

IF user attempts to paste an AWS secret, private key, password, or customer export
into an external AI platform
THEN create a high-severity DLP incident.
Enter fullscreen mode Exit fullscreen mode

Not every event is malicious.

Sometimes the control worked and the user needs guidance. The SOC process should separate accidental misuse from repeated or suspicious behavior.


Recommended rollout plan

Do not start with the strictest policy on day one.

A phased rollout is safer and easier for the business to accept.

Phase 1: Visibility only

Turn on discovery and logging.

Do not block yet.

Goals:

  • identify which AI apps are in use;
  • identify high-risk departments or use cases;
  • understand legitimate workflows;
  • create an approved AI app register;
  • tune categories and labels.

A typical visibility phase may run for two to four weeks.

Phase 2: Warn and coach

Start warning users when they visit unapproved AI tools or paste content that may be sensitive.

Example warning:

You are using an external AI tool.
Do not enter client data, internal security designs, credentials, source code,
HR/legal data, or restricted information.
Use the approved internal AI assistant for internal content.
Enter fullscreen mode Exit fullscreen mode

This phase gives users a chance to adjust before hard enforcement begins.

Phase 3: Block high-confidence sensitive data

Start with detections that have low false-positive risk:

  • AWS access keys
  • private keys
  • passwords
  • API tokens
  • regulated identifiers
  • files labeled Restricted
  • customer exports
  • known confidential project or client terms

Do not start by blocking vague “internal data” patterns everywhere. That creates noise and user frustration.

Phase 4: Enforce AI app governance

Apply different rules by app category.

AI app status Control
Approved enterprise AI Allow with monitoring
Approved public-use AI Allow public data only
Unapproved AI Block upload/paste or block access
Unknown AI SaaS Block until reviewed
Internal RAG assistant Promote as the approved path

Phase 5: Add a real exception workflow

Some users will have legitimate business reasons to use external AI.

That is fine, but exceptions need control.

A good exception process includes:

  1. user submits request;
  2. business owner confirms the need;
  3. data owner confirms data type;
  4. security reviews risk;
  5. legal/privacy reviews vendor terms;
  6. exception is scoped by user, app, data, and time;
  7. access expires automatically;
  8. usage is logged.

Avoid permanent broad exceptions.

They usually become the hole everyone forgets about.


CASB and AI security solutions to consider

The right tool depends on the organization’s stack, licensing, traffic routing model, DLP maturity, and endpoint strategy. The point is not to buy the most popular tool. The point is to choose the control plane that can actually see and enforce the AI traffic you care about.

Here are practical options to evaluate.

Solution Best fit Strengths Watch-outs
Microsoft Defender for Cloud Apps Microsoft-heavy organizations using Entra ID, Microsoft 365, Defender, Purview, or Sentinel Strong SaaS visibility, shadow IT discovery, app governance, Microsoft ecosystem integration Works best when Microsoft identity, endpoint, and data classification are already mature
Microsoft Purview DLP + Defender stack Organizations already labeling data in Microsoft 365 Sensitivity labels, DLP policies, endpoint and cloud integration Less effective if most sensitive data lives outside Microsoft without labels/connectors
Netskope One Organizations needing cloud, web, private app, AI, endpoint DLP, and user coaching through a converged SSE/SASE model Strong CASB/SWG/DLP coverage, app visibility, inline controls, AI security focus Requires thoughtful traffic steering and DLP tuning
Palo Alto Networks Prisma Access + AI Access Security Organizations already using Palo Alto Networks SASE, Prisma Access, or Enterprise DLP GenAI visibility, access control, data-loss prevention, threat protection Best value when integrated into the Palo Alto platform strategy
Zscaler Internet Access / Zscaler Data Protection Organizations using Zscaler as secure web gateway or zero-trust exchange Inline inspection, SSL decryption, DLP enforcement for AI prompts/uploads SSL inspection design, privacy notices, and bypass handling must be mature
Cloudflare One / Gateway / SASE controls Organizations using Cloudflare for Zero Trust, secure web gateway, or browser isolation Workforce GenAI visibility, identity-based controls, input/output restriction, broad web control CASB depth depends on selected Cloudflare services and deployment model
Cisco Secure Access with AI Access Cisco Secure Access or Umbrella customers wanting GenAI access controls GenAI app access control and DLP as part of Cisco SSE Best fit for Cisco-centered environments
Forcepoint ONE / Forcepoint DLP Data-security-led programs needing strong DLP and risk-adaptive controls Mature DLP focus, data classification, risk-adaptive enforcement, ChatGPT protection use cases Requires DLP policy maturity to avoid noise
Lookout Mobile-heavy or hybrid organizations needing endpoint/mobile SaaS visibility AI app visibility/governance across mobile fleets and data exfiltration controls Evaluate fit if most traffic is desktop browser or proxy-based

A practical selection rule:

Choose the platform that can enforce policy where your users actually work: browser, endpoint, network, SaaS API, mobile, or all of the above.


How CASB connects to the internal RAG assistant

This is the key architecture point.

CASB should not be positioned as the replacement for internal RAG. Internal RAG should not be positioned as the replacement for CASB.

They work together.

Problem Recommended control
Users cannot find internal answers quickly Internal RAG with Amazon Kendra and Amazon Bedrock
Users paste internal data into external AI CASB/SWG/DLP/secure browser
Users need source-backed answers Kendra retrieval with citations
Users should only see authorized documents Kendra ACL and user-context filtering
AI may produce unsafe output Bedrock Guardrails and application controls
External AI vendors may process company data CASB + vendor governance + legal/privacy review
Security needs visibility SIEM/SOAR logging from RAG, CASB, DLP, and identity

The clean message to the business is:

We are not blocking AI. We are giving people a safe internal AI option and controlling what data can go to external AI tools.

That is a much better conversation.


Example control decisions

Here are simple examples that make the policy real.

Example 1: Developer pastes AWS error into ChatGPT

If the error contains no secret, customer data, or internal architecture:

Decision: Warn or allow.
Reason: Low-risk troubleshooting may be acceptable in an approved tool.
Enter fullscreen mode Exit fullscreen mode

If the error includes an AWS access key, account ID tied to a client, internal hostname, or production log snippet:

Decision: Block and route to internal assistant or approved engineering tool.
Reason: Sensitive cloud and client/project information may leave the organization.
Enter fullscreen mode Exit fullscreen mode

Example 2: Security engineer pastes incident notes into Claude

Decision: Block.
Reason: Incident notes may contain indicators, affected systems, user details, client information, or legal/privacy-sensitive facts.
Enter fullscreen mode Exit fullscreen mode

Better path:

Use the approved internal RAG assistant or approved incident response workspace.
Enter fullscreen mode Exit fullscreen mode

Example 3: Marketing uses Canva for a public banner

Decision: Allow.
Reason: Public marketing content in an approved design workflow is usually acceptable.
Enter fullscreen mode Exit fullscreen mode

Example 4: HR uploads employee records to an external AI summarizer

Decision: Block unless there is a formally approved vendor and use case.
Reason: HR data is sensitive and usually requires legal/privacy review.
Enter fullscreen mode Exit fullscreen mode

Common mistakes to avoid

Mistake 1: Blocking AI without giving users an alternative

This usually creates shadow AI.

People still need help. If the approved path is too slow, they will find a faster one.

Mistake 2: Relying only on policy

Policies matter, but policy alone does not stop copy/paste.

The control needs to exist where users actually interact with AI tools.

Mistake 3: Logging full prompts and files everywhere

Prompt data can be sensitive.

CASB and DLP evidence should be protected, retained only as long as needed, and accessible only to approved security or data-protection staff.

Mistake 4: Creating broad exceptions

A permanent exception for “engineering can use any AI tool” is not a control.

Exceptions should be scoped, time-bound, and reviewed.

Mistake 5: Treating all AI tools the same

A contracted enterprise AI platform, a public chatbot, and an unknown browser extension do not carry the same risk.

Classify the tools and apply different rules.


What good looks like

A good implementation feels practical to users and useful to security.

Users see:

  • approved AI tools;
  • clear guidance;
  • helpful warnings;
  • a safe internal assistant for internal data;
  • fast exception handling.

Security sees:

  • which AI tools are used;
  • what data movement is risky;
  • which actions were blocked or warned;
  • which users need coaching;
  • which vendors need review;
  • which detections need tuning.

Leadership sees:

  • reduced data leakage risk;
  • better AI adoption governance;
  • audit evidence;
  • fewer unmanaged AI workflows;
  • a safer path for innovation.

That is the outcome we want.


Suggested operating model

Area Owner
AI acceptable-use standard CISO, GRC, Legal
Approved AI vendor register Security, Legal, Procurement
CASB/SWG policy Security Engineering
DLP rules Data Security, GRC, Privacy
Internal RAG platform Security Architecture, Cloud Platform
User guidance Security Awareness, IT
SOC monitoring SOC Manager
Exception approval Data Owner, Security, Legal/Privacy
Quarterly review CISO, Data Owners, Engineering, Legal

This does not need to be bureaucratic.

It needs to be clear enough that users know where to go, security knows what to monitor, and data owners understand their approval role.


Final recommendation

Use CASB to control external AI platforms, but do it in a way that helps users rather than fights them.

The practical model is:

Internal data questions -> Approved internal RAG assistant
External AI access -> CASB/SWG/DLP inspection
Public or approved data -> Allow
Risky behavior -> Warn and coach
Confidential or restricted data -> Block
Repeated or severe events -> SOC/SOAR case
Legitimate business need -> Time-bound exception
Enter fullscreen mode Exit fullscreen mode

That is the balanced enterprise approach.

We let people benefit from AI.

We give them a safe internal path for company knowledge.

We stop confidential and restricted data from being pasted into unmanaged tools.

And we build enough visibility and governance to improve the program over time.

The goal is not to make AI difficult.

The goal is to make the safe path the easiest path.


Top comments (0)