Skip to content

Architecture Decision Record: Permission Trimming Strategy

Status: Approved / Draft

  • Date: YYYY-MM-DD
  • Solution: ${SOLUTION_NAME}
  • Pack Story: RAG-04-S1
  • Lead Architect: ${ARCHITECT_NAME}
  • Security Lead: ${SECURITY_NAME}

Context

The RAG application queries enterprise data originating from ${DATA_SOURCES} (such as SharePoint Online, ADLS Gen2, and internal file repositories). Documents contain restricted content that must only be retrievable by users who hold valid read permissions in the originating system.

Decision

We select Option A: Application-enforced security filters with Microsoft Entra ID groups.

Key architectural choices:

  1. Permission fields: Index schemas include group_ids (Collection(Edm.String)) and user_ids (Collection(Edm.String)), configured with filterable: true and retrievable: false.
  2. Chunk projection: Ingestion pipelines project parent document ACLs onto every child chunk.
  3. Query layer: Retrieval queries are brokered exclusively through a shared data access layer that resolves transitive Entra ID group memberships and injects an OData $filter using search.in.
  4. Direct index queries: Client frontends and autonomous agents are forbidden from querying the search service directly without passing through the security filter middleware.

Accepted Revocation Delay

The business and security stakeholders agree to the following latency thresholds:

Path Maximum acceptable delay Enforcement mechanism
Routine scheduled update 4 hours (team default) Scheduled indexer crawl or incremental ingestion
Urgent employee exit / legal hold 15 minutes (team default) Automated chunk ACL patch via PB-RAG-04-03
Emergency leak incident Immediate (<5 minutes) Query-level quarantine filter or chunk deletion

Sign-offs

  • Solution Architect: ______________________ Date: ___________
  • Security Officer: ________________________ Date: ___________
  • Product Owner: ___________________________ Date: ___________