Authorization
authorization
Practice Problems
Leakage-Safe Context Selection
Select the documents a user may see from trusted identity alone, rank them by query terms in the title and body, and return at most maxItems minimized context items without ever exposing an internal note.
RAG Chunk Eligibility
Return the first reason a retrieved chunk is excluded for a user (tenant, deletion, publication state, revision, or department), or null when the chunk is eligible.
Validated Tool Adapter
Validate a model-proposed get_ticket call (tool name, exact arguments, ID format), take the tenant and read permission from trusted context, and return a copy of only that tenant's ticket or a controlled error code.
AI Engineering
Retrieve evidence for a follow-up question
Turn a follow-up message into a standalone retrieval query, keep access filters tied to the signed-in session on every turn, and decide which turns should not retrieve at all.
Diagnose a missing document
Trace a missing policy exception through ingestion, eligibility, and context packing without weakening access rules.
Design multi-tenant RAG with deletion
Design a private multi-tenant policy assistant whose answers and citations stay correct through asynchronous updates, retries, permission changes, and deletion.
Trace a tool call from request to answer
Follow one ticket lookup from tool declaration to answer: what the model proposes, what the application validates and executes, and what the assistant says when the result is unavailable.
Implement a validated, tenant-scoped tool adapter
Implement a get_ticket adapter that validates model-proposed arguments, takes tenant scope from trusted context, and passes a fixture table, then explain how a bounded orchestrator handles timeouts, invalid calls, and parallel lookups.
Contain an indirect prompt injection
Explain why a retrieved document cannot grant itself authority, and name the controls in trusted code that still hold when the model follows an injected instruction.
Prove a context selector cannot leak data
Implement a context selector that enforces tenant, group, and deletion rules before ranking, then design tests proving that forbidden records and internal notes never reach the model-bound payload.
Specify a review and escalation workflow
Specify how disputed AI feedback is re-reviewed, corrected, and escalated, with server-side authorization, artifact-bound approval, deadlines, and concurrency rules, then prove the rules with acceptance fixtures.
Community
RBAC vs ABAC vs ReBAC, Explained
RBAC, ABAC, and ReBAC are different shapes for different rules, not stages of maturity. Pick by the shape of your access policy, and most real systems end up a thoughtful hybrid.
OAuth2 and OpenID Connect: The Flows That Actually Matter
OAuth 2.0 is delegation. OpenID Connect is identity. Most bugs come from confusing the two. The four flows that matter, the eight checks I review, and what to never roll yourself.
