AI Data Security: 7 Controls for Protecting Enterprise AI Systems

Enterprise AI governance often starts with a policy document: which tools employees may use, which files they may upload, and which vendors are approved. But policy is only one part of AI data security. It does not explain what happens to a document after it leaves an employee's device, moves through an ingestion pipeline, enters a vector store, or reaches a model's context window.

That gap is where much of the technical exposure sits. Closing it requires more than a rule such as "restrict access." Security teams need to know which mechanism enforces that restriction at every stage of the data flow and where that mechanism is absent.

This article examines seven exposure points across an enterprise AI stack, the technical controls relevant to each, and the security frameworks that provide a reference point for reviewing them.

Executive Summary: Seven Exposure Points and Their Controls

  • A model's context window has no authorization logic. Confidential and non-confidential information must be separated before data reaches the model through identity, access, and classification controls rather than prompt instructions.
  • Retrieval pipelines require their own access controls. A vector database can return similarity matches without knowing whether the requesting user is authorized to access the underlying content unless query-time filtering is implemented.
  • Every connector and AI tool expands the trust boundary. OAuth scopes, sandbox isolation, and treating tool responses as untrusted input help limit what a manipulated agent can access or change.
  • Embeddings remain sensitive data. Dense vectors can, under certain conditions, reveal information about their source text. Confidential embeddings therefore require protection comparable to the source material.
  • The account tier determines the data-handling terms. Retention, encryption key ownership, training use, and administrative controls can vary significantly between consumer, enterprise, and API products.
  • Ingestion is a security checkpoint. Data classification should occur before parsing, chunking, indexing, and embedding so downstream systems can apply deterministic controls.
  • Effective AI security requires separate control layers and audit trails. Input filtering, retrieval controls, model instructions, output checks, and action authorization should be independently reviewable against frameworks such as OWASP's LLM Top 10 and NIST's AI Risk Management Framework.

1. A Model's Context Window Has No Authorization Logic

A large language model processes tokens within its context window. It does not inherently know who owns a document, which employee is permitted to access it, or whether two pieces of information belong to different customers. If confidential documents from separate clients enter the same context, the model itself does not create the separation. That responsibility belongs to the systems around it: identity verification, tenant isolation, access controls, and data classification applied before information reaches the model. Tokenization introduces another security consideration. The difference between what a document appears to contain and what the model actually receives can be exploited by malicious content. Zero-width Unicode characters, visually similar characters from different scripts, and right-to-left override characters can bypass simple visual inspection or text filters while still being processed as meaningful input. For that reason, security checks should not depend solely on rendered document content. Where appropriate, inspection should consider the raw input and the representation ultimately supplied to the model. This is also why telling a model not to disclose confidential information is not an access-control mechanism. OWASP's 2025 Prompt Injection and Sensitive Information Disclosure categories address risks that arise when model instructions are manipulated or sensitive information reaches a model without adequate protection.

In practice: An internal assistant connected to a shared knowledge base can return the same underlying information to users with different roles if retrieval is not filtered according to their permissions. Changing the prompt does not correct an authorization failure that occurred upstream.

2. Retrieval Pipelines Need Their Own Access Controls

In a retrieval-augmented generation system, the retrieval layer can become a significant security boundary. Documents are converted into embeddings, stored in an index, and retrieved through similarity searches when a user submits a query. A vector index does not automatically understand who is authorized to see a particular document. Unless access information is deliberately incorporated into the retrieval design, a similarity search can return restricted material to an unauthorized user. The relevant control is metadata-based filtering at query time. Each chunk should carry metadata such as tenant identity, classification, ownership, or another reference that can be checked against the requesting user's permissions. Those permissions should be evaluated before results enter the model's context. Filtering only after retrieval creates a potential exposure window. If restricted content has already entered the model's reasoning process, removing it from the final result does not necessarily undo the disclosure. OWASP identifies this area in 2025 Vector and Embedding Weaknesses, reflecting the security issues associated with retrieval and embedding-based architectures.

In practice: A knowledge-base ingestion job indexes an entire shared drive, including restricted HR material. If the retrieval layer treats every indexed document equally, a query with no connection to HR can still surface compensation or employee information to someone who should not have access to it.

3. Every Tool and Connector Expands the Trust Boundary

A system that only generates text has a different risk profile from an agent that can read email, modify files, query databases, or call external APIs. Each additional capability creates another path through which an incorrect or manipulated decision can produce an external effect. Three controls are particularly relevant.

  • OAuth Scope Granularity

