Skip to content

Commit e09c5fa

Browse files
authored
Deprecate CAA AccountURI and ValidationMethods feature flags (#7000)
These flags are set to true in all environments.
1 parent 8d8fd37 commit e09c5fa

File tree

9 files changed

+12
-77
lines changed

9 files changed

+12
-77
lines changed

cmd/boulder-va/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ type Config struct {
3636

3737
Features map[string]bool
3838

39-
AccountURIPrefixes []string
39+
AccountURIPrefixes []string `validate:"min=1,dive,required,url"`
4040
}
4141

4242
Syslog cmd.SyslogConfig

features/features.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,10 @@ const (
1717
ROCSPStage6
1818
ROCSPStage7
1919
StoreLintingCertificateInsteadOfPrecertificate
20-
21-
// Currently in-use features
22-
// Check CAA and respect validationmethods parameter.
2320
CAAValidationMethods
24-
// Check CAA and respect accounturi parameter.
2521
CAAAccountURI
22+
23+
// Currently in-use features
2624
// EnforceMultiVA causes the VA to block on remote VA PerformValidation
2725
// requests in order to make a valid/invalid decision with the results.
2826
EnforceMultiVA

test/config-next/va-remote-a.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,7 @@
3434
}
3535
}
3636
},
37-
"features": {
38-
"CAAValidationMethods": true,
39-
"CAAAccountURI": true
40-
},
37+
"features": {},
4138
"accountURIPrefixes": [
4239
"http://boulder.service.consul:4000/acme/reg/",
4340
"http://boulder.service.consul:4001/acme/acct/"

test/config-next/va-remote-b.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,7 @@
3434
}
3535
}
3636
},
37-
"features": {
38-
"CAAValidationMethods": true,
39-
"CAAAccountURI": true
40-
},
37+
"features": {},
4138
"accountURIPrefixes": [
4239
"http://boulder.service.consul:4000/acme/reg/",
4340
"http://boulder.service.consul:4001/acme/acct/"

test/config-next/va.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,6 @@
4040
}
4141
},
4242
"features": {
43-
"CAAValidationMethods": true,
44-
"CAAAccountURI": true,
4543
"EnforceMultiVA": true,
4644
"MultiVAFullResults": true
4745
},

test/v2_integration.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1491,11 +1491,6 @@ def test_caa_extensions():
14911491
for policy in caa_records:
14921492
challSrv.add_caa_issue(policy["domain"], policy["value"])
14931493

1494-
# TODO(@4a6f656c): Once the `CAAValidationMethods` feature flag is enabled by
1495-
# default, remove this early return.
1496-
if not CONFIG_NEXT:
1497-
return
1498-
14991494
chisel2.expect_problem("urn:ietf:params:acme:error:caa",
15001495
lambda: chisel2.auth_and_issue(["dns-01-only.good-caa-reserved.com"], chall_type="http-01"))
15011496

