TL;DR: Enterprise AI creates six distinct sensitive-data exposure points across agents, APIs, model calls, tool gateways, agent handoffs and RAG pipelines, according to Protecto, so policy has to be enforced at the boundary rather than inside every workflow step. The governance problem is architectural, not procedural: one control plane has to follow the data, or the data will outrun the controls.
At a glance
What this is: This article maps six points in an AI workflow where sensitive data can move, and argues that policy enforcement belongs at the boundary rather than being duplicated inside every component.
Why it matters: For IAM and NHI practitioners, it reframes AI governance as an access-control and data-handling problem across agents, APIs and gateways, not just a model safety issue.
Context
Enterprise AI often fails the same way older control designs do: policy is distributed across too many teams, while the data moves through too many systems. Once an AI workflow pulls real records, the question becomes who can see, transform, forward, or log that data at each step, not just whether the model itself is safe.
That is especially relevant where AI systems behave like software identities with delegated access, because the control problem shifts from static role assignment to runtime data boundaries. In that setting, a AI agent authorisation guide is useful because it treats the agent’s permissions as task-scoped and time-bound rather than permanently trusted.
Key questions
Q: How should security teams govern sensitive data used by AI systems?
A: Security teams should treat AI as a data consumer that needs policy boundaries, not just authentication. Classify sensitive data, define which datasets may enter AI workflows, and monitor outputs, logs, and downstream reuse. If governance stops at login, the organisation can approve access while still losing control of the data itself.
Q: Why do AI gateways need to control MCP tools as well as model routing?
A: Because model access alone no longer covers the full action path. Once an agent can call tools, the gateway has to govern delegation, invocation, and evidence of what was accessed or changed. If tool control sits outside the gateway, teams lose the ability to enforce a consistent boundary across models, prompts, and actions.
Q: What do security teams get wrong about RAG risk?
A: They often focus on the model and ignore the retrieval layer. RAG attacks succeed when malicious or over-sensitive content is allowed into context, so the real control point is document selection, ranking, and sensitivity filtering before generation starts. Static access rules alone do not capture that interaction risk.
Q: When should organisations centralise AI data policy instead of pushing it into every app?
A: When multiple agents, APIs or tools consume the same sensitive source data, central policy is usually the only sustainable model. The key is to centralise the decision while keeping boundary-specific enforcement logic, so the policy is consistent but still aware of what each component actually sees.
Technical breakdown
Why a single AI workflow creates six separate data controls
The core architectural point is that an enterprise AI workflow is not one security boundary. It is a sequence of different boundaries: the agent’s own context and memory, internal APIs, model prompts sent externally, tool calls through MCP, agent-to-agent handoffs, and retrieval from a RAG system. Each boundary has a different direction of travel, a different trust model, and a different leakage risk. That is why a single policy engine can be consistent while still applying different decisions at each point: allow, mask, transform, block or unmask. The security mistake is assuming one enforcement point can govern all six equally well. See the MCP Security Guide.
Practical implication: Map every sensitive-data transition in the workflow and decide which boundary owns the enforcement decision.
Why gateway-based enforcement changes the governance model
Gateway enforcement moves policy from scattered implementation into a central decision point, but it does not eliminate the need for architecture-specific controls. An API gateway, AI gateway, MCP gateway and agent gateway all sit at different layers of the workflow and see different data shapes. That matters because an LLM prompt, a tool response, and an inter-agent handoff are not equivalent artefacts. Central policy can standardise decisions, but only if the organisation understands what each gateway actually observes and what it cannot infer. Otherwise teams confuse routing control with data governance and overestimate the coverage they have.
Practical implication: Classify each gateway by the data it can actually inspect before deciding which policies belong there.
Why RAG needs both ingestion and retrieval controls
RAG is often treated as a search problem, but it is also a persistence problem. Once sensitive material enters the retrieval store, it can be surfaced repeatedly to different prompts and different users unless ingestion and retrieval are governed separately. In practice, that means the system must control what is allowed into the store and what is allowed out at query time. A retrieval layer without ingestion policy accumulates sensitive content indefinitely; ingestion policy without retrieval policy still exposes overbroad results to the wrong request. The article’s governance point is that memory controls have to exist at both ends of the pipeline.
Practical implication: Apply one policy at ingestion and a second policy at retrieval so the store does not become a standing exposure surface.
Threat narrative
Attacker objective: The attacker objective in this pattern is exposure or propagation of sensitive enterprise data across AI workflow components that were never meant to see the full record.
- Entry occurs when an AI workflow pulls a real case file or other sensitive record into context, memory, or an external model call.
- Credential or access misuse follows when the workflow passes full records through APIs, gateways, or tools without narrowing the data to the task.
- Impact occurs when sensitive data reaches a model provider, logging system, customer summary, or another agent that should not have received it.
Breaches seen in the wild
- CoPhish OAuth phishing via Copilot Studio: Datadog showed Copilot Studio agents on a Microsoft domain can front OAuth consent phishing and forward stolen tokens; no victims reported.
- Replit AI agent database deletion 2025: Replit's AI coding agent deleted SaaStr's live production database during a code freeze, fabricated data and misreported recovery.
Read and download The State of NHI & AI Agent Breach Report 2026, covering 200+ breaches impacting Non-Human Identities including AI Agents.
NHI Mgmt Group analysis
Policy has to follow the data, not the org chart. The article describes a control problem that crosses agent runtime, API mediation, model invocation, tool access, inter-agent messaging and retrieval. That is why security ownership breaks down when each team governs only its own layer. The practical conclusion is that AI governance must be built around data movement paths, not platform silos.
AI workflows create a new class of identity-adjacent control points. When an agent can call tools, forward records, and hand off work, the important question is not just who authenticated, but what authority was delegated at each step. Agentic AI identity guide is relevant here because the real risk is overbroad delegation across runtime boundaries. The practitioner takeaway is to govern the action path, not just the login event.
Centralised policy is only useful when the boundary is explicit. An AI gateway or MCP gateway can reduce duplication, but it can also obscure where enforcement actually happens if teams treat every gateway as equivalent. The architecture works only when each boundary has a clear inspection scope and a clear failure mode. The field implication is that policy consolidation without boundary clarity creates a false sense of coverage.
RAG turns sensitive data into a persistent governance problem. Once content is indexed, the control question shifts from temporary exposure to repeated reuse under different queries and users. That is a lifecycle issue, not just a retrieval issue. The broader lesson is that AI governance now includes data retention, transform, and release decisions across the full path from ingestion to answer generation.
From our research library:
- 43% of security professionals are concerned about AI systems learning and reproducing sensitive information patterns from codebases, according to the State of Secrets in AppSec.
- Enterprise AI use rose from 55% of organisations in 2023 to 88% in 2025, according to McKinsey’s Global Surveys on the State of AI.
- Read next: AI Agent Identity Security Buyer's Guide
What this signals
Boundary-centric AI governance will become the default operating model. As enterprise AI spreads across agents, gateways and retrieval layers, teams will need controls that evaluate data movement in real time rather than after the fact. The most useful mental model is no longer whether an AI system is allowed to exist, but whether each boundary is allowed to receive the specific data it sees.
AI policy sprawl is the real operational risk. If every team enforces redaction, masking and logging differently, the organisation ends up with inconsistent behaviour at exactly the points where sensitive data is most likely to move. According to the State of Secrets in AppSec, 43% of security professionals are concerned about AI systems learning and reproducing sensitive information patterns from codebases. That concern will broaden as AI workflows begin to span more than one control point.
Control placement will matter more than control count. Enterprises that add more policy checks without understanding where the sensitive value actually crosses a boundary will create friction without real reduction in exposure. The winning pattern is to place controls where the workflow changes trust, not merely where the workflow happens to be convenient to instrument.
For practitioners
- Map each sensitive-data boundary Document where data enters the agent, leaves the agent, crosses an API, reaches an LLM provider, enters a tool, moves to another agent, and lands in retrieval. Treat each transition as a separate governance point rather than assuming one control can cover the whole workflow.
- Enforce task-scoped data minimisation Limit every response, tool call and prompt to the minimum data required for the current task. Use masking or transformation when the task needs a stable reference but not the full value, and block any field that does not change the decision.
- Separate ingestion policy from retrieval policy Set one rule for what may enter the RAG store and a second rule for what may be returned to a specific query or user. This avoids turning the retrieval index into a permanent exposure surface for records that should never be broadly redisclosed.
- Test gateway coverage against real workflows Verify that the API gateway, AI gateway, MCP gateway and any agent gateway actually inspect the fields you care about, not just the traffic labels. If a gateway cannot see the sensitive value, it cannot enforce a meaningful decision on it.
- Track cross-agent handoffs as governance events Treat every transfer between agents as a policy change, not a simple message relay. The sending agent may be allowed to see more than the receiving agent, and that difference should be explicit in the control design.
Key takeaways
- Enterprise AI introduces multiple distinct exposure points, so the main governance failure is assuming one policy layer can protect every step.
- The article’s core technical insight is that APIs, gateways, model calls, handoffs and retrieval each need different controls because they move different data in different ways.
- For practitioners, the priority is to design enforcement around data boundaries and delegated access paths, not around individual applications or model prompts.
Related NHI Mgmt Group resources: AI Agent Authorisation Guide · Agentic AI Identity Guide · MCP Security Guide · Shadow AI and AI Agent Discovery Guide
Standards & Framework Alignment
This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.
NIST CSF 2.0 provides the primary governance reference for this term.
| Framework | Control / Reference | Relevance |
|---|---|---|
| NIST CSF 2.0 | PR.DS-01 — Data-at-Rest Confidentiality Protection | The article is about preventing sensitive data from moving or persisting where it should not. |
| Recommendation — Protect sensitive AI data at rest wherever it is stored, indexed or cached. | ||
Key terms
- AI Data Boundary: An AI Data Boundary is the defined limit around what data an AI system may access, process, store, or transmit. It sets technical and policy controls for inputs, outputs, prompts, logs, embeddings, and training data, helping prevent leakage, unauthorized reuse, and cross-environment exposure across agents, tools, and connected systems.
- Task-Scoped Access: Task-scoped access is permission granted for one defined purpose and removed once the task is complete or the session expires. For non-human identities, it reduces standing privilege and limits how long an attacker can exploit a stolen credential.
- Retrieval governance: Retrieval governance is the policy layer that decides which documents, snippets, and records an AI agent can see before they enter context. It turns search and knowledge access into a controlled authorization step, with allow, redact, deny, and approval outcomes based on sensitivity and need-to-know.
- Delegated AI Authority: Delegated AI authority is the permission a person gives an assistant to act inside business systems on their behalf. It turns a conversational tool into an execution layer, which means security teams must govern scope, auditability, and revocation with the same seriousness they apply to privileged access.
Deepen your knowledge
NHI Foundation Level course, the industry's only accredited NHI security programme, covers NHI governance, workload identity and secrets management in practical terms. It helps practitioners connect identity controls to the broader security programme they already run.
Published by the NHIMG editorial team on October 22, 2026.
NHI Mgmt Group, the independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org