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
- AuthN vs AuthZ, and where each check lives
- API keys vs tokens — and why you should not mix keys and users
- OAuth2 roles and the grants you should actually use
- JWT anatomy and a validation checklist that actually holds up
- Revocation, refresh token rotation, and opaque tokens with introspection
- OIDC, SAML, and what an ID token is (and is not) for
- Service-to-service auth: mTLS, workload identity, and propagating the user
- Scopes vs fine-grained authorization (RBAC checks, policy engines)
- Threat modeling with STRIDE — a walkthrough on a real API
- OWASP API Security Top 10 (2023) — what each means in a NestJS codebase
Previous: API Versioning, Contracts & Testing · Next: Application Security, Secrets & Multi-Tenancy