OAuth 2.0 threat model lifecycle + OIDC login notes

Where OAuth and OIDC login flows break, and where to fix them.

This interactive model maps OAuth 2.0 authorization bugs to the lifecycle stage where the control should live. When the flow is used for login, the artifact explicitly calls out OpenID Connect (OIDC) concepts such as ID tokens, nonce, issuer, audience, and subject.

Interactive OAuth threat-model flow

Arrows are generated from the stage-to-stage edge list, so each arrow connects the correct block in the lifecycle order.

Authorization Code + PKCE
Client configuration and request
Browser redirect and callback
Server token, session, API lifecycle
0

App registration

Client, redirect URI, scopes, app metadata.

Design-time trust
1

User starts flow

Login, connect account, or authorize app.

Flow binding
2

Authorization request

response_type, client_id, redirect_uri, scope, state, PKCE.

High risk
3

Consent screen

User approves app and permissions.

Forced consent
4

Callback redirect

Authorization code returns to client.

Top failure point
5

Browser landing page

URL, referrer, scripts, images, postMessage.

Leakage
6

Token exchange

Code exchanged for access/refresh tokens.

Single-use code
7

Session and account link

OIDC login maps identity to local account.

ATO risk
8

API access

Use token for resource calls and scopes.

Scope enforcement
9

Refresh, revoke, logout

Long-lived sessions and token rotation.

Lifecycle risk

Issue buckets mapped to shared fix components

These buckets are used for remediation planning: if the same component owns the control, the issue belongs in the same fix family.

Copied checklist.