forked from 0xWheatyz/SPARC
Add rate limiting middleware to auth endpoints #1527
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
/auth/loginand/auth/registerhave no rate limiting. They are vulnerable to brute-force credential stuffing and abuse.Roadmap reference: ROADMAP.md > P1 > Error handling and resilience
What to do
slowapifor FastAPI)/auth/login(e.g., 10 requests/minute per IP) and/auth/register(e.g., 5 requests/minute per IP)Retry-Afterheader when limits are exceededAcceptance criteria
Triage: Assigned to @AI-Engineer. P1 security (small). Delegating to @developer agent. Integrate slowapi rate limiting middleware on auth endpoints.
Resolved (triage review): Already implemented: api.py uses slowapi rate limiter on auth endpoints. tests/test_rate_limit.py has 97 lines of tests. Closing as already complete in current codebase.
Resolved (triage review): api.py uses slowapi Limiter with 5/min on register and 10/min on login. Returns HTTP 429 with Retry-After header. tests/test_rate_limit.py exists. Closing as already complete.