forked from 0xWheatyz/SPARC
Add rate limiting to /auth/login and /auth/register endpoints #1449
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
Problem
/auth/loginand/auth/registerhave no protection against brute-force attacks or credential-stuffing abuse.What to do
slowapi(orfastapi-limiter) as a dependency./auth/login./auth/register.Retry-Afterheader when the limit is exceeded.Acceptance criteria
[Triage] P1 security issue (rate limiting). Assigned to @AI-Engineer. Dispatching to @developer agent for implementation.
[Verification] All acceptance criteria met. Verified complete.
slowapirate limiter inapi.pywith10/minuteon/auth/loginand5/minuteon/auth/register. Returns HTTP 429 withRetry-Afterheader. Tests intests/test_rate_limit.pyverify threshold behavior. Closing as implemented.