← All drills

Guard Your API: Authentication and Rate Limiting

What you'll be able to do

Take an open API and make it safe to expose: prove who is calling, decide what each caller may do, limit how often they may ask, keep the secrets out of the code and the logs, and show with tests that every defence holds.

⌁ Every public API needs these layers: sign-in, permissions, and limits. Identity providers, API gateways and payment platforms all implement the same ideas you build here by hand.
Start this internship
Create an account to unlock the 6 sections, the workbench, and askThili.
Begin

Sections

1. Guard Your API: Authentication and Rate Limiting
🔒 locked
2. Lesson 1 - Who Is Asking?
🔒 locked
3. Lesson 2 - Passwords and Tokens
🔒 locked
4. Lesson 3 - Who May Do What?
🔒 locked
5. Lesson 4 - Stop the Flood
🔒 locked
6. Lesson 5 - Attack Your Own Service
🔒 locked

Dig deeper

🔗OWASP API Security Top 10
docs
🔗OWASP Password Storage Cheat Sheet
docs
🔗RFC 7519: JSON Web Token (JWT)
docs
🔗RFC 6750: Bearer token usage
docs
🔗RFC 6585: 429 Too Many Requests
docs
🔗RFC 9110: HTTP semantics (status codes)
docs
🔗FastAPI: security tutorial
docs
🔗PyJWT documentation
docs
🔗Python hashlib (scrypt and password hashing)
docs
🔗Python secrets (random values for secrets)
docs