Identity, OAuth & Access Control
36 questionsDONEUNLOCKEDLOCKED
OAuth, Identity & Access Control Interview Questions
Authentication and sessions, phishing-resistant MFA, RBAC, ABAC and relationship-based authorization, OAuth 2 and OpenID Connect with their pitfalls, JWT validation, workload identity, secrets, and delegating a user's authority to an AI agent without creating a confused deputy.
Worked answers that start from a threat model, explain each control by mechanism, and include the follow-ups and scoring an interviewer uses.
You have 5 free answers unlocked here.Sign in free for 5 more · 26 are premium.
01–15Foundationsthe mechanisms and vocabulary an interviewer expects you to have0/15 done
16–28Core questionsthe questions this round asks most, answered in full0/13 done
29–36Field scenariosdesign rounds, incidents and judgment calls with the inputs left incomplete0/8 done
The concepts behind Identity, OAuth & Access Control
The lessons these answers build on. Introductory ones are free; advanced ones need Premium.
Foundational
Authentication versus AuthorizationAuthentication establishes who a caller is: a user, a service or an agent acting for someone. Authorization decides what that caller may do with a specific resource right now. They are separate checks that fail in separate ways. Most real access-control bugs are authorization failures on authenticated requests, and AI agents add a third question: on whose behalf is this action being taken?Foundational
Access-Control Models: RBAC, ABAC and ReBAC in DepthEvery authorization model answers one question: may this subject perform this action on this resource, in this context? RBAC answers with roles and is easy to review but explodes when roles start encoding objects or context. ABAC evaluates attributes and is expressive but hard to audit. ReBAC follows relationships such as owner, member and parent folder, as Google's Zanzibar does at millions of checks per second. Real systems combine them, and the hard parts are deny semantics, list filtering, stale permissions and agents acting for users.Foundational
Sessions, Cookies and TokensA session links later requests to authenticated state. Compare opaque identifiers, signed tokens, cookie protections and sender constraints, then test idle expiry, absolute expiry and revocation across caches and accepting services.Foundational
OAuth 2.0 and PKCEOAuth 2.0 is a framework for delegated authorization: a user lets an application access a resource on their behalf, with limited scopes, without sharing their password. The authorization code flow sends the user to the authorization server, returns a short-lived code, and exchanges it for tokens. PKCE binds code redemption to a per-flow verifier: someone who steals only the code cannot redeem it. This is not proof of an installed app's identity. Current best practice uses the code flow with PKCE for every client type.Core
OpenID Connect and ID TokensOpenID Connect is an identity layer on top of OAuth 2.0. Alongside an access token for APIs, it returns an ID token: a signed JWT stating who the user is, who issued the statement, which client it is for, and when it expires. The client validates it and creates its own session. Confusing ID tokens with access tokens, or skipping audience and nonce checks, are the classic mistakes.Sign in
Foundational
The Confused DeputyA confused deputy is a program that holds authority and is tricked into using it on behalf of a less privileged party. The problem was named in 1988 and reappears in OAuth proxies, cloud services that act for customers, and, most sharply, in AI agents: a model holding a user's or a service's credentials can be steered by text from anyone. The fix is to make each action carry the authority of the party that requested it, not the deputy's own.Advanced
Validating JWTs SafelyA JSON Web Token is a signed (sometimes encrypted) set of claims, whose safety depends on explicit verifier policy. Safe validation pins the allowed algorithm to each key, selects keys only from the configured issuer's key set, checks the token type, issuer, audience and time claims, treats header fields such as kid and jku as untrusted input, and keeps different token kinds mutually exclusive. Key rotation needs a schedule that accounts for cache lifetimes, token lifetimes and clock leeway.🔒 Premium
Advanced
Sender-Constrained Tokens: DPoP, mTLS and Token ExchangeA bearer token is honoured for whoever presents it, so a leaked token is a working credential. Sender-constrained tokens carry a confirmation claim naming a key, and the resource server checks that the caller proves possession: DPoP with a signed proof per request, mTLS with the client certificate on the connection. Binding stops replay of an exfiltrated token; it does not stop code that runs where the key is, or a forged token. Token exchange (RFC 8693) issues each hop a new, narrower, audience-bound token instead of passing one along.🔒 Premium
Unlock all 36 answers · $25
Every worked answer in all 17 topics, every lesson in every course, the full concept curriculum, the complete practice-test bank, and the downloadable security field guides.
6 months · One payment · No auto-renewal