
106.0K
BA403 isn’t a “code bug”.
It’s usually a **policy / auth / gateway** problem.
Here’s the exact checklist I follow:
1️⃣ Confirm WHO is blocking
• App logs show request reached?
• Or blocked before app (CDN/WAF/API Gateway/Nginx)?
2️⃣ Check Auth Headers
• Is `Authorization` header present in prod?
• Token format correct (Bearer <token>)?
• Proxy stripping headers?
3️⃣ CORS vs 403 Confusion
• Browser preflight (OPTIONS) failing?
• Missing `Access-Control-Allow-*` headers?
• Allowed origins wrong?
4️⃣ Reverse Proxy Rules (Nginx/ALB/API Gateway)
• Path mismatch `/api/v1` vs `/api/v1/`
• Method blocked (PUT/DELETE not allowed)
• IP allowlist/denylist enabled?
5️⃣ Role/Permission Mismatch
• Prod uses real RBAC/ABAC policies
• Local uses bypass / dev user
• Verify user roles + scopes in token
6️⃣ WAF / Security Rules
• ModSecurity / Cloudflare / AWS WAF
• Blocking patterns like SQLi/XSS
• Large payload / suspicious params
7️⃣ Environment Config Drift
• Wrong secrets / issuer / audience
• Wrong public keys (JWT verify fails)
• Clock skew causing token “expired” in prod
8️⃣ Reproduce with cURL
Test outside browser to isolate CORS:
• `curl -v -H "Authorization: Bearer …" https://prod/api`
At scale, debugging is about finding
**which layer said NO**.
That’s real backend system design ⚙️
#systemdesign #apidesign #scaling #softwaredeveloper #programming
systemdesign apidesign scaling 1millionrps distributedsystems loadbalancing caching microservices softwaredeveloper programming coding devops tech backenddeveloper backenddevelopment api interviews database learninganddevelopment tech
[API Design] [System Architecture] [API Scaling] [1 Million RPS] [Distributed Systems] [Load Balancing] [Database Sharding] [High Availability]
@backend.with.ai










