Free course · 20 lessons · Advanced
API Security in Depth
The OWASP API Security Top 10 (2023) in practice: BOLA, BOPLA, BFLA, OAuth 2.1 and RFC 9700, token validation, fine-grained authorization, API keys, mTLS and DPoP, resource limits, business-flow abuse, SSRF, misconfiguration, inventory, webhooks, security testing and detection.
1. API Threat Landscape & Object-Level Risks
OWASP API Top 10 2023, threat modeling, BOLA and BOPLA.
- The OWASP API Security Top 10 (2023) — The ten most common API risks and how they differ from classic web risks.
- Threat Modeling an API — STRIDE per endpoint, trust boundaries and abuse cases.
- Broken Object Level Authorization (BOLA) — The #1 API risk: checking that the caller may access this specific object.
- Object Property Level Authorization: Mass Assignment & Data Exposure — Control which fields each caller may read and write.
2. Authentication & Authorization for APIs
OAuth 2.1 and the security BCP, tokens, scopes, keys and mTLS.
- OAuth 2.1 & the OAuth Security BCP (RFC 9700) — What changed: PKCE everywhere, no implicit or password grants, exact redirects.
- Validating Access Tokens Correctly — JWT verification, opaque tokens and introspection.
- Scopes, Roles & Fine-Grained Authorization — Coarse scopes in tokens, fine-grained decisions in a policy layer.
- API Keys Done Right — Identification, hashing, prefixes, scopes and rotation.
- mTLS & Sender-Constrained Tokens (DPoP) — Binding credentials to a key so stolen tokens are useless.
3. Function Authorization, Abuse & SSRF
Admin functions, resource limits, business-flow abuse and server-side requests.
- Broken Function Level Authorization — Deny-by-default route permissions and hidden admin endpoints.
- Unrestricted Resource Consumption — Limits on size, rate, complexity, time — and money.
- Sensitive Business Flows & Bot Abuse — Scalping, fake signups, credential stuffing and referral fraud.
- Server-Side Request Forgery (SSRF) — When your API fetches URLs on a user's behalf.
4. Configuration, Inventory & Secure Operations
Hardening, API inventory, third-party APIs, testing and detection.
- Security Misconfiguration: TLS, CORS, Headers & Errors — Hardened defaults for every API deployment.
- API Inventory & Lifecycle Security — Know every API, version, environment and data flow you expose.
- Unsafe Consumption of APIs & Webhook Security — Treat third-party APIs and inbound webhooks as untrusted input.
- Security Testing APIs in CI — SAST, dependency scanning, DAST, fuzzing and authorization tests.
- Security Logging, Detection & Incident Response — Audit trails, detections and what to do when a key leaks.
5. Capstone
Threat-model and secure a multi-tenant B2B API.
- Capstone: Secure a Multi-Tenant B2B API — Design authentication, authorization and abuse controls for an invoicing platform.
- Capstone: Review an API Design — Perform a security design review of a proposed ride-sharing API.