Connectors should receive only the permissions required for their intended function. An application that needs message metadata, for example, should not automatically receive broad mailbox permissions simply because those permissions are available. A connector inventory should document the scopes granted to each integration and compare them with the actual task requirements.

  • Trust Boundaries for Connected AI Systems

Agents using the Model Context Protocol or similar tool-calling standards treat connected systems as sources of information and capabilities. A compromised or malicious tool can return output containing instructions designed to influence the agent's next action. Tool responses should therefore be treated as untrusted input rather than as an extension of the system's trusted instructions. The agent should distinguish between information returned by a tool and authorization to act on that information.

  • Sandbox Isolation

Agents that execute code or access files should operate within isolated environments with narrowly defined filesystem and network permissions. Ephemeral, task-specific containers can limit what one session can access and reduce the possibility that files or credentials persist into another session. Long-lived shared environments create a different risk: data from one task may remain accessible to a later process. OWASP's:2025 Unbounded Consumption addresses a related issue. Without rate limits, execution limits, or token budgets, an agent can consume excessive compute or repeatedly invoke tools, creating availability and cost risks.

In practice: A document-review agent receives broad file-write and delete permissions during an initial pilot. Those permissions remain after the workflow changes, even though the agent never needs them. The unused permissions create additional exposure without contributing to the task.

4. Embeddings Are Data Assets, Not Anonymized Derivatives

Converting a document into a vector does not necessarily make its information anonymous. Research into embedding inversion has demonstrated that, under certain conditions, information represented in dense vectors can be reconstructed or approximated toward the original text. The feasibility depends on factors such as the embedding model, available information, and attack method. The security implication is straightforward: an embedding index containing confidential contracts, source code, or other sensitive material should not automatically receive weaker protection than the source repository. Access controls, encryption, retention policies, and environment separation should account for the information represented by the embeddings.

In practice: A legal document repository is converted into embeddings and copied into a development environment for testing. The team assumes the vectors are simply numerical representations and gives the development environment broader access than production. That assumption creates a security gap if information from the original documents can be recovered or inferred.

5. The Account Tier Changes the Data Contract

An AI application's interface does not tell you how the underlying service handles your data. Consumer accounts, enterprise subscriptions, and API deployments can have different terms covering retention, model training, administrative access, auditing, and encryption key management. Encryption key ownership adds another layer. Data may be encrypted both in transit and at rest while the service provider retains control of the encryption keys. A customer-managed key arrangement changes that relationship. Under a CMK model, the customer controls the key and can revoke access independently of the provider's stated retention period. Once access to the key is revoked, encrypted data becomes unreadable to systems that depend on that key. For regulated information, this distinction can matter because technical control over access and deletion is different from relying solely on a provider's contractual retention commitment.

In practice: An employee under deadline pressure uses a personal AI account rather than waiting for an approved enterprise service. A confidential contract is then processed under a different data-handling arrangement from the one established by the organization.

6. Ingestion Is a Security Checkpoint

A document usually passes through several systems before a model can reason over it. A scanned contract may undergo OCR. A PDF may be parsed and split into chunks. Those chunks may be converted into embeddings and stored alongside metadata. Intermediate copies can exist at several points in the pipeline. Every stage therefore raises the same questions: Where is the data stored? Who can access it? How long does the intermediate copy remain? Is it encrypted? Is its classification preserved? Classification should occur before ingestion whenever possible. A document identified as confidential before processing can be routed deterministically. It might be excluded from a shared index, stored using restricted encryption keys, or sent through a retrieval path with stricter authorization checks. By contrast, asking the model to determine whether information is sensitive after ingestion makes the control dependent on model judgment. That is not equivalent to deterministic access control.

In practice: A pipeline designed to index everything in a shared drive processes restricted documents alongside public material. The pipeline has not malfunctioned. It has simply applied the wrong security assumptions to the ingestion stage.

7. Memory Is Another Data Store

"AI memory" can sound like an intrinsic capability of the model. In many implementations, it is a separate storage mechanism that records information from previous interactions and makes that information available to later sessions. That makes memory another data-governance surface. Security teams need to know what information can be stored, where it is stored, how long it remains, who can retrieve it, and whether it is scoped to an individual or shared across a team. Information can move through several stages during its lifecycle: from a source document into a conversation, from the conversation into application storage, and from that storage into a persistent memory or retrieval system. The security review therefore cannot stop when the model produces its response.

Five Layers of AI Security Controls

The seven exposure points above can be translated into five distinct control layers:

