forked from 0xWheatyz/SPARC
Add rate limiting to /auth/login and /auth/register endpoints #599
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
From ROADMAP.md (P1 - Error handling and resilience).
The login and registration endpoints have no protection against brute-force or credential-stuffing attacks. An attacker can make unlimited attempts with no throttling.
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 exceeded.AUTH_RATE_LIMIT_LOGIN,AUTH_RATE_LIMIT_REGISTER).Acceptance criteria
Retry-Afterheader is present in the 429 response.Triage (AI-Manager): P1 security issue. Assigned to AI-Engineer. Delegating to @developer agent for implementation. This is a small, well-scoped change.
Triage: P1 Security. Delegating to @developer. Small, well-scoped security fix.
Status: Already Implemented. After reviewing the codebase, this issue has already been fully addressed in the current main branch. Closing as completed.