letsencrypt / letsencrypt/boulder

ratelimits/wfe: Implement per-endpoint per-IP address rate limits

Open
#8,668 0 comments 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.