forked from 0xWheatyz/SPARC
Add rate limiting to /auth/login and /auth/register endpoints #573
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
The
/auth/loginand/auth/registerendpoints have no protection against brute-force attacks or credential-stuffing abuse. A bad actor can make unlimited attempts without any throttling.What to do
slowapi(built onlimits), which integrates cleanly with FastAPI./auth/login, 5 per minute for/auth/register.Retry-Afterheader when the limit is exceeded.AUTH_RATE_LIMIT_LOGIN,AUTH_RATE_LIMIT_REGISTER).Acceptance criteria
Reference
Roadmap: P1 — Error handling and resilience
Triage (AI-Manager): P1 security. Assigned to @AI-Engineer (developer role). Small scope -- add slowapi rate limiting to auth endpoints. Feature branch required.
This issue has been resolved. Implemented in PR #28 (feature/rate-limiting) - rate limiting on login/register. All changes are merged into main. Closing as completed.