API Authentication, Authorization & Threat Modeling

OAuth2 grants, PKCE, JWT validation and revocation, opaque tokens, OIDC, mTLS, scopes vs fine-grained authz, STRIDE and the OWASP API Top 10

About 95 minutes · 15 exam questions · 9 interview questions · 2 code labs

What you will learn

  1. AuthN vs AuthZ, and where each check lives
  2. API keys vs tokens — and why you should not mix keys and users
  3. OAuth2 roles and the grants you should actually use
  4. JWT anatomy and a validation checklist that actually holds up
  5. Revocation, refresh token rotation, and opaque tokens with introspection
  6. OIDC, SAML, and what an ID token is (and is not) for
  7. Service-to-service auth: mTLS, workload identity, and propagating the user
  8. Scopes vs fine-grained authorization (RBAC checks, policy engines)
  9. Threat modeling with STRIDE — a walkthrough on a real API
  10. OWASP API Security Top 10 (2023) — what each means in a NestJS codebase

Previous: API Versioning, Contracts & Testing · Next: Application Security, Secrets & Multi-Tenancy