Skip to content

Commit 84c9477

Browse files
authored
Reduce maximum allowed valid authorization lifetime (#8648)
Although our config loading code ensured that we could never configure Boulder to violate the Baseline Requirements (currently 398 days), it did not ensure that we could not configure Boulder to violate our own CP/CPS (90 days). Reduce the maximum allowed ValidAuthzLifetime to prevent accidental violation of our CP/CPS.
1 parent 86079c5 commit 84c9477

2 files changed

Lines changed: 28 additions & 20 deletions

File tree

ra/ra.go

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -318,20 +318,28 @@ func NewValidationProfiles(defaultName string, configs map[string]*ValidationPro
318318
profiles := make(map[string]*validationProfile, len(configs))
319319

320320
for name, config := range configs {
321-
// The Baseline Requirements v1.8.1 state that validation tokens "MUST
322-
// NOT be used for more than 30 days from its creation". If unconfigured
323-
// or the configured value pendingAuthorizationLifetimeDays is greater
324-
// than 29 days, bail out.
321+
// The Baseline Requirements v2.2.5 state that a validation token (Random
322+
// Value) "MUST NOT be used more than 30 days from its creation". If
323+
// unconfigured or the configured value pendingAuthorizationLifetimeDays is
324+
// greater than 29 days, bail out.
325325
if config.PendingAuthzLifetime.Duration <= 0 || config.PendingAuthzLifetime.Duration > 29*(24*time.Hour) {
326326
return nil, fmt.Errorf("PendingAuthzLifetime value must be greater than 0 and less than 30d, but got %q", config.PendingAuthzLifetime.Duration)
327327
}
328328

329-
// Baseline Requirements v1.8.1 section 4.2.1: "any reused data, document,
330-
// or completed validation MUST be obtained no more than 398 days prior
331-
// to issuing the Certificate". If unconfigured or the configured value is
332-
// greater than 397 days, bail out.
333-
if config.ValidAuthzLifetime.Duration <= 0 || config.ValidAuthzLifetime.Duration > 397*(24*time.Hour) {
334-
return nil, fmt.Errorf("ValidAuthzLifetime value must be greater than 0 and less than 398d, but got %q", config.ValidAuthzLifetime.Duration)
329+
// Baseline Requirements v2.2.5, Section 4.2.1: "any data, document, or
330+
// completed validation used MUST be obtained within the maximum number of
331+
// days prior to issuing the Certificate, as defined in the following...:
332+
// 2026-03-15: 200 days; 2027-03-15: 100 days; 2029-03-15: 10 days"
333+
//
334+
// Our CP/CPS, v6.0, Section 4.2.1: "Certificate information is verified
335+
// using data and documents obtained no more than 90 days prior to issuance
336+
// of the Certificate."
337+
//
338+
// If unconfigured or the configured value is greater than 89 days, bail
339+
// out.
340+
// TODO before 2029-03-15: Update this to 9 days.
341+
if config.ValidAuthzLifetime.Duration <= 0 || config.ValidAuthzLifetime.Duration > 89*(24*time.Hour) {
342+
return nil, fmt.Errorf("ValidAuthzLifetime value must be greater than 0 and less than 89d, but got %q", config.ValidAuthzLifetime.Duration)
335343
}
336344

337345
if config.MaxNames <= 0 || config.MaxNames > 100 {

ra/ra_test.go

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -368,16 +368,16 @@ func initAuthorities(t *testing.T) (*DummyValidationAuthority, sapb.StorageAutho
368368
testKeyPolicy, err := goodkey.NewPolicy(nil, nil)
369369
test.AssertNotError(t, err, "making keypolicy")
370370

371-
profiles := &validationProfiles{
372-
defaultName: "test",
373-
byName: map[string]*validationProfile{"test": {
374-
pendingAuthzLifetime: 7 * 24 * time.Hour,
375-
validAuthzLifetime: 300 * 24 * time.Hour,
376-
orderLifetime: 7 * 24 * time.Hour,
377-
maxNames: 100,
378-
identifierTypes: []identifier.IdentifierType{identifier.TypeDNS},
379-
}},
380-
}
371+
profiles, err := NewValidationProfiles("test", map[string]*ValidationProfileConfig{
372+
"test": {
373+
PendingAuthzLifetime: config.Duration{Duration: 7 * 24 * time.Hour},
374+
ValidAuthzLifetime: config.Duration{Duration: 30 * 24 * time.Hour},
375+
OrderLifetime: config.Duration{Duration: 7 * 24 * time.Hour},
376+
MaxNames: 100,
377+
IdentifierTypes: []identifier.IdentifierType{identifier.TypeDNS},
378+
},
379+
})
380+
test.AssertNotError(t, err, "making validation profiles")
381381

382382
ra := NewRegistrationAuthorityImpl(
383383
fc, log, stats,

0 commit comments

Comments
 (0)