forked from 0xWheatyz/SPARC
Add rate limiting middleware to auth endpoints #449
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?
Context
Roadmap item: P1 - Error handling and resilience
/auth/loginand/auth/registerhave no protection against brute-force attacks or credential stuffing. An attacker can make unlimited attempts without any throttling.What to do
slowapi(or similar) to the FastAPI app./auth/login(e.g., 10 requests per minute per IP) and/auth/register(e.g., 5 requests per minute per IP).Retry-Afterheader when the limit is exceeded.AUTH_RATE_LIMIT).Acceptance criteria
/auth/loginreturns HTTP 429./auth/registerreturns HTTP 429.Reference: ROADMAP.md - P1 Error handling and resilience
[Repo Manager Triage] P1 Resilience issue - small complexity. Assigned to @AI-Engineer. Delegating to @developer agent for rate limiting middleware addition.
[Repo Manager] Closing as already implemented.
Already implemented:
api.py:211-224configuresslowapirate limiter./auth/registerhas5/minutelimit (line 241),/auth/loginhas10/minutelimit (line 274). Returns HTTP 429 withRetry-Afterheader.