Skip to content

Commit eab90ee

Browse files
authored
Remove unused non-ACME /get/ paths for orders and authzs (#8010)
These paths receive (literally) zero traffic, and they require the WFE to duplicate the RA's authorization lifetime configuration. Since that configuration is now per-profile, the WFE can no longer easily replicate it, and the resulting staleness calculations will be wrong. Remove the duplicated configuration, remove the unused endpoints that rely on it, and remove the staleness-checking code which supported those endpoints. Leave the non-ACME /get/ endpoint for certificates in place, because checking staleness for those does not require any additional configuration, and having a non-ACME serial-based API for certificates is a good thing. Fixes #8007
1 parent e0e5a17 commit eab90ee

File tree

6 files changed

+53
-399
lines changed

6 files changed

+53
-399
lines changed

cmd/boulder-wfe2/main.go

+7-31
Original file line numberDiff line numberDiff line change
@@ -117,17 +117,13 @@ type Config struct {
117117
// StaleTimeout determines how old should data be to be accessed via Boulder-specific GET-able APIs
118118
StaleTimeout config.Duration `validate:"-"`
119119

120-
// AuthorizationLifetimeDays defines how long authorizations will be
121-
// considered valid for. The WFE uses this to find the creation date of
122-
// authorizations by subtracing this value from the expiry. It should match
123-
// the value configured in the RA.
124-
AuthorizationLifetimeDays int `validate:"required,min=1,max=397"`
125-
126-
// PendingAuthorizationLifetimeDays defines how long authorizations may be in
127-
// the pending state before expiry. The WFE uses this to find the creation
128-
// date of pending authorizations by subtracting this value from the expiry.
129-
// It should match the value configured in the RA.
130-
PendingAuthorizationLifetimeDays int `validate:"required,min=1,max=29"`
120+
// AuthorizationLifetimeDays duplicates the RA's config of the same name.
121+
// Deprecated: This field no longer has any effect.
122+
AuthorizationLifetimeDays int `validate:"-"`
123+
124+
// PendingAuthorizationLifetimeDays duplicates the RA's config of the same name.
125+
// Deprecated: This field no longer has any effect.
126+
PendingAuthorizationLifetimeDays int `validate:"-"`
131127

132128
AccountCache *CacheConfig
133129

@@ -319,24 +315,6 @@ func main() {
319315
c.WFE.StaleTimeout.Duration = time.Minute * 10
320316
}
321317

322-
// Baseline Requirements v1.8.1 section 4.2.1: "any reused data, document,
323-
// or completed validation MUST be obtained no more than 398 days prior
324-
// to issuing the Certificate". If unconfigured or the configured value is
325-
// greater than 397 days, bail out.
326-
if c.WFE.AuthorizationLifetimeDays <= 0 || c.WFE.AuthorizationLifetimeDays > 397 {
327-
cmd.Fail("authorizationLifetimeDays value must be greater than 0 and less than 398")
328-
}
329-
authorizationLifetime := time.Duration(c.WFE.AuthorizationLifetimeDays) * 24 * time.Hour
330-
331-
// The Baseline Requirements v1.8.1 state that validation tokens "MUST
332-
// NOT be used for more than 30 days from its creation". If unconfigured
333-
// or the configured value pendingAuthorizationLifetimeDays is greater
334-
// than 29 days, bail out.
335-
if c.WFE.PendingAuthorizationLifetimeDays <= 0 || c.WFE.PendingAuthorizationLifetimeDays > 29 {
336-
cmd.Fail("pendingAuthorizationLifetimeDays value must be greater than 0 and less than 30")
337-
}
338-
pendingAuthorizationLifetime := time.Duration(c.WFE.PendingAuthorizationLifetimeDays) * 24 * time.Hour
339-
340318
var limiter *ratelimits.Limiter
341319
var txnBuilder *ratelimits.TransactionBuilder
342320
var limiterRedis *bredis.Ring
@@ -371,8 +349,6 @@ func main() {
371349
logger,
372350
c.WFE.Timeout.Duration,
373351
c.WFE.StaleTimeout.Duration,
374-
authorizationLifetime,
375-
pendingAuthorizationLifetime,
376352
rac,
377353
sac,
378354
gnc,

test/config-next/wfe2.json

-2
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,6 @@
9898
]
9999
],
100100
"staleTimeout": "5m",
101-
"authorizationLifetimeDays": 30,
102-
"pendingAuthorizationLifetimeDays": 7,
103101
"limiter": {
104102
"redis": {
105103
"username": "boulder-wfe",

wfe2/stale.go

-74
This file was deleted.

wfe2/stale_test.go

-78
This file was deleted.

0 commit comments

Comments
 (0)