Rate limits on sign-up, sign-in and reset requests, with when to try again #381
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
spec
wayfinder:grilling
wayfinder:map
wayfinder:prototype
wayfinder:research
wayfinder:task
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Blocks
Depends on
#385 Claim a Guest on the wire, and write its later Games to the Account
amaurycoudr/chess-project
#380 Password reset by email: a single-use link, caught by Mailpit, sent by Resend in production
amaurycoudr/chess-project
Reference
amaurycoudr/chess-project#381
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
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?
Parent
#364
What to build
Sign-up, sign-in and reset requests are rate-limited by in-memory sliding-window counters in the API, on an injected clock. Failed sign-ins are limited per email (5 per 15 minutes) and per IP (20 per 15 minutes). Reset requests are limited per email (3 per hour) and per IP (10 per hour). Sign-ups are limited per IP (10 per hour). Emails are counted lowercased, whether or not they have an Account. The IP is the client's as one trusted proxy hop forwards it. A refused call is
TOO_MANY_REQUESTS(429), carrying the seconds to wait in aRetry-Afterheader and in its error data. The sign-up, sign-in and forgot-password forms tell the Player when they can try again. Each limit is a config default that an environment variable may override. Dev, CI and previews raise the per-IP limits so the browser suite can sign up from one address; the per-email limits keep production values everywhere. This ticket writes the rate-limit ADR.Seam:
loadConfig; the RPC wire (with the fake clock); the front viewsAcceptance criteria
TOO_MANY_REQUESTSjoins the refusal status table as 429 and the errors ofsignUp,signInandrequestPasswordResetloadConfigparses the rate-limit overrides, tested beside the existing config tests; dev, CI and previews raise the per-IP limitsmentioned in issue #385
mentioned in issue #364
mentioned in issue #380
marked this issue as related to #364
marked this issue as related to #380
marked this issue as related to #385
mentioned in merge request !523
mentioned in commit 26e6d97940eaab86b68fd4f88c5d19879e68ead6
mentioned in commit 2d3fa7596ab48eb201709625378622803353f5c6
mentioned in commit 08aef0bbbed6cf66b8ed2edd0eee9a3b625deb03
mentioned in commit
06ade4f96fmentioned in commit
264bc50a0amentioned in commit
447c6e61b2Delivered by !523, merged into main.
mentioned in commit
215cdba4c9mentioned in merge request !537