Enterprise Client Onboarding Agents (Drive / SharePoint + OAuth): How to enforce per-user ACL document filtering inside RAG vector search?
Like many fintech teams building client onboarding agents connected to Google Drive, SharePoint, and internal CRM folders, we index all corporate documents into a central pgvector database for fast RAG retrieval.
The Permission Leak Risk
If a junior operations analyst asks our onboarding agent:
"Summarize recent client fee exceptions and executive compensation notes."
Because the vector index contains chunks from both public SOPs and restricted Partner folders, standard similarity search retrieves chunks the analyst does not have Google Drive permission to view!
Checking ACLs after fetching top-10 vector results returns 0–2 usable chunks for restricted users, while calling Google Drive's permissions.list API live on 50 candidate docs adds 2+ seconds of latency.
How do enterprise RAG architectures index and pre-filter hierarchical Drive/SharePoint ACLs cleanly inside Postgres/Qdrant?