Deprecate StoreRevokerInfo flag (#6567)

Fixes #5238
This commit is contained in:
Phil Porada 2023-01-09 14:42:23 -05:00 committed by GitHub
parent 8d43397d1a
commit cfa524a7a1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 11 additions and 17 deletions

View File

@ -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) {

View File

@ -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

View File

@ -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)

View File

@ -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",