Phase 7 · AI Access Controls + LLM Authorization · Lesson 2 of 4
Article
·
18 min
·
+10 pts
The last lesson said a user's permissions should flow through the AI — the AI acting for a person must not exceed what that person could do themselves. This lesson is about the mechanism that makes that true: OAuth, applied to AI. You know OAuth2/OIDC from the identity and API modules; the AI twist is that there is now a non-human component in the middle that needs an identity of its own, and the whole game is making sure it borrows the user's authority narrowly rather than holding its own broad authority permanently.
The rule of thumb: prefer delegated identity for anything user-facing. Reserve service identity for genuine background jobs, and scope those to the single job. An AI that always acts on behalf of the current user can't be tricked into cross-user access, because it never held cross-user authority to begin with.
orders:read:own, not orders:*. Scope is where least privilege becomes concrete and auditable.Recall the confused deputy from the prompt-injection module: an attacker without authority tricks a system that has authority into misusing it. Standing, broadly-scoped tokens are what make an AI a dangerous deputy. If the AI holds a powerful token all the time, a successful injection borrows that full power. If the AI instead carries only the current user's narrowly-scoped, short-lived token, an injection can only reach what that user could already reach — the deputy has little authority to confuse. Access control and injection defense are the same fight from two sides.
SERVICE TOKEN (AI as itself) DELEGATED / OBO (AI as the user)
------------------------------ --------------------------------
Represents the AI application the specific calling user
Downstream sees "assistant" — broad rights the user's own permissions
Cross-user data reachable (one token, all data) blocked at the data layer
If injected / leaked attacker gets the AI's full scope attacker gets only this user's scope
Right use genuine background jobs, pinned anything user-facing
Scope discipline one narrow job only narrowest scopes, short-livedStanding service token vs delegated on-behalf-of token — same AI, very different blast radius
Agentic AI reaches systems through tools (increasingly via MCP, the Model Context Protocol). Each tool is a door, and each door needs its own lock:
orders:read:own token tied to the current user — not a shared admin credential the whole agent holds.The one-line policy
Prefer delegated, per-user, short-lived, narrowly-scoped tokens; reserve standing service tokens for pinned background jobs. An AI that borrows exactly the current user's authority — and no more, no longer than needed — is the single biggest structural defense you can give it.
This is all evidence a GRC engineer can collect: the token model (delegated vs service) for each AI integration, the scope list per tool, token lifetimes, and the OBO configuration showing user identity propagates downstream. "The AI uses appropriate authentication and least-privilege access" stops being a checkbox and becomes a specific, reviewable design. Next you will put it to work: design the access matrix for six personas, deciding exactly which models, data, and actions each one gets.