open-vault/builtin/logical/pki
Alexander Scheel f0a127487b
Add ability to cancel PKI tidy operations, pause between tidying certs (#16958)
* Allow tidy operations to be cancelled

When tidy operations take a long time to execute (and especially when
executing them automatically), having the ability to cancel them becomes
useful to reduce strain on Vault clusters (and let them be rescheduled
at a later time).

To this end, we add the /tidy-cancel write endpoint.

Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>

* Add missing auto-tidy synopsis / description

Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>

* Add a pause duration between tidying certificates

By setting pause_duration, operators can have a little control over the
resource utilization of a tidy operation. While the list of certificates
remain in memory throughout the entire operation, a pause is added
between processing certificates and the revocation lock is released.
This allows other operations to occur during this gap and potentially
allows the tidy operation to consume less resources per unit of time
(due to the sleep -- though obviously consumes the same resources over
the time of the operation).

Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>

* Add tests for cancellation, pause

Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>

* Add API docs on pause_duration, /tidy-cancel

Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>

* Add changelog entry

Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>

* Add lock releasing around tidy pause

Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>

* Reset cancel guard, return errors

Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>

Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>
2022-08-31 11:36:12 -07:00
..
cmd/pki
backend.go Add ability to cancel PKI tidy operations, pause between tidying certs (#16958) 2022-08-31 11:36:12 -07:00
backend_test.go Add ability to cancel PKI tidy operations, pause between tidying certs (#16958) 2022-08-31 11:36:12 -07:00
ca_test.go Make PKI tests run in parallel (#16514) 2022-08-01 16:43:38 -04:00
ca_util.go Add PSS support to PKI Secrets Engine (#16519) 2022-08-03 12:42:24 -04:00
cert_util.go Support for generating Delta CRLs (#16773) 2022-08-29 11:37:09 -04:00
cert_util_test.go Make PKI tests run in parallel (#16514) 2022-08-01 16:43:38 -04:00
chain_test.go Cleanup changes around issuer revocation (#16874) 2022-08-25 11:36:37 -04:00
chain_util.go Fix CodeQL Errors - check allocation is smaller than 2^30 (#16869) 2022-08-26 13:26:11 -04:00
config_util.go Clean up behavior of If-Modified-Since header (#16929) 2022-08-30 13:25:36 -04:00
crl_test.go Add ability to perform automatic tidy operations (#16900) 2022-08-30 15:45:54 -04:00
crl_util.go Clean up behavior of If-Modified-Since header (#16929) 2022-08-30 13:25:36 -04:00
fields.go Add ability to cancel PKI tidy operations, pause between tidying certs (#16958) 2022-08-31 11:36:12 -07:00
integation_test.go Make PKI tests run in parallel (#16514) 2022-08-01 16:43:38 -04:00
key_util.go Refactor PKI storage calls to take a shared struct (#16019) 2022-06-29 12:00:44 -04:00
managed_key_util.go secret/pki: Return correct algorithm type from key fetch API for managed keys (#15468) 2022-05-17 11:36:14 -04:00
ocsp.go Add ocsp_expiry configuration field to PKI crl config (#16888) 2022-08-25 16:01:39 -04:00
ocsp_test.go Add ocsp_expiry configuration field to PKI crl config (#16888) 2022-08-25 16:01:39 -04:00
path_config_ca.go Refactor PKI storage calls to take a shared struct (#16019) 2022-06-29 12:00:44 -04:00
path_config_crl.go Support for generating Delta CRLs (#16773) 2022-08-29 11:37:09 -04:00
path_config_urls.go Add per-issuer AIA URI information to PKI secrets engine (#16563) 2022-08-19 11:43:44 -04:00
path_fetch.go Clean up behavior of If-Modified-Since header (#16929) 2022-08-30 13:25:36 -04:00
path_fetch_issuers.go Clean up behavior of If-Modified-Since header (#16929) 2022-08-30 13:25:36 -04:00
path_fetch_keys.go Refactor PKI storage calls to take a shared struct (#16019) 2022-06-29 12:00:44 -04:00
path_intermediate.go Add per-issuer AIA URI information to PKI secrets engine (#16563) 2022-08-19 11:43:44 -04:00
path_issue_sign.go Add remove_roots_from_chain to sign and issue pki apis (#16935) 2022-08-31 09:51:26 -04:00
path_manage_issuers.go Add per-issuer AIA URI information to PKI secrets engine (#16563) 2022-08-19 11:43:44 -04:00
path_manage_keys.go Refactor PKI storage calls to take a shared struct (#16019) 2022-06-29 12:00:44 -04:00
path_manage_keys_test.go Make PKI tests run in parallel (#16514) 2022-08-01 16:43:38 -04:00
path_revoke.go Add proof possession revocation for PKI secrets engine (#16566) 2022-08-16 14:01:26 -04:00
path_roles.go Add warning when generate_lease=true (#16398) 2022-08-08 13:26:10 -04:00
path_roles_test.go Make PKI tests run in parallel (#16514) 2022-08-01 16:43:38 -04:00
path_root.go Add per-issuer AIA URI information to PKI secrets engine (#16563) 2022-08-19 11:43:44 -04:00
path_sign_issuers.go Add PSS support to PKI Secrets Engine (#16519) 2022-08-03 12:42:24 -04:00
path_tidy.go Add ability to cancel PKI tidy operations, pause between tidying certs (#16958) 2022-08-31 11:36:12 -07:00
path_tidy_test.go Add ability to cancel PKI tidy operations, pause between tidying certs (#16958) 2022-08-31 11:36:12 -07:00
secret_certs.go
storage.go Add ability to perform automatic tidy operations (#16900) 2022-08-30 15:45:54 -04:00
storage_migrations.go Add an OCSP responder to Vault's PKI plugin (#16723) 2022-08-22 14:06:15 -04:00
storage_migrations_test.go Migrate existing PKI mounts that only contains a key (#16813) 2022-08-22 10:11:21 -07:00
storage_test.go Add an OCSP responder to Vault's PKI plugin (#16723) 2022-08-22 14:06:15 -04:00
test_helpers.go Add an OCSP responder to Vault's PKI plugin (#16723) 2022-08-22 14:06:15 -04:00
util.go Clean up behavior of If-Modified-Since header (#16929) 2022-08-30 13:25:36 -04:00