letsencrypt / letsencrypt/boulder
ratelimits/wfe: Implement per-endpoint per-IP address rate limits
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 5.8k
- Forks
- 649
- Avg merge
- 3d 23h
- Merged PRs (30d)
- 24
Description
Overrides should be on a per-account basis. If we follow the example of CertificatesPerDomainPerAccount, which does something similar, capacity MUST be consumed from each RequestsPerPerAccount bucket and SHOULD be consumed from each RequestsPerPerIP bucket, if possible.
- Setup two enums for each endpoint we wish to rate limit in ratelimits/names.go
- RequestsPerPerIP for regular requesters
- RequestsPerPerAccount for requesters with per-account overrides
- Update the string representation of the Name in nameToString
- Update the validators for that name in validateIdForName() (you should use validIPAddress() and validIPv6RangeCIDR())
- Update the transaction constructors for that name in transaction.go
- Update the Subscriber facing error message in Decision.Result()
- Update the case in BuildBucketKey() for that name
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with CertificatesPerDomainPerAccount and trace the related rate-limit handling in ratelimits/names.go, transaction.go, and the named entry points validateIdForName(), Decision.Result(), and BuildBucketKey(). Done means adding the per-IP and per-account endpoint names and updating their string representation, validation, transaction construction, subscriber error, and bucket-key handling.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100