Sovereign AI and data protection
AI Data Security and Privacy On-Premises: A European Architecture Guide
How to protect personal and confidential data in on-premises AI: GDPR security duties, permission-aware retrieval, prompt and log controls, and breach handling.
In short
On-premises AI keeps prompts, retrieved documents, embeddings and logs on infrastructure you control, which removes provider access and third-country transfers from the inference path. It does not secure the system by itself. The GDPR still requires security appropriate to the risk, data protection by default and breach handling, so retrieval permissions, prompt controls, logging and retention decide the outcome.
Key takeaways
- The GDPR requires security appropriate to the risk, including pseudonymisation and encryption where appropriate, and data protection by default (Articles 25 and 32). Deployment location changes the risks, not the duty.
- Retrieval is the main exposure point: OWASP lists misaligned access controls, leakage between users of a shared vector database and embedding inversion among the weaknesses of vectors and embeddings.
- Instructions in a system prompt are not an access control. OWASP notes that such restrictions may not be followed and can be bypassed through prompt injection.
- Prompts, outputs, conversation history and logs are personal data stores in most deployments, and each needs access rules and a retention period.
- Breach rules apply on premises too: notify the supervisory authority within 72 hours where feasible, unless the breach is unlikely to result in a risk to people (Article 33).
What does data security mean for an on-premises AI system?
It means protecting every place where the AI system copies, transforms or records data, not only the documents it starts from. A language model application creates more data stores than a typical business application, and each one is a path to disclosure.
The stores to secure:
- prompts and uploaded files;
- source documents connected for retrieval, and the embeddings and vector index built from them;
- outputs and conversation history;
- application, audit and security logs, and any telemetry;
- fine-tuning and evaluation datasets;
- model weights, system prompts and configuration.
A report commissioned by the EDPB under its Support Pool of Experts programme (April 2025; it states the author’s views, not an official EDPB position) maps privacy risks along the data flow of LLM systems, from user input and retrieval to logging and output. It notes that organisations developing and running LLMs on their own infrastructure keep full control over data and model interaction, at the cost of significant computing resources and expertise.
What does the GDPR require for AI data security?
Security appropriate to the risk, designed in from the start. The GDPR does not mention AI, but its rules apply to every store above that contains personal data:
- Integrity and confidentiality (Article 5(1)(f)): protection against unauthorised or unlawful processing and against accidental loss, destruction or damage.
- Data protection by design and by default (Article 25): measures such as pseudonymisation, and defaults that process only the data each purpose needs and do not make personal data accessible to an indefinite number of people without the individual’s intervention.
- Security of processing (Article 32): measures appropriate to the risk, including pseudonymisation and encryption where appropriate, ongoing confidentiality, integrity, availability and resilience, the ability to restore access after an incident, and regular testing of the measures.
- Breach handling (Articles 33 and 34): notify the supervisory authority without undue delay and, where feasible, within 72 hours, unless the breach is unlikely to result in a risk; tell the people affected when the risk is high.
Pseudonymised data remains personal data if it can be attributed to a person using additional information (recital 26), so masking reduces risk without taking prompts or logs out of scope. Our guide to GDPR-compliant LLM deployment covers lawful basis, DPIAs and data subject rights.
Does on-premises deployment make AI private by default?
No. It changes who can reach the data, not how your own system handles it. On premises, no external provider processes prompts, no transfer outside the European Economic Area happens in the inference path, and you set the retention of every log. Those are real reductions in risk, and they are why regulated organisations choose sovereign AI deployments. Whether EU data residency alone would be enough is a separate question, covered in our guide to data sovereignty versus data residency.
Inside your own boundary, familiar failures remain: retrieval that ignores document permissions, logs that copy full prompts into a widely readable store, and model or prompt changes made without review. The controls below address them.
How do you stop retrieval from leaking data?
Enforce each user’s existing permissions at retrieval time, outside the model. OWASP’s 2025 list of LLM application risks names misaligned access controls, leakage between user groups that share a vector database, and embedding inversion attacks, which recover source text from embeddings, among the weaknesses of vectors and embeddings. Its mitigations include permission-aware vector stores, strict partitioning of datasets, validated knowledge sources and immutable logs of retrieval activity.
In practice:
- carry document access rights into the index, and filter results by the requesting user’s identity before any passage reaches the prompt;
- partition indexes by tenant, team or classification where filtering alone is not enough;
- treat the vector index as a copy of the source data, with the same classification, access rules and deletion obligations;
- update or remove index entries when source permissions change or documents are deleted.
Our enterprise RAG page shows how retrieval is designed around these rules.
How do you control what enters a prompt?
Decide which data each use case may send to the model, and enforce that before inference. OWASP notes that restrictions placed in the system prompt about what data the model may return are not always followed and can be bypassed through prompt injection. Treat the system prompt as guidance for the model, not as a security boundary.
Controls that hold:
- data classes per use case, written into the usage policy and enforced by the application;
- masking or tokenisation of identifiers where the purpose allows;
- least-privilege connectors, so an assistant or agent reaches only the systems and fields its task needs;
- output checks for identifiers or classified content before responses are shown or stored.
What should AI logs record, and for how long?
Enough to reconstruct what happened, and no more. An audit trail should show who made a request, which sources were retrieved, which model version answered, which policy applied and what the system returned or did. That serves incident investigation and internal audit, and gives auditors the evidence they ask for.
Logs are also personal data stores. Log metadata by default, keep full prompt and output text only where a defined purpose requires it, restrict who can read it, and set a retention period for each log type. If a system is a high-risk AI system under the EU AI Act, deployers must keep the logs it generates under their control for at least six months, unless other Union or national law, in particular data protection law, provides otherwise (Article 26(6)).
How do weak and strong AI security postures compare?
| Area | Weak posture | Strong on-premises posture |
|---|---|---|
| Data path | Documents move through loosely defined connectors | Every flow is mapped, reviewed and tied to a named service |
| Retrieval | Users inherit broad access to the index | Results filtered by identity, role and classification |
| Prompts | Data rules live only in the system prompt | Data classes and masking enforced before inference |
| Logging | Full prompts copied into widely readable logs | Metadata by default, restricted content logs, fixed retention |
| Lifecycle | Models and prompts change without review | Versioned releases with evaluation, approval and rollback |
| Incidents | No AI-specific playbook | Breach assessment and the 72-hour notification path rehearsed |
How do you roll out these controls?
Start with the data, then build the assistant around it.
- Classify the data your first use cases will touch, and decide which classes each use case may receive.
- List every store from the first section, with an owner, access rules and a retention period.
- Build permission-aware retrieval before connecting sensitive repositories.
- Define the log schema and who may read each log.
- Treat model, prompt and connector changes as governed releases.
- Rehearse a breach scenario, such as an assistant showing one user another user’s data, against the 72-hour notification path.
The AI governance checklist helps track owners and approvals, our AI security page covers prompt injection, red teaming and incident response, and our AI governance work turns these controls into routine evidence. This guide explains the law in general terms and is not legal advice; confirm data protection decisions with your data protection officer.
Frequently asked questions
Is on-premises AI more secure than cloud AI?
It can be, for specific risks. On premises, prompts, documents and logs stay on infrastructure you control, no provider processes them and no transfer outside the European Economic Area happens in the inference path. You also take over patching, access control, monitoring and incident response. Security depends on how retrieval, identities, logs and the model lifecycle are designed and operated, wherever the model runs.
Does on-premises AI make us GDPR-compliant?
No. It removes some risks, such as processor access and third-country transfers, but the controller remains responsible for lawful basis, purpose limitation, minimisation, retention, security and data subject rights, and must be able to demonstrate compliance (Article 5(2)). A data protection impact assessment may still be required. Treat on-premises deployment as a control that supports compliance, not as compliance itself.
Where does personal data leak in an LLM system?
Mostly through what the model is allowed to see and what the system records. Retrieval can return passages a user is not entitled to read, shared vector indexes can leak across teams, embeddings can be inverted to recover source text, and outputs or logs can expose personal data. Restrictions written into a system prompt can be bypassed through prompt injection, so enforce access outside the model.
How long should prompts and AI logs be kept?
Only as long as a defined purpose requires, because the GDPR's storage limitation principle applies to prompt and log stores. Set a period for each store and delete on schedule. If the system is a high-risk AI system under the EU AI Act, deployers must keep the logs it generates under their control for at least six months, unless other Union or national law provides otherwise.
Is a leak from an internal AI assistant a reportable data breach?
It can be. If an assistant discloses personal data to someone not authorised to see it, that is likely to be a personal data breach. The controller must notify the supervisory authority without undue delay and, where feasible, within 72 hours, unless the breach is unlikely to result in a risk to people. Where the risk is high, the people affected must also be told (Articles 33 and 34).
Sources
- EUR-Lex: Regulation (EU) 2016/679, General Data Protection Regulation (Articles 5, 25, 32, 33 and 34; recital 26) · checked 27 October 2026
- EDPB Support Pool of Experts: AI Privacy Risks and Mitigations, Large Language Models (April 2025; the author's views, not an EDPB position) · checked 27 October 2026
- OWASP GenAI Security Project: LLM02:2025 Sensitive Information Disclosure · checked 27 October 2026
- OWASP GenAI Security Project: LLM08:2025 Vector and Embedding Weaknesses · checked 27 October 2026
- AI Act Service Desk: Article 26, obligations of deployers of high-risk AI systems (paragraph 6) · checked 27 October 2026