This course covers implementing basic API key authentication alongside your existing OAuth system. You will learn to generate API keys, authenticate requests, and manage key security. The course follows an offense-defense approach, demonstrating simple API key vulnerabilities before implementing secure solutions.
Overview
Syllabus
- Unit 1: API Key Security Basics
- Secure API Key Generation and Hashing in Python
- Implement FastAPI API Key Creation Endpoint
- Complete the ApiKey SQLAlchemy Model
- Unit 2: API Key Authentication
- Validate API Key Format
- Flask API Key Authentication Middleware
- Flexible Authentication Decorator for Flask
- Integrate flexible_auth middleware into Flask snippet routes
- Unit 3: API Key Management
- Secure API Key Preview in Listing Endpoint
- Implement API Key Revocation Endpoint in Python
- API Key Rate Limiting Middleware in FastAPI