forked from 0xWheatyz/SPARC
Add rate limiting to /auth/login and /auth/register endpoints #688
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
The login and register endpoints have no rate limiting, leaving them open to brute-force password attacks and registration spam.
Work to do
slowapifor FastAPI) to the application/auth/login(e.g. 10 requests per minute per IP) and/auth/register(e.g. 5 requests per minute per IP)Retry-Afterheader when the limit is exceededRATE_LIMIT_LOGIN,RATE_LIMIT_REGISTER).env.exampleAcceptance criteria
Closing as already implemented. Rate limiting was added to /auth/login and /auth/register endpoints in PR #28 (feature/rate-limiting). See SPARC/api.py.