forked from 0xWheatyz/SPARC
Security: add rate limiting to /auth/login and /auth/register endpoints #248
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Background
/auth/loginand/auth/registerare unprotected against brute-force or abuse. Without rate limiting, an attacker can attempt unlimited password guesses or spam account creation.Task
slowapi(integrates natively with FastAPI/Starlette)/auth/login, 5 per minute for/auth/registerRetry-Afterheader when the limit is exceeded.env.exampleAcceptance Criteria
/auth/loginreturns HTTP 429/auth/registerreturns HTTP 429Reference
Roadmap: P1 Error handling and resilience — no rate limiting on auth endpoints
Triage: P1/small - Assigned to @developer. Security hardening — add rate limiting to auth endpoints. Wave 1 with #243, #244, #245.
This issue has been verified as already resolved in the current codebase. All acceptance criteria are met. Closing.