You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add a max_crl_size parameter to CRL config (#28654)
* wip
* Unit test the CRL limit, wire up config
* Bigger error
* API docs
* wording
* max_crl_entries, + ignore 0 or < -1 values to the config endpoint
* changelog
* rename field in docs
* Update website/content/api-docs/secret/pki/index.mdx
Co-authored-by: Steven Clark <steven.clark@hashicorp.com>
* Update website/content/api-docs/secret/pki/index.mdx
Co-authored-by: Steven Clark <steven.clark@hashicorp.com>
---------
Co-authored-by: Steven Clark <steven.clark@hashicorp.com>
// Also log a nasty error to get the operator's attention
1777
+
sc.Logger().Error("CRL was not updated, as it exceeds the configured max size. The CRL now does not contain all revoked certificates! This may be indicative of a runaway issuance/revocation pattern.", "limit", limit)
1778
+
returnnil, fmt.Errorf("error building CRL: revocation list size (%d) exceeds configured maximum (%d)", revokedCount, limit)
1779
+
}
1780
+
ifrevokedCount>int(float32(limit)*0.90) {
1781
+
sc.Logger().Warn("warning, revoked certificate count is within 10% of the configured maximum CRL size", "revoked_certs", revokedCount, "limit", limit)
Description: `The amount of time the generated CRL should be
31
23
valid; defaults to 72 hours`,
32
-
Default: "72h",
33
-
},
34
-
"disable": {
35
-
Type: framework.TypeBool,
36
-
Description: `If set to true, disables generating the CRL entirely.`,
37
-
},
38
-
"ocsp_disable": {
39
-
Type: framework.TypeBool,
40
-
Description: `If set to true, ocsp unauthorized responses will be returned.`,
41
-
},
42
-
"ocsp_expiry": {
43
-
Type: framework.TypeString,
44
-
Description: `The amount of time an OCSP response will be valid (controls
24
+
Default: "72h",
25
+
},
26
+
"disable": {
27
+
Type: framework.TypeBool,
28
+
Description: `If set to true, disables generating the CRL entirely.`,
29
+
},
30
+
"ocsp_disable": {
31
+
Type: framework.TypeBool,
32
+
Description: `If set to true, ocsp unauthorized responses will be returned.`,
33
+
},
34
+
"ocsp_expiry": {
35
+
Type: framework.TypeString,
36
+
Description: `The amount of time an OCSP response will be valid (controls
45
37
the NextUpdate field); defaults to 12 hours`,
46
-
Default: "1h",
47
-
},
48
-
"auto_rebuild": {
49
-
Type: framework.TypeBool,
50
-
Description: `If set to true, enables automatic rebuilding of the CRL`,
51
-
},
52
-
"auto_rebuild_grace_period": {
53
-
Type: framework.TypeString,
54
-
Description: `The time before the CRL expires to automatically rebuild it, when enabled. Must be shorter than the CRL expiry. Defaults to 12h.`,
55
-
Default: "12h",
56
-
},
57
-
"enable_delta": {
58
-
Type: framework.TypeBool,
59
-
Description: `Whether to enable delta CRLs between authoritative CRL rebuilds`,
60
-
},
61
-
"delta_rebuild_interval": {
62
-
Type: framework.TypeString,
63
-
Description: `The time between delta CRL rebuilds if a new revocation has occurred. Must be shorter than the CRL expiry. Defaults to 15m.`,
64
-
Default: "15m",
65
-
},
66
-
"cross_cluster_revocation": {
67
-
Type: framework.TypeBool,
68
-
Description: `Whether to enable a global, cross-cluster revocation queue.
38
+
Default: "1h",
39
+
},
40
+
"auto_rebuild": {
41
+
Type: framework.TypeBool,
42
+
Description: `If set to true, enables automatic rebuilding of the CRL`,
43
+
},
44
+
"auto_rebuild_grace_period": {
45
+
Type: framework.TypeString,
46
+
Description: `The time before the CRL expires to automatically rebuild it, when enabled. Must be shorter than the CRL expiry. Defaults to 12h.`,
47
+
Default: "12h",
48
+
},
49
+
"enable_delta": {
50
+
Type: framework.TypeBool,
51
+
Description: `Whether to enable delta CRLs between authoritative CRL rebuilds`,
52
+
},
53
+
"delta_rebuild_interval": {
54
+
Type: framework.TypeString,
55
+
Description: `The time between delta CRL rebuilds if a new revocation has occurred. Must be shorter than the CRL expiry. Defaults to 15m.`,
56
+
Default: "15m",
57
+
},
58
+
"cross_cluster_revocation": {
59
+
Type: framework.TypeBool,
60
+
Description: `Whether to enable a global, cross-cluster revocation queue.
69
61
Must be used with auto_rebuild=true.`,
70
-
},
71
-
"unified_crl": {
72
-
Type: framework.TypeBool,
73
-
Description: `If set to true enables global replication of revocation entries,
62
+
},
63
+
"unified_crl": {
64
+
Type: framework.TypeBool,
65
+
Description: `If set to true enables global replication of revocation entries,
74
66
also enabling unified versions of OCSP and CRLs if their respective features are enabled.
75
67
disable for CRLs and ocsp_disable for OCSP.`,
76
-
Default: "false",
77
-
},
78
-
"unified_crl_on_existing_paths": {
79
-
Type: framework.TypeBool,
80
-
Description: `If set to true,
68
+
Default: "false",
69
+
},
70
+
"unified_crl_on_existing_paths": {
71
+
Type: framework.TypeBool,
72
+
Description: `If set to true,
81
73
existing CRL and OCSP paths will return the unified CRL instead of a response based on cluster-local data`,
82
-
Default: "false",
83
-
},
74
+
Default: "false",
75
+
},
76
+
"max_crl_entries": {
77
+
Type: framework.TypeInt,
78
+
Description: `The maximum number of entries the CRL can contain. This is meant as a guard against accidental runaway revocations overloading Vault storage. If this limit is exceeded writing the CRL will fail. If set to -1 this limit is disabled.`,
0 commit comments