Least-Privilege Data Access (for AI)
ConceptLeast-privilege data access gives an AI tool the smallest data scope that answers the question — curated views at fixed grains instead of raw tables, tokenised identifiers instead of raw PII, windowed history, and byte caps — enforced in database roles, never in prompt text.
Do not hand the AI the keys to the whole warehouse and ask it nicely to behave. Give its login access to nine clean views and nothing else: fewer tables to leak, fewer wrong joins to make, cheaper queries as a side effect. Privacy and accuracy turn out to be the same project.
Narrowing an AI role from 47 raw tables to 9 curated views with tokenised identity: golden-dataset exact score 54% to 79%, zero raw identifiers in model context, median query cost down 63% — with no model upgrade at all.
Prompts are not access control — "only query the orders view" is a suggestion the model drops under long contexts or clever rephrasing. If the credential can reach a table, assume it will be reached. Enforce in roles, review the exposure list quarterly, and keep raw PII in a human-only tier.
Last reviewed September 6, 2026.