Security
OAuth/OIDC: multiple-choice review
Six questions that cut across the whole unit. Each one mirrors a decision in a real incident or design review — not a definition to recite, but a mandatory check to defend. The unit’s thesis: skip any one and you ship a CVE.
Confirm you can connect PKCE, exact redirect matching, the eight id_token checks, refresh rotation, sender-constrained tokens, and audience validation into one complete-set security model.
Your OAuth client is a confidential server-side app with a client_secret. A reviewer asks why you still send PKCE. What is the correct answer?
A team registers redirect_uri as a prefix match (https://app.example/callback*) to support dynamic return paths. Why is this a vulnerability?
An OIDC client validates the id_token signature, iss, exp, and nonce — but reads the algorithm to use from the token's own alg header. What is the flaw?
A refresh token leaks through an access log. Refresh-token rotation is enabled. What is the maximum window of harm?
A supply-chain attack injects JavaScript into your SPA and exfiltrates the access token from memory. The token is bound with DPoP. Why does the stolen token fail at the resource server?
One authorization server issues tokens for API-A and API-B. API-B's validator runs: if token.aud contains any known client_id, accept. Why is this an audience-confusion vulnerability?
The through-line across the unit is one complete-set rule: PKCE binds the code to the client, exact redirect matching keeps the code on-domain, the eight id_token checks (with a server-pinned algorithm) authenticate the user, refresh rotation turns theft into a detection alarm, sender-constrained tokens (DPoP/mTLS) defeat bearer theft, and audience validation against a hard-coded identifier blocks cross-API confusion. Every real OAuth breach — Facebook, Slack, GitHub Enterprise, Azure AD — traces back to exactly one of these checks being skipped or inverted.