From cfa524a7a139bd4cf21c4c09ab47b994a96fd11f Mon Sep 17 00:00:00 2001 From: Phil Porada Date: Mon, 9 Jan 2023 14:42:23 -0500 Subject: [PATCH] Deprecate StoreRevokerInfo flag (#6567) Fixes #5238 --- features/featureflag_string.go | 16 ++++++++-------- features/features.go | 4 +--- sa/sa.go | 2 +- sa/sa_test.go | 6 +----- 4 files changed, 11 insertions(+), 17 deletions(-) diff --git a/features/featureflag_string.go b/features/featureflag_string.go index 9427700094d..a5e470d4482 100644 --- a/features/featureflag_string.go +++ b/features/featureflag_string.go @@ -31,12 +31,12 @@ func _() { _ = x[MozRevocationReasons-20] _ = x[SHA1CSRs-21] _ = x[RejectDuplicateCSRExtensions-22] - _ = x[CAAValidationMethods-23] - _ = x[CAAAccountURI-24] - _ = x[EnforceMultiVA-25] - _ = x[MultiVAFullResults-26] - _ = x[MandatoryPOSTAsGET-27] - _ = x[StoreRevokerInfo-28] + _ = x[StoreRevokerInfo-23] + _ = x[CAAValidationMethods-24] + _ = x[CAAAccountURI-25] + _ = x[EnforceMultiVA-26] + _ = x[MultiVAFullResults-27] + _ = x[MandatoryPOSTAsGET-28] _ = x[ECDSAForAll-29] _ = x[ServeRenewalInfo-30] _ = x[AllowUnrecognizedFeatures-31] @@ -45,9 +45,9 @@ func _() { _ = x[ExpirationMailerUsesJoin-34] } -const _FeatureFlag_name = "unusedPrecertificateRevocationStripDefaultSchemePortNonCFSSLSignerStoreIssuerInfoStreamlineOrderAndAuthzsV1DisableNewValidationsExpirationMailerDontLookTwiceOldTLSInboundOldTLSOutboundROCSPStage1ROCSPStage2ROCSPStage3GetAuthzReadOnlyGetAuthzUseIndexCheckFailedAuthorizationsFirstFasterNewOrdersRateLimitAllowV1RegistrationRestrictRSAKeySizesAllowReRevocationMozRevocationReasonsSHA1CSRsRejectDuplicateCSRExtensionsCAAValidationMethodsCAAAccountURIEnforceMultiVAMultiVAFullResultsMandatoryPOSTAsGETStoreRevokerInfoECDSAForAllServeRenewalInfoAllowUnrecognizedFeaturesROCSPStage6ROCSPStage7ExpirationMailerUsesJoin" +const _FeatureFlag_name = "unusedPrecertificateRevocationStripDefaultSchemePortNonCFSSLSignerStoreIssuerInfoStreamlineOrderAndAuthzsV1DisableNewValidationsExpirationMailerDontLookTwiceOldTLSInboundOldTLSOutboundROCSPStage1ROCSPStage2ROCSPStage3GetAuthzReadOnlyGetAuthzUseIndexCheckFailedAuthorizationsFirstFasterNewOrdersRateLimitAllowV1RegistrationRestrictRSAKeySizesAllowReRevocationMozRevocationReasonsSHA1CSRsRejectDuplicateCSRExtensionsStoreRevokerInfoCAAValidationMethodsCAAAccountURIEnforceMultiVAMultiVAFullResultsMandatoryPOSTAsGETECDSAForAllServeRenewalInfoAllowUnrecognizedFeaturesROCSPStage6ROCSPStage7ExpirationMailerUsesJoin" -var _FeatureFlag_index = [...]uint16{0, 6, 30, 52, 66, 81, 105, 128, 157, 170, 184, 195, 206, 217, 233, 249, 279, 303, 322, 341, 358, 378, 386, 414, 434, 447, 461, 479, 497, 513, 524, 540, 565, 576, 587, 611} +var _FeatureFlag_index = [...]uint16{0, 6, 30, 52, 66, 81, 105, 128, 157, 170, 184, 195, 206, 217, 233, 249, 279, 303, 322, 341, 358, 378, 386, 414, 430, 450, 463, 477, 495, 513, 524, 540, 565, 576, 587, 611} func (i FeatureFlag) String() string { if i < 0 || i >= FeatureFlag(len(_FeatureFlag_index)-1) { diff --git a/features/features.go b/features/features.go index 11e01c1b05c..eba0479bc77 100644 --- a/features/features.go +++ b/features/features.go @@ -35,6 +35,7 @@ const ( MozRevocationReasons SHA1CSRs RejectDuplicateCSRExtensions + StoreRevokerInfo // Currently in-use features // Check CAA and respect validationmethods parameter. @@ -50,9 +51,6 @@ const ( // MandatoryPOSTAsGET forbids legacy unauthenticated GET requests for ACME // resources. MandatoryPOSTAsGET - // StoreRevokerInfo enables storage of the revoker and a bool indicating if the row - // was checked for extant unrevoked certificates in the blockedKeys table. - StoreRevokerInfo // ECDSAForAll enables all accounts, regardless of their presence in the CA's // ecdsaAllowedAccounts config value, to get issuance from ECDSA issuers. ECDSAForAll diff --git a/sa/sa.go b/sa/sa.go index 45687b37f4f..af20dfe07f9 100644 --- a/sa/sa.go +++ b/sa/sa.go @@ -754,7 +754,7 @@ func (ssa *SQLStorageAuthority) AddBlockedKey(ctx context.Context, req *sapb.Add sourceInt, req.Comment, } - if features.Enabled(features.StoreRevokerInfo) && req.RevokedBy != 0 { + if req.RevokedBy != 0 { cols += ", revokedBy" qs += ", ?" vals = append(vals, req.RevokedBy) diff --git a/sa/sa_test.go b/sa/sa_test.go index ba1218dcd43..f2de8bb9bbe 100644 --- a/sa/sa_test.go +++ b/sa/sa_test.go @@ -2432,11 +2432,7 @@ func TestBlockedKeyRevokedBy(t *testing.T) { sa, _, cleanUp := initSA(t) defer cleanUp() - err := features.Set(map[string]bool{"StoreRevokerInfo": true}) - test.AssertNotError(t, err, "failed to set features") - defer features.Reset() - - _, err = sa.AddBlockedKey(context.Background(), &sapb.AddBlockedKeyRequest{ + _, err := sa.AddBlockedKey(context.Background(), &sapb.AddBlockedKeyRequest{ KeyHash: []byte{1}, Added: 1, Source: "API",