boulder/sa
Daniel McCarney f2d3ad6d52 Enforce new orders per acct per window rate limit. (#3501)
Previously we introduced the concept of a "pending orders per account
ID" rate limit. After struggling with making an implementation of this
rate limit perform well we reevaluated the problem and decided a "new
orders per account per time window" rate limit would be a better fit for
ACMEv2 overall.

This commit introduces the new newOrdersPerAccount rate limit. The RA
now checks this before creating new pending orders in ra.NewOrder. It
does so after order reuse takes place ensuring the rate limit is only
applied in cases when a distinct new pending order row would be created.
To accomplish this a migration for a new orders field (created) and an
index over created and registrationID is added. It would be possible to
use the existing expires field for this like we've done in the past, but that
was primarily to avoid running a migration on a large table in prod. Since
we don't have that problem yet for V2 tables we can Do The Right Thing
and add a column.

For deployability the deprecated pendingOrdersPerAccount code & SA
gRPC bits are left around. A follow-up PR will be needed to remove
those (#3502).

Resolves #3410
2018-03-02 10:47:39 -08:00
..
_db Move db-next migrations into db. (#3379) 2018-01-18 15:13:21 -05:00
_db-next Enforce new orders per acct per window rate limit. (#3501) 2018-03-02 10:47:39 -08:00
proto Enforce new orders per acct per window rate limit. (#3501) 2018-03-02 10:47:39 -08:00
satest Replace go-jose v1 with go-jose v2. (#2899) 2017-07-26 10:55:14 -07:00
authz.go Batch fetching of existing authorizations and creation of pending authorizations (#3058) 2017-09-25 09:10:59 -07:00
database.go ACMEv2: Add pending order reuse (#3290) 2018-01-02 13:27:16 -08:00
database_test.go remove prefixdb and replace with mysql driver params (#2871) 2017-07-17 16:40:56 -07:00
ip_range_test.go Remove all stray copyright headers and appends the initial line to LICENSE.txt (#1853) 2016-05-31 12:32:04 -07:00
model.go Enforce new orders per acct per window rate limit. (#3501) 2018-03-02 10:47:39 -08:00
model_test.go Consolidate registration model (#3064) 2017-09-12 12:35:40 -04:00
rollback.go Only wrap error given to `Rollback` when `tx.Rollback()` fails. (#3025) 2017-08-31 14:44:25 -04:00
rollback_test.go Only wrap error given to `Rollback` when `tx.Rollback()` fails. (#3025) 2017-08-31 14:44:25 -04:00
sa.go Enforce new orders per acct per window rate limit. (#3501) 2018-03-02 10:47:39 -08:00
sa_test.go Enforce new orders per acct per window rate limit. (#3501) 2018-03-02 10:47:39 -08:00
test-cert.der Store a DB of issued names. 2015-09-28 19:37:50 -07:00
test-cert2.der Implement rate limiting by domain name. 2015-10-04 21:04:26 -07:00
type-converter.go Replace go-jose v1 with go-jose v2. (#2899) 2017-07-26 10:55:14 -07:00
type-converter_test.go Replace go-jose v1 with go-jose v2. (#2899) 2017-07-26 10:55:14 -07:00
www.eff.org.der Add initial certificate status in SA. 2015-04-23 19:52:34 -07:00