LayerFunctionExample mechanism
InputScreen prompts and documents before they reach the modelDLP checks for secrets and PII, plus detection of suspicious input patterns
RetrievalRestrict the information available to the modelQuery-time metadata filtering and row-level access controls
ModelEstablish instruction hierarchySystem instructions that distinguish trusted instructions from document and tool content
OutputDetect information the model may have exposedSecondary classification or guardrail checks before release
ActionAuthorize state-changing operationsDeterministic permission checks for sending, deleting, or executing, with human approval for high-impact actions

These layers should be independently auditable because a failure in one does not necessarily mean the others failed.

Audit logs also need enough detail to reconstruct what happened. Useful fields include the timestamp, initiating identity, source data reference, tool or connector invoked, permission scope used, action performed, and whether human approval was required and provided.

A log that merely records that "an agent ran" provides limited value during incident investigation. Security teams need to determine what the agent accessed, which permissions it used, and what it changed.

Mapping the Controls to Security Frameworks

OWASP's Top 10 for LLM Applications provides a technical view of risks such as prompt injection, sensitive information disclosure, supply chain vulnerabilities, data and model poisoning, improper output handling, excessive agency, system prompt leakage, vector and embedding weaknesses, misinformation, and unbounded consumption.

NIST's AI Risk Management Framework provides a broader organizational structure through four functions:

  • Govern: Establish accountability, policies, contracts, and oversight.
  • Map: Identify use cases, data flows, context, and potential risks.
  • Measure: Test controls, monitor systems, and maintain evidence.
  • Manage: Address identified risks and continuously review changes to models, vendors, and integrations.

Using both perspectives gives security teams a way to connect architectural controls with organizational governance.


What the Evidence Shows

These exposure points cannot be treated independently.

An agent with tightly controlled permissions can still expose confidential information if retrieval returns unauthorized documents. Properly classified documents remain at risk if their embeddings are copied into a lower-security environment. An enterprise AI contract does not protect information that employees process through personal accounts. And a multi-layer control stack is difficult to validate after an incident without structured audit records. The underlying design principle is to assume that a model can make an incorrect decision or process manipulated input, then limit what that failure can reach. That means enforcing security outside the model wherever authorization, access, or state-changing actions are involved. Prompts can establish intended instructions, but deterministic controls should decide what data an agent can access and what actions it can take.


AI Data Exposure: Frequently Asked Questions

1. Can a language model keep confidential data separate on its own?

No. A model processes the information placed in its context window without inherent knowledge of ownership, classification, or user permissions. Separation needs to be enforced through identity, access, classification, and retrieval controls before the information reaches the model.

2. Is a vector database as secure as the model that queries it?

Not automatically. A vector store performs similarity searches and does not inherently determine whether the requesting user is authorized to access the underlying content. Query-time access filtering is required, and embeddings containing sensitive information should receive appropriate protection.

3. Does connecting more tools always increase AI risk?

Additional tools generally create additional attack and failure paths, but the level of exposure depends on the permissions and capabilities granted to each tool. Read-only access presents different consequences from permissions that allow an agent to send, modify, delete, or execute.

4. Does an enterprise AI subscription solve data-retention risks?

It establishes a defined data-handling arrangement for traffic that actually uses the enterprise service. It does not prevent employees from moving confidential information to personal accounts or unapproved tools.

5. Which controls matter most for agent-based AI systems?

Access and action controls should be enforced at the system and protocol layers. Retrieval permissions, OAuth scopes, connector permissions, sandbox boundaries, and deterministic checks for state-changing actions provide controls that do not depend solely on the model following instructions correctly.

6. Which security frameworks should an AI audit reference?

OWASP's Top 10 for LLM Applications provides a technical risk taxonomy for LLM applications. NIST's AI Risk Management Framework provides a broader structure for governing, mapping, measuring, and managing AI-related risks.

7. Should AI memory be audited differently from a normal database?

It should be treated as a data store with appropriate retention, access, review, and deletion controls. If a memory system retains enterprise information between interactions, it becomes part of that information's lifecycle and should be governed accordingly.


Building or auditing an agentic AI deployment requires architectural answers, not only policy statements. Security teams need to identify which layer enforces each control, what the audit trail records, and how those controls correspond to established frameworks.

Tarento's Generative & Agentic AI practice works with clients across this architecture, alongside engineering and managed services needed to maintain controls as models, vendors, and connected tools change.

< previous
SAP CPI Logging Limits: Debug, Trace, Payload Visibility, and Retention
Next >
5 Semantic Layer Best Practices That Stop Cross-System AI Errors
Next >
logo
Thor Bot Avatar