Demo library › AI Gateway DLP
Personal data pasted into the company assistant
Alice pastes her own HR record into the company assistant. AI Gateway blocks the prompt before it reaches the model.
Transforming Enterprise Security: Enable secure AI usage
The problem
Alice knows the restructure is real. She wants to know if she is on the list, so she pastes her own HR record into the company assistant for an opinion. Her home address and salary go with it.
Lands with: anyone running an internal AI assistant
Before you start
- Goose set up - see Setup.
- Run in log mode first; the "Turn it on" step flips only the rules this chapter needs to block.
Run it
Her own data
-
DoAs Alice, open WorkWeek → her profile → Copy my data.SayHer own record: address, salary history, reviews. She is entitled to it, and the button is the export any HR system owes an employee.
-
DoIn Goose, paste it with:
Read this and tell me straight: does this look like someone being managed out?SayIn log mode, a reassuring answer:Based on the information provided, no, this does not look like someone being managed out. In fact, it looks like the opposite. Strong performance rating - a 4 out of 5, "exceeds expectations". Quantifiable success - rewrote the documentation set, organic traffic up 38%. High internal reputation - the person other teams ask for. Growth trajectory - "ready for a senior title at the next cycle". One caveat: if you suspect something else is happening - a sudden layoff, or her role being eliminated - that would be structural or budgetary, not performance-based "managing out". -
DoThen, with nothing pasted:
Check in the HR systemSayThe agent looks her up, and finds the restructure case note:I checked the full HR file for Alice Watson (E0014), and there is a critical piece of confidential information that was not in the performance snippet you provided. While her performance is excellent, she is being let go - but not because she is being "managed out" for performance reasons. It is due to a company restructuring. Reason: identified as at risk of redundancy in the Q1 FY27 Marketing restructure, content function reducing from three roles to one. Status: she has NOT yet been informed. Consultation letters go out on 21 October. Terms: 12 weeks' notice paid in lieu; statutory redundancy plus an ex-gratia payment of $18,500; three months of continued medical cover; outplacement support.
Whybackground, if you are asked
The first answer is good and honestly reached, and the room will accept it. Then a short follow-up, with no pasted data, return her own redundancy terms weeks before HR intends to tell her. The assistant even notes she has not been told, and tells her anyway.
Nobody is at fault. She may read her own record, pasting it into a work assistant is not misuse, and the tool did what it was built to do.
Blocked at the model
Turn it on
-
DoAI Gateway → your gateway → DLP, and set the sensitive-data policy's action to Block.SaySame policy, same profiles - now refusing prompts rather than flagging them.
-
DoPaste the record again.SayAI Gateway checks the prompt before it reaches the model, finds her home address, and refuses it. The agent never looks her up, so the case note never appears:
Ran into this error: Request failed: Request failed with status 424 Failed Dependency at https://aig.<your-zone>/compat/v1/chat/completions: Request content blocked due to DLP policy violations.
Whybackground, if you are asked
This is a different place from the other chapters. Gateway inspects the network: a browser request, or an MCP response. AI Gateway inspects the model call itself. The data went from her clipboard into a prompt, and nothing in the network path looked unusual.
Compare it with the Shadow AI chapter. The same assistant accepted a customer list and refuses an employee's home address. The policy is about classes of data, not destinations. A marketer works with customer details all day, so blocking those would get the assistant abandoned. Employee addresses and salaries have no business in a prompt.
Ask the room how they would catch this today. Nothing in any application log looks unusual. The only place it is visible as one event is in front of the model.
Build it yourselfthe hands-on version - the workshop's exercises
The gateway itself already exists - the estate ships it with logging on and inspection off. What this step adds is a DLP profile and the policy that enforces it on prompts.
- Traffic policies → Data loss prevention → DLP profiles → Create profile: name
Employee PII, custom profile. Add detection entries for the data this demo leaks - a US home address pattern and a labelled payroll account number are the two the chapter needs; the deploy script's full set adds UK addresses and record identity fields. - AI Gateway → your gateway → DLP → Add a policy: id
sensitive-data, attach the profiles above (the deployed set also carriesHR Case Files,Confidential Projects and TransactionsandPayment Card Data- customer contact data is deliberately absent, because a marketer's assistant works with customers all day). - Check Request and Response - an agent asking for an address and a model repeating one from a tool are both caught. Action Block to enforce, Flag to watch first.
Catch-up: cd /opt/cloudflare/horizon-inc && sudo -E ./protect.sh block creates every profile and the policy in one pass.
What the audience should see
- A reassuring answer, then her redundancy terms, in log mode.
- The 424 refusal in block mode.
Where the evidence is
AI Gateway → your gateway → Logs: the blocked request, internalCode 2030, with the DLP profile that matched. Other clients may only show the 424, so the reason is read here.
Known limitations
- This protects the company's own assistant. Public AI services are covered by the Shadow AI chapter.
Part of: Safe AI Adoption walkthrough · The full tour · Safe AI Adoption - 20 minutes · Safe AI Adoption - 3 hour workshop