Back to blog
7 min readGateco Team

Why Azure AI Search Isn't Enough for Enterprise RAG Security

Enterprise RAG has a different threat model than a developer prototype. When the knowledge base contains HR compensation data, legal matter files, board presentations, and financial forecasts, who sees what matters as much as what gets found. The retrieval engine and the authorization engine are solving different problems — and Azure AI Search, for all its retrieval sophistication, only solves one of them.

This is not a criticism of Azure AI Search. It is an excellent managed search platform. But "search platform" and "access governance layer" are different product categories. The gaps that follow are not bugs in Azure AI Search — they are features outside its scope. Understanding them is the starting point for building a retrieval system that can pass an enterprise security review.

Gap 1 — No Dynamic ABAC

Azure AI Search's access control model operates at the index level. Azure RBAC roles — Search Index Data Reader, Search Index Data Contributor — determine whether a principal can query an index at all. Once a principal is authorized to query an index, they receive the same candidate set as every other authorized principal querying the same terms. Azure AI Search has no native mechanism to filter results based on who is asking.

This means you cannot express policies like: "show this document to principals in the finance department with a security clearance level above internal," or "restrict access to documents tagged client-confidential to principals who are assigned to that client matter." These are real access control requirements in legal firms, financial institutions, healthcare organizations, and any enterprise with role-stratified knowledge. Azure AI Search cannot enforce them natively — the logic has to live somewhere else, usually in application code, which means it must be replicated in every application that touches the index.

Attribute-Based Access Control (ABAC) requires evaluating conditions against principal attributes (group membership, department, role, custom attributes), resource attributes (classification, sensitivity, domain, labels), and the relationship between them — at query time, per result, per principal. This is a policy engine problem, not a search engine problem.

Gap 2 — No Deny-by-Default

A correct security posture starts from denial and requires explicit permission. Azure AI Search's document-level model works in the opposite direction: if a principal is authorized to query an index, all indexed documents are candidates for retrieval unless the application explicitly filters them out.

The implication is that access control correctness depends on the application correctly implementing filters on every query, and on every indexed document having correct access metadata. Both assumptions fail in practice. Applications are written by multiple teams under deadline pressure; filter logic gets skipped, simplified, or applied inconsistently. Data pipelines are imperfect; documents get indexed without classification metadata, or with stale metadata that no longer reflects the document's sensitivity after a reclassification event.

In a deny-by-default model, a document without metadata is inaccessible. In a permit-by-default model, a document without metadata is unrestricted. For enterprise data that includes anything regulated — HIPAA, GDPR, SOC 2 in-scope systems — the difference between these two behaviors is the difference between a defensible posture and a compliance failure.

Gap 3 — No Audit Trail for Retrieval Decisions

Azure AI Search logs API calls — request timestamps, query terms, result counts, latency. What it does not log is authorization decisions: which principal retrieved which document, whether access was allowed or denied, and which rule produced that outcome.

This matters in three common enterprise scenarios. First, security incident response: when a potential data exposure is reported, you need to determine whether a specific principal accessed a specific document within a specific time window. Azure API logs tell you that queries were made; they do not tell you what was returned to whom. Second, compliance audits: SOC 2, ISO 27001, and HIPAA all require evidence of access controls operating as designed. "We have RBAC on the index" is not the same as "here is a per-retrieval audit log showing who accessed what and why." Third, GDPR subject access requests: a data subject can request a log of all processing of their data, including AI-assisted retrieval systems that surfaced documents containing their personal information.

Building a retrieval audit trail on top of Azure AI Search is possible — you can intercept queries at the application layer and write your own logs — but it requires every application to implement logging consistently, and the logs are application-level constructs, not centrally enforced.

What Enterprise RAG Security Actually Requires

A retrieval system that can pass an enterprise security review needs four things: dynamic ABAC that evaluates conditions against both principal and resource attributes at query time; deny-by-default behavior where missing or invalid metadata means no access; a centralized audit trail that records every retrieval decision with full context independent of which application initiated the query; and consistent enforcement across all consuming applications so that a policy defined once applies everywhere.

None of these are retrieval problems. They are governance problems. The search engine finds relevant content; the governance layer decides who is allowed to see it. These are separate concerns that benefit from separate, purpose-built systems.

How Gateco Closes the Gaps

Gateco acts as a governance control plane above Azure AI Search. When a retrieval request arrives, Gateco routes the query to your Azure AI Search index — using vector, keyword, or native hybrid search — and receives the candidate result set. It then evaluates each result against your ABAC policies, filters the set to only documents the requesting principal is authorized to access, and returns the filtered results. The entire process is logged: principal identity (resolved from your connected IDP), query, candidates, allowed results, denied results, and the policy reasoning for each decision.

The deny-by-default behavior is enforced by Gateco, not by Azure. Documents without access metadata are denied. Documents with metadata that does not satisfy policy conditions are denied. An explicit allow is required for every result that reaches a principal. Policies are defined once in Gateco and applied consistently to every query, from every application, through every AI agent that routes retrievals through the Gateco API.

Connecting Azure AI Search to Gateco does not require re-indexing your data or changing your Azure configuration. You provide your Azure service name and API key, configure the index and vector field, and Gateco handles the rest. The governance layer is additive — Azure AI Search continues to handle retrieval exactly as before, and Gateco adds the authorization, audit, and compliance layer on top. If you're building on Azure and need enterprise-grade retrieval governance, that is the architecture worth investing in.


Ready to secure your AI retrieval?

Start with the free tier — 100 retrievals/month, no credit card required.