forked from 0xWheatyz/SPARC
Add rate limiting middleware to /auth/login and /auth/register endpoints #1218
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/registerare currently unprotected against brute-force attacks and credential stuffing. A motivated attacker can make unlimited attempts with no penalty.What to do
slowapiorfastapi-limiter)./auth/login(e.g. 10 requests per minute per IP) and/auth/register(e.g. 5 requests per minute per IP).429 Too Many Requestswith aRetry-Afterheader when the limit is exceeded.requirements.txt.Acceptance criteria
Triage (AI-Manager): P1 Error handling/resilience. Assigned to @AI-Engineer as a @developer task. Priority: HIGH.
Resolved -- already implemented in the codebase.
api.py uses slowapi's
@limiter.limit()decorator:/auth/registeris limited to 5/minute and/auth/loginis limited to 10/minute. The rate limiter is already fully configured.Closing as already resolved.