RAG access control means your AI assistant only answers from documents the person asking is allowed to open, and it has to stay true after the source changes. When a file is edited, its old chunks must be replaced and re-tagged. When an employee loses access, retrieval must stop using that content on their next question. When a file is deleted, every copy has to go: chunks, embeddings, caches and logs. Filter by permission inside the search query, and sync changes at a speed set by data sensitivity.
For Saudi organisations this is a compliance issue as well as an engineering one. Internal assistants now sit on top of SharePoint, Google Drive and ERP data that fall under the Personal Data Protection Law (PDPL) and, for government bodies, the NCA Essential Cybersecurity Controls. This guide covers each change event, the copies it touches and the controls that close the gap.
Along the way, you can pick a permission sync strategy for your data, test whether a chunk should be retrieved, check your cache key, track a deletion from start to finish and run the Saudi compliance checklist, all on this page.
Where One Document Gets Copied in a RAG Pipeline
Every edit, revocation and deletion has to reach each of these copies, not just the source file.
AI Data Security Snapshot: What 2026 Research Shows
IBM’s 2026 Cost of a Data Breach Report points to the same weak spot this guide covers: AI systems connected to company data without proper access controls. These four findings matter most for a RAG assistant.
Of organisations with an AI-related incident lacked proper AI access controls
They were missing role-based access, multifactor authentication and similar controls on their AI models and applications.
Organisations apply access controls to their AI models and data
So most organisations have no access controls on their AI models and data at all.
Organisations reported an incident involving an AI model or application
Up from about one in eight a year earlier.
Average cost of a data breach in Saudi Arabia
Costs were highest where organisations mismanaged secrets and keys, and 54% of breached Saudi organisations did not encrypt sensitive data both at rest and in transit.
IBM and the Ponemon Institute studied more than 600 organisations breached between March 2025 and February 2026. Use the figures as direction, not as benchmarks for your own system.
Saudi News: What Changed in 2026
Three developments this year bear directly on how Saudi organisations connect AI assistants to company data.
PDPL Moves Into Active Enforcement
SDAIA is now actively enforcing the PDPL. Review committees examine alleged violations and issue decisions, and failure to implement appropriate technical security measures is a key violation category.
NCA Consults on Draft AI Cybersecurity Guidelines
The National Cybersecurity Authority invited public feedback on its draft AI Cybersecurity Guidelines, built around four domains: governance, defense, resilience and third-party cybersecurity.
SDAIA Consults on PDPL Amendments, Including Data Localisation
The draft amendments add a general requirement to store personal data inside the Kingdom, while still allowing transfers under the law. If adopted, they take effect 60 days after publication in the Official Gazette.
News summaries are for context, not legal advice. The PDPL amendments and NCA guidelines were still drafts when consulted; confirm current rules with a qualified Saudi adviser.
Key Terms Explained
New to RAG security? These plain-language definitions cover the terms used throughout this guide.
RAG (Retrieval-Augmented Generation)
An AI design where the assistant searches your documents first and uses what it finds to write its answer.
Chunk
A short passage cut from a document so it can be searched and fed to the AI.
Embedding
A list of numbers that represents a chunk’s meaning, used to find similar text. Text can be partly reconstructed from it.
Vector Database
The store that holds chunks, embeddings and their metadata, such as Azure AI Search or Pinecone.
Ingestion
The process that reads source documents, splits them into chunks, embeds them and writes them to the index.
ACL (Access Control List)
The list of users and groups allowed to open a document.
Permission Metadata
A copy of the ACL stored on each chunk so the search can filter by who is asking.
Query-Time Filtering
Applying the permission filter inside the search itself, so unauthorised chunks never leave the index.
Fail Closed
When in doubt, deny. A chunk with missing or stale permissions is excluded, not shown.
Tombstone
A marker that says “this document is deleted”, so retrieval excludes it before every copy is physically removed.
Semantic Cache
A store of earlier answers that is reused when a similar question is asked again.
Reconciliation Job
A scheduled check that compares source permissions and documents with the index and fixes any drift.
Why RAG Access Control Breaks After Ingestion
A RAG pipeline is a copying machine. The indexer reads a document, splits it into chunks, turns each chunk into an embedding and stores both in a vector database or search index, usually with metadata listing the users and groups allowed to see it. From then on there are two versions of the truth: the source system and the index.
Microsoft’s engineering team explains the result in its guide to carrying SharePoint permissions into RAG pipelines: permissions stored at ingestion do not update themselves, so a user whose access is revoked may still see that content until the next ingestion run. The gap is built into the design, so it has to be managed on purpose.
The OWASP Top 10 for LLM Applications 2025 lists vector and embedding weaknesses as LLM08, with unauthorised access through weak or misaligned access controls as its first example. Do not assume embeddings are harmless because people cannot read them. Research on embedding inversion shows text can be reconstructed from vectors, so the vector store needs the same protection as the documents behind it. Table 1 shows where copies of one document usually end up.
Table 1: Where Copies of a Document Live
Text Chunks
Raw passages from the document
On editReplace all chunks
On revoked accessUpdate permission metadata
On deletionDelete
Embeddings
Vectors derived from the chunks
On editRe-embed
On revoked accessUpdate permission metadata
On deletionDelete
Permission Metadata or ACL Cache
Allowed users, groups and labels
On editRe-read from source
On revoked accessUpdate first, fastest
On deletionDelete or tombstone
Semantic or Response Cache
Generated answers
On editInvalidate
On revoked accessInvalidate entries for affected users
On deletionInvalidate
Logs, Traces and Evaluation Sets
Prompts with retrieved text
On editFollow retention policy
On revoked accessRestrict who can view them
On deletionPurge or redact per policy
Backups and Snapshots
Point-in-time copies of the index
On editExpire on schedule
On revoked accessRe-apply current permissions on restore
On deletionExpire; re-apply deletions on restore
Table 1. Where copies of a document live in a typical RAG pipeline and what each change event requires.
Why Access Control Matters More for Saudi Organisations
AI is moving from pilots into daily work across the Kingdom. Official GASTAT data reported by Arab News puts AI adoption among Saudi businesses at 33.1% in 2025, up 20% on 2024. A YouGov survey for SAP published in November 2025 found that 81% of Saudi enterprises already run AI solutions built for their industry. More assistants connected to more internal data means more chances for one to answer from a file the user should not see.
Three local factors raise the stakes:
PDPL Reach
The PDPL covers personal data processed in Saudi Arabia and the data of Saudi residents processed by entities outside the Kingdom. It gives people the right to request destruction of their data once it is no longer needed.
NCA ECC-2:2024
The Essential Cybersecurity Controls apply to government agencies and include Identity and Access Management (2-2), Data and Information Protection (2-7) and Backup and Recovery Management (2-9), all of which a RAG pipeline touches.
Bilingual Content
Many Saudi firms keep Arabic and English versions of the same policy or contract. If those versions are indexed separately, they can drift apart in both content and permissions.
How to Handle Document Edits
Key Every Chunk to a Source ID and Version
Store four fields on every chunk: source document ID, source version or ETag, chunk position and last permission sync time. When a document changes, delete every chunk with that source ID and re-ingest the new version instead of upserting chunk by chunk. Upserts leave orphans: if the new version is shorter, the old trailing chunks stay searchable with outdated text and outdated permissions. Pinecone, for example, can delete every record matching a metadata filter and reports how many matched, which gives you a number to log for audit.
Source Document ID
Lets you delete every chunk of a file in one call.
Version or ETag
Shows whether the chunk matches the current file.
Chunk Position
Keeps passages in order and makes orphans easy to spot.
Last Permission Sync
Lets retrieval exclude chunks with stale permissions.
Treat Moves and Re-Shares as Permission Events
Many permission changes never touch the text. A file moved to another folder can inherit different permissions. A removed sharing link or a changed sensitivity label changes who should see it. Subscribe to permission and location events as well as content events, and run a scheduled reconciliation job that compares source permissions with the index.
Keep Arabic and English Versions in Step
Link translated versions with a shared document family ID. When one language version changes its permissions or is deleted, apply the same change to the other, unless the two are deliberately shared with different audiences. Without this link, revoking the English contract while the Arabic copy stays open leaves the same information one question away.
How to Handle Revoked Access
Enforce RAG Access Control Inside the Query
Authorisation belongs before retrieval. Microsoft’s guidance is to build the permission filter into the query so unauthorised documents never leave the index; filtering afterwards means the data has already reached your application. Each request should carry the real user’s identity and group memberships from your identity provider, such as Microsoft Entra ID, never a broad service account. Microsoft also names tenant-wide read scopes such as Sites.Read.All as an anti-pattern for indexers. Azure AI Search now offers document-level access control that can check the caller’s token on each query.
Do
✓ Filter by permission inside the search query
✓ Carry the real user’s identity and groups on every request
✓ Check the caller’s token on each query where supported
Avoid
✗ Filtering results after the vector search
✗ Running queries under a broad service account
✗ Tenant-wide read scopes such as Sites.Read.All
Pick a Sync Strategy by Data Sensitivity
Revocation speed is a design choice. Table 2 compares the common options.
Scheduled Re-Ingestion
How it worksRe-reads permissions on a timer
Best forLow-sensitivity wikis and policies
Trade-offSimple, but a known stale window
Event-Driven Sync
How it worksWebhooks or change notifications trigger a permission update
Best forMost enterprise content
Trade-offMissed events need a reconciliation job
Decoupled ACL Cache
How it worksPermissions kept in a separate store and checked at query time
Best forLarge indexes with frequent permission changes
Trade-offOne more service to run and secure
Live Source Check
How it worksQuery the source with the user’s delegated identity, or call an authorisation service per result
Best forPersonal, financial or government data
Trade-offHigher latency and API cost
Table 2. Permission sync strategies compared. Actual delays depend on your implementation and source system.
Sync Strategy Picker
Run it once for each content class, such as HR files, finance records or the company wiki.
A starting point. Agree the accepted delay for each content class with your security team and test it before launch.
Follow Microsoft’s advice to set refresh intervals by sensitivity, use change events where the source supports them and tell stakeholders the expected delay. In practice, HR, finance and customer records containing personal data usually justify event-driven sync or a live check.
Expand Groups and Fail Closed
Store group IDs alongside user IDs and resolve nested groups at query time; Microsoft warns that unexpanded groups cause silent overexposure. Then make “no” the default. Exclude any chunk with missing permission metadata, an unknown owner or a sync timestamp older than your agreed limit. Re-check passages held in chat history when a session resumes, or a revoked user can keep asking follow-up questions about content they can no longer open.
Fail-Closed Chunk Checker
Test the rule your retrieval layer should apply to every chunk.
Planning an AI assistant on SharePoint, Google Drive or ERP data? We can help you design query-time filtering and permission sync.
Get a Free Quote →How to Handle Deletion Under PDPL
Deletion is the hardest event because copies spread quietly. A dependable process has seven steps:
Deletion Runbook Tracker
0 of 7 steps done. Copies of this document may still be retrievable.
Where the document holds personal data, this process supports the PDPL right to destruction. SDAIA has issued a Personal Data Destruction, Anonymisation and Pseudonymisation Guideline alongside the Implementing Regulations, which is the reference to check when deciding whether vectors must be destroyed or can be anonymised. SDAIA also opened a consultation in October 2026 on amendments to the Implementing Regulations, including a proposal to store personal data within the Kingdom, so watch for the final text. This is context, not legal advice; confirm your obligations with a qualified Saudi data protection adviser.
Keep Caches From Bypassing Permissions
Semantic caches are a common blind spot. If the cache key is built only from the question text, two employees asking “What is my project status?” can receive the same stored answer. Scope every cache entry by tenant, user or permission set, plus model and prompt version. Cache only generic, low-risk answers, and invalidate entries whenever a source document or its permissions change.
Cache Key Checker
Your cache key always includes the question. What else is in it?
Saudi Compliance Checklist for RAG Access Control
Table 3 maps each control to the Saudi reference it supports. Use it as a pre-launch review with your security and data protection teams.
Table 3: Pre-Launch Compliance Review
0 of 7 controls in place. Review the gaps with your security and data protection teams.
Table 3. RAG access control checklist mapped to Saudi requirements. Applicability depends on your sector and entity type.
Make Access Control a Running Process
RAG access control is not a setting you switch on once. Edits, revocations and deletions keep happening, and each must reach every copy your pipeline made. Filter inside the query, key chunks to their source, link Arabic and English versions, choose a sync speed per content class and make deletion reach caches, logs and backups. That keeps your AI assistant from becoming the easiest way around your access policies.
Describe Your AI Assistant Project
Copy the brief, then paste it into the message box on our contact page.
Related Services for Your Secure AI Assistant
Plan Your AI Assistant’s Access Model
Planning an AI assistant on company data in Saudi Arabia? Talk to the Logical Creations team about your permission model, sync strategy and PDPL deletion process before you connect live data.
Talk to the Logical Creations Team →Frequently Asked Questions
What Is RAG Access Control?
RAG access control is the set of rules that decides which documents a retrieval-augmented generation system may use when answering a particular user. It normally mirrors the source system, such as SharePoint or Google Drive, and is stored as metadata on each chunk or checked live. Its purpose is to make sure the AI assistant never answers from content the person asking could not open themselves.
How Quickly Should Revoked Access Take Effect in a RAG System?
There is no single correct figure. It depends on how sensitive the content is and what your security team accepts. Scheduled sync leaves a gap of up to one interval, event-driven sync is usually much shorter and a live check against the source can bring it close to zero. Document the agreed delay for each content class and test it before launch.
Can I Filter Results After the Vector Search Instead?
It is not recommended. Post-filtering means restricted chunks have already left the index and reached your application, and if the filter fails they can end up in the prompt. It can also leave too few results once unauthorised items are removed. Passing the permission filter into the query itself keeps unauthorised content out of the pipeline from the start.
Do I Need to Delete Embeddings When a Document Is Deleted?
Yes. Embeddings are derived from the document text, and research shows text can be partly or fully reconstructed from vectors. Deleting the file but keeping its embeddings and chunks means the content can still be retrieved or exposed. Delete by source ID, invalidate related cache entries and make sure restored backups re-apply the deletion.
Does the Saudi PDPL Apply to Data in a Vector Database?
If the chunks or embeddings contain personal data, PDPL duties generally still apply, including the right to request destruction of data that is no longer needed. Storing information as vectors does not by itself take it out of scope. SDAIA guidance on destruction and anonymisation is the place to start, and a qualified Saudi data protection adviser should confirm your position.
How Does RAG Access Control Work With Semantic Caching?
A semantic cache must follow the same rules as retrieval. Scope each cache entry by tenant, user or permission set, as well as model and prompt version, so one employee’s answer is never served to someone with different access. Cache only generic, low-risk answers, and invalidate entries whenever a source document or its permissions change.