| Method | Use Case |
|---|---|
| Basic Authentication | Simple key validation for development |
| RBAC | JWT-powered authorization with fine-grained scopes for production |
Basic Authentication
Set theOS_SECURITY_KEY environment variable:
Authorization: Bearer <key> header return 401 Unauthorized.
Role-Based Access Control (RBAC)
RBAC validates JWT tokens and checks scopes against required permissions for each endpoint. Enable it withauthorization=True:
JWT_VERIFICATION_KEY environment variable to your public key:
401 Unauthorized. Requests with insufficient scopes return 403 Forbidden.
See RBAC Documentation for scope format, available scopes, and endpoint mappings.