Uploaded October 2026 | Updated November 2026, 2 hours ago
Your app passes every test, but is your API actually secure in production? In this backend security tutorial I break down 5 critical API security, JWT and architecture mistakes developers make — authentication vs authorization (BOLA), long-lived JWT tokens, unchecked token claims, missing rate limits, and trusting internal microservices — and exactly how to fix each one before you deploy.
You'll learn why a valid JWT doesn't mean a user can access a resource, why logout doesn't revoke a token, how refresh token rotation detects stolen tokens, which JWT claims to validate (issuer, audience, expiration, algorithm allowlist), how to rate limit expensive AI endpoints by cost, and how to secure service-to-service communication with identity instead of network location.
⏱️ Chapters
0:00 Your app passes every test… then production happens
0:50 5 API security mistakes (and how to prevent them)
1:05 Mistake 1: Authentication vs authorization (Broken Object Level Authorization / BOLA)
2:26 Authentication vs authorization explained (hotel key card)
2:46 How to fix BOLA: check permission for every resource
3:50 Mistake 2: Long-lived JWT tokens used like passwords
4:39 Why a signed JWT can still be stolen
5:05 Why deleting the token on logout doesn't revoke it
5:30 Short-lived access tokens, refresh token rotation, session revocation, HttpOnly cookies
6:54 Mistake 3: Trusting JWT claims without validating them
8:00 Token audience explained (boarding pass analogy)
8:14 JWT validation checklist: iss, aud, exp, alg allowlist, trusted keys
9:28 Mistake 4: Expensive APIs without rate limiting
9:59 The world's most expensive loading spinner
10:26 Rate limiting by cost, usage quotas, job queues and monitoring
12:09 Mistake 5: "Internal" microservices that trust the network
12:51 What happens when one service gets compromised
13:19 Zero trust: identity, not network location (mTLS, workload identity, scoped tokens)
14:04 Token pass-through, token exchange, and secrets in logs
15:11 How to build a production-ready application
16:32 Security review checklist: 5 areas
16:45 How to test each security assumption
17:30 Working app vs secure app
✅ Production security checklist from this video
1. Authorization: check every resource against the user's organization or membership
2. Token lifecycle: short-lived access tokens, refresh token rotation, real session revocation
3. Token validation: issuer, audience, expiry, algorithm allowlist, trusted keys
4. Resource protection: cost-based rate limits, quotas, queues, timeouts, spend caps
5. Service-to-service security: every internal request needs an identity and permission
📚 Sources
- OWASP API Security Top 10 (2023) — API1 Broken Object Level Authorization: owasp.org/API-Security/editions/2023/en/0xa1-broken-object-level-authorization
- OWASP API Security Top 10 (2023) — API4 Unrestricted Resource Consumption: owasp.org/API-Security/editions/2023/en/0xa4-unrestricted-resource-consumption
- RFC 9700 — Best Current Practice for OAuth 2.0 Security: datatracker.ietf.org/doc/html/rfc9700
- RFC 8725 — JSON Web Token Best Current Practices: datatracker.ietf.org/doc/html/rfc8725
- RFC 8693 — OAuth 2.0 Token Exchange: datatracker.ietf.org/doc/html/rfc8693
"Kanbo", "Pine & Co" and "Bluefin Labs" are made-up examples; numbers on screen are example data. Only test systems you're authorized to test.
💬 Which of these 5 mistakes have you seen in a real codebase? Tell me in the comments.
🔔 Subscribe to Angga for more videos about backend engineering, AI, and building better software.
Your app passes every test, but is your API actually secure in production? In this backend security tutorial I break down 5 critical API security, JWT and architecture mistakes developers make — authentication vs authorization (BOLA), long-lived JWT tokens, unchecked token claims, missing rate limits, and trusting internal microservices — and exactly how to fix each one before you deploy.
You'll learn why a valid JWT doesn't mean a user can access a resource, why logout doesn't revoke a token, how refresh token rotation detects stolen tokens, which JWT claims to validate (issuer, audience, expiration, algorithm allowlist), how to rate limit expensive AI endpoints by cost, and how to secure service-to-service communication with identity instead of network location.
⏱️ Chapters
0:00 Your app passes every test… then production happens
0:50 5 API security mistakes (and how to prevent them)
1:05 Mistake 1: Authentication vs authorization (Broken Object Level Authorization / BOLA)
2:26 Authentication vs authorization explained (hotel key card)
2:46 How to fix BOLA: check permission for every resource
3:50 Mistake 2: Long-lived JWT tokens used like passwords
4:39 Why a signed JWT can still be stolen
5:05 Why deleting the token on logout doesn't revoke it
5:30 Short-lived access tokens, refresh token rotation, session revocation, HttpOnly cookies
6:54 Mistake 3: Trusting JWT claims without validating them
8:00 Token audience explained (boarding pass analogy)
8:14 JWT validation checklist: iss, aud, exp, alg allowlist, trusted keys
9:28 Mistake 4: Expensive APIs without rate limiting
9:59 The world's most expensive loading spinner
10:26 Rate limiting by cost, usage quotas, job queues and monitoring
12:09 Mistake 5: "Internal" microservices that trust the network
12:51 What happens when one service gets compromised
13:19 Zero trust: identity, not network location (mTLS, workload identity, scoped tokens)
14:04 Token pass-through, token exchange, and secrets in logs
15:11 How to build a production-ready application
16:32 Security review checklist: 5 areas
16:45 How to test each security assumption
17:30 Working app vs secure app
✅ Production security checklist from this video
1. Authorization: check every resource against the user's organization or membership
2. Token lifecycle: short-lived access tokens, refresh token rotation, real session revocation
3. Token validation: issuer, audience, expiry, algorithm allowlist, trusted keys
4. Resource protection: cost-based rate limits, quotas, queues, timeouts, spend caps
5. Service-to-service security: every internal request needs an identity and permission
📚 Sources
- OWASP API Security Top 10 (2023) — API1 Broken Object Level Authorization: owasp.org/API-Security/editions/2023/en/0xa1-broken-object-level-authorization
- OWASP API Security Top 10 (2023) — API4 Unrestricted Resource Consumption: owasp.org/API-Security/editions/2023/en/0xa4-unrestricted-resource-consumption
- RFC 9700 — Best Current Practice for OAuth 2.0 Security: datatracker.ietf.org/doc/html/rfc9700
- RFC 8725 — JSON Web Token Best Current Practices: datatracker.ietf.org/doc/html/rfc8725
- RFC 8693 — OAuth 2.0 Token Exchange: datatracker.ietf.org/doc/html/rfc8693
"Kanbo", "Pine & Co" and "Bluefin Labs" are made-up examples; numbers on screen are example data. Only test systems you're authorized to test.
💬 Which of these 5 mistakes have you seen in a real codebase? Tell me in the comments.
🔔 Subscribe to Angga for more videos about backend engineering, AI, and building better software.










