AI Explainers Security

RAG Access Control: Why Real-Time Permission Checks Beat Copied Permission Lists

RAG access control gets harder when AI answers draw on SharePoint and Google Drive; AWS describes checking permissions live at query time instead.

Illustration of RAG access control checking each employee's permissions before an AI assistant reveals company documents
AI-generated editorial illustration.

What stops an AI assistant from quoting a confidential HR file to someone who was never allowed to open it? In enterprise setups that use retrieval augmented generation (RAG), the answer is RAG access control: a set of checks that make sure the assistant only draws on documents the asking person is permitted to see. AWS has published a detailed explanation of how Amazon Quick and Amazon Bedrock Knowledge Bases approach this by verifying permissions in real time.

What is RAG, and where does the permission problem come from?

RAG is a technique in which an AI system first looks up relevant passages in a company’s own documents, then uses those passages to write an answer. It lets an assistant respond with information from internal sources such as Microsoft SharePoint, Google Drive, and Atlassian Confluence rather than only from its general training.

Those sources already carry permission rules. A finance folder may be open to a handful of people, while a team wiki is open to everyone in a department. AWS notes that these knowledge sources contain sensitive information governed by complex permission structures, and it describes making AI-generated answers respect those permissions as one of the hardest challenges in enterprise AI.

The stakes are concrete. AWS points out that a single unauthorized document surfacing in an AI response could expose confidential strategy documents, unreleased financial data, or sensitive HR information. The scenario AWS uses is a SharePoint site owner who builds a knowledge base for an organization, with team members across departments asking an AI assistant questions. Each person must receive insights only from documents they are authorized to access.

How does the common replicate-and-filter approach work?

AWS describes a widely used pattern in three steps. A data source connector, such as a SharePoint connector, pulls access control lists (ACLs) during a periodic sync job. An ACL is simply the list of who may open a given file or folder. The copied ACLs are stored as attributes in a search index. At query time, the AI system maps the logged-in user to those stored attributes and filters the results.

On the surface this looks reasonable, and AWS acknowledges as much. It then identifies three fundamental weaknesses.

The AI system is not the source of truth

In this model the AI system takes sole responsibility for enforcement, even though it is not the authority on who may see what. AWS explains that connectors must accurately replicate complex, source-specific permission logic, and each data source has its own permission model. Inheritance hierarchies, group memberships, conditional access policies, and deny rules all have to be mapped across many connectors, which AWS calls an error-prone undertaking.

Stale permissions create gaps

Connectors generally sync on demand or on a schedule the customer sets. The ACLs held by the AI system are therefore a snapshot from the last sync. AWS says some solutions use event-based updates, but that does not work universally; it gives Confluence as an example of a source that does not emit an event when group membership changes. Between syncs, a user whose access was revoked might still receive answers drawn from documents they should no longer see.

Data sources keep changing

Platforms regularly introduce new ways to control access, such as a new permission feature in SharePoint or a change to the Google Drive sharing model. AWS says such changes can open gaps in the mapping logic and may expose content until the connector is updated.

What does real-time ACL enforcement change?

AWS says it addressed these problems by adding real-time ACL checks as an additional layer of security. In the approach AWS describes, Amazon Quick and Amazon Bedrock Knowledge Bases verify permissions directly with the authoritative source at query time. The question of whether a person may read a document goes to SharePoint, Google Drive, or whichever system owns the file, rather than to a copy stored in the AI system’s index.

That design speaks directly to the three weaknesses. The owning system applies its own permission logic, so the AI platform does not need to reimplement inheritance, group, and deny rules for every connector. The answer reflects permissions as they stand at the moment of the question, so a revoked right is not hidden behind a sync schedule. And when a source adds a new permission feature, the check still happens inside that source.

The excerpt AWS published describes this as an extra layer, which signals that it works alongside the usual retrieval pipeline instead of replacing it. The excerpt available here cuts off before describing the full mechanics, such as how checks are batched or how latency is handled, so those details are best confirmed in AWS documentation.

A walk-through: one question, two employees

Picture a shared knowledge base built from a SharePoint site that holds both a general policies library and a restricted folder of unreleased financial plans. Two employees ask the assistant the same question about next quarter’s budget.

The first employee has access to the restricted folder. When the question arrives, the system finds relevant passages and confirms with SharePoint that this person may read the source files. Passages from the financial plans can be used in the answer.

The second employee was removed from the finance group this morning. Under a replicate-and-filter design, the stored copy of the permissions may not yet reflect that change, because the next sync has not run. Under real-time enforcement as AWS describes it, the check goes to SharePoint at query time, where the removal is already in effect, so those passages are left out of the answer for that person.

This example is an illustration built from the mechanism AWS explains, not a documented customer case.

How does this compare with other ways of protecting RAG data?

Real-time ACL checks are one of several approaches to protecting sensitive content in RAG systems, and AWS has documented others. Its guidance on securing sensitive data in RAG applications built with Amazon Bedrock presents two security patterns: a zero-trust design with pre-ingestion data redaction, and a role-based access control system for precise data access management.

The redaction pattern works earlier in the pipeline. AWS’s guidance describes documents uploaded to an Amazon S3 bucket, then processed by Amazon Comprehend to redact personally identifiable information (PII), followed by a secondary scan with Amazon Macie. Documents that Macie scores at severity 3 or higher go to a quarantine folder, and the rest move to a redacted folder that Amazon Bedrock Knowledge Bases indexes. Here sensitive details are removed before the AI ever sees them.

The role-based pattern in the same guidance relies on metadata filtering and user claims. Users submit prompts through Amazon API Gateway, Amazon Cognito authenticates the credentials, and Amazon Bedrock Guardrails validate the prompt before retrieval. This approach decides access from a person’s role instead of consulting the original document system for each file.

These patterns answer different questions. Redaction asks what should never enter the index. Role-based filtering asks what a category of user may retrieve. Real-time ACL enforcement asks what the original system says about this specific person and this specific file right now. The material AWS published does not frame them as competing options, and nothing in it says they cannot be combined.

Checking a RAG access design: questions worth asking a vendor

The weaknesses AWS lists translate into questions a reader can put to any enterprise RAG product, including those from other vendors.

  • Where is the permission decision made: by the original system, or against a copy held by the AI platform?
  • How old can a permission snapshot be, and what happens to a user whose access was revoked in the meantime?
  • Does the product depend on change events from each source, and which sources do not send them?
  • How quickly does a new permission feature in a connected source become enforced?
  • Which of the connected sources, such as SharePoint, Google Drive, or Confluence, are covered by live checks, and which fall back to synced data?

Limitations in practice

The excerpt from AWS describes the design and its rationale but does not list supported data sources for live checks, expected response-time impact, or pricing, so those need confirming in current AWS documentation. Live checks also depend on the owning system being reachable and correctly configured, which means misconfigured permissions in SharePoint or Google Drive would still carry through to AI answers. Real-time enforcement narrows one class of risk, stale or mismapped copies of permissions, without replacing redaction, guardrails, or audit practices for other kinds of exposure.

What remains to be settled

The open question is breadth: AWS frames the problem across SharePoint, Google Drive, and Confluence, but the published excerpt does not spell out how consistently live verification applies to each connector, and that coverage determines how much of an organization’s content the guarantee reaches.

Sources