va/caa.go

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ import (
1111
"github.com/letsencrypt/boulder/core"
1212
corepb "github.com/letsencrypt/boulder/core/proto"
1313
berrors "github.com/letsencrypt/boulder/errors"
14-
"github.com/letsencrypt/boulder/features"
1514
"github.com/letsencrypt/boulder/identifier"
1615
"github.com/letsencrypt/boulder/probs"
1716
vapb "github.com/letsencrypt/boulder/va/proto"
@@ -284,15 +283,12 @@ func (va *ValidationAuthorityImpl) validateCAA(caaSet *caaResult, wildcard bool,
284283
continue
285284
}
286285

287-
if features.Enabled(features.CAAAccountURI) {
288-
if !caaAccountURIMatches(parsedParams, va.accountURIPrefixes, params.accountURIID) {
289-
continue
290-
}
286+
if !caaAccountURIMatches(parsedParams, va.accountURIPrefixes, params.accountURIID) {
287+
continue
291288
}
292-
if features.Enabled(features.CAAValidationMethods) {
293-
if !caaValidationMethodMatches(parsedParams, params.validationMethod) {
294-
continue
295-
}
289+
290+
if !caaValidationMethodMatches(parsedParams, params.validationMethod) {
291+
continue
296292
}
297293

298294
va.metrics.caaCounter.WithLabelValues("authorized").Inc()

va/caa_test.go

Lines changed: 1 addition & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ import (
1111
"github.com/miekg/dns"
1212

1313
"github.com/letsencrypt/boulder/core"
14-
"github.com/letsencrypt/boulder/features"
1514
"github.com/letsencrypt/boulder/identifier"
1615
"github.com/letsencrypt/boulder/probs"
1716
"github.com/letsencrypt/boulder/test"
@@ -411,11 +410,9 @@ func TestCAAChecking(t *testing.T) {
411410
params := &caaParams{accountURIID: accountURIID, validationMethod: method}
412411

413412
va, _ := setup(nil, 0, "", nil)
414-
err := features.Set(map[string]bool{"CAAValidationMethods": true, "CAAAccountURI": true})
415-
test.AssertNotError(t, err, "failed to enable features")
416-
417413
va.dnsClient = caaMockDNS{}
418414
va.accountURIPrefixes = []string{"https://letsencrypt.org/acct/reg/"}
415+
419416
for _, caaTest := range testCases {
420417
mockLog := va.log.(*blog.Mock)
421418
mockLog.Clear()
@@ -433,49 +430,6 @@ func TestCAAChecking(t *testing.T) {
433430
}
434431
})
435432
}
436-
437-
// Reset to disable CAAValidationMethods/CAAAccountURI.
438-
features.Reset()
439-
440-
// present-dns-only.com should now be valid even with http-01
441-
ident := identifier.DNSIdentifier("present-dns-only.com")
442-
foundAt, valid, _, err := va.checkCAARecords(ctx, ident, params)
443-
test.AssertNotError(t, err, "present-dns-only.com")
444-
test.AssertEquals(t, foundAt, "present-dns-only.com")
445-
test.Assert(t, valid, "Valid should be true")
446-
447-
// present-incorrect-accounturi.com should now be also be valid
448-
ident = identifier.DNSIdentifier("present-incorrect-accounturi.com")
449-
foundAt, valid, _, err = va.checkCAARecords(ctx, ident, params)
450-
test.AssertNotError(t, err, "present-incorrect-accounturi.com")
451-
test.AssertEquals(t, foundAt, "present-incorrect-accounturi.com")
452-
test.Assert(t, valid, "Valid should be true")
453-
454-
// nil params should be valid, too
455-
foundAt, valid, _, err = va.checkCAARecords(ctx, ident, nil)
456-
test.AssertNotError(t, err, "present-incorrect-accounturi.com")
457-
test.AssertEquals(t, foundAt, "present-incorrect-accounturi.com")
458-
test.Assert(t, valid, "Valid should be true")
459-
460-
ident.Value = "servfail.com"
461-
foundAt, valid, _, err = va.checkCAARecords(ctx, ident, nil)
462-
test.AssertError(t, err, "servfail.com")
463-
test.AssertEquals(t, foundAt, "")
464-
test.Assert(t, !valid, "Valid should be false")
465-
466-
if _, _, _, err := va.checkCAARecords(ctx, ident, nil); err == nil {
467-
t.Errorf("Should have returned error on CAA lookup, but did not: %s", ident.Value)
468-
}
469-
470-
ident.Value = "servfail.present.com"
471-
foundAt, valid, _, err = va.checkCAARecords(ctx, ident, nil)
472-
test.AssertError(t, err, "servfail.present.com")
473-
test.AssertEquals(t, foundAt, "")
474-
test.Assert(t, !valid, "Valid should be false")
475-
476-
if _, _, _, err := va.checkCAARecords(ctx, ident, nil); err == nil {
477-
t.Errorf("Should have returned error on CAA lookup, but did not: %s", ident.Value)
478-
}
479433
}
480434

481435
func TestCAALogging(t *testing.T) {

va/va.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ func NewValidationAuthorityImpl(
229229
accountURIPrefixes []string,
230230
) (*ValidationAuthorityImpl, error) {
231231

232-
if features.Enabled(features.CAAAccountURI) && len(accountURIPrefixes) == 0 {
232+
if len(accountURIPrefixes) == 0 {
233233
return nil, errors.New("no account URI prefixes configured")
234234
}
235235

0 commit comments

Comments
 (0)