44c3b736bf
* Allow tidy to backup legacy CA bundles With the new tidy_move_legacy_ca_bundle option, we'll use tidy to move the legacy CA bundle from /config/ca_bundle to /config/ca_bundle.bak. This does two things: 1. Removes ca_bundle from the hot-path of initialization after initial migration has completed. Because this entry is seal wrapped, this may result in performance improvements. 2. Allows recovery of this value in the event of some other failure with migration. Notably, this cannot occur during migration in the unlikely (and largely unsupported) case that the operator immediately downgrades to Vault <1.11.x. Thus, we reuse issuer_safety_buffer; while potentially long, tidy can always be run manually with a shorter buffer (and only this flag) to manually move the bundle if necessary. In the event of needing to recover or undo this operation, it is sufficient to use sys/raw to read the backed up value and subsequently write it to its old path (/config/ca_bundle). The new entry remains seal wrapped, but otherwise isn't used within the code and so has better performance characteristics. Performing a fat deletion (DELETE /root) will again remove the backup like the old legacy bundle, preserving its wipe characteristics. Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com> * Add changelog Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com> * Add documentation about new tidy parameter Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com> * Add tests for migration scenarios Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com> * Clean up time comparisons Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com> Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com> |
||
---|---|---|
.. | ||
cmd/pki | ||
backend.go | ||
backend_test.go | ||
ca_test.go | ||
ca_util.go | ||
cert_util.go | ||
cert_util_test.go | ||
chain_test.go | ||
chain_util.go | ||
config_util.go | ||
crl_test.go | ||
crl_util.go | ||
fields.go | ||
integration_test.go | ||
key_util.go | ||
managed_key_util.go | ||
ocsp.go | ||
ocsp_test.go | ||
path_config_ca.go | ||
path_config_cluster.go | ||
path_config_crl.go | ||
path_config_urls.go | ||
path_fetch.go | ||
path_fetch_issuers.go | ||
path_fetch_keys.go | ||
path_intermediate.go | ||
path_issue_sign.go | ||
path_manage_issuers.go | ||
path_manage_keys.go | ||
path_manage_keys_test.go | ||
path_resign_crls.go | ||
path_resign_crls_test.go | ||
path_revoke.go | ||
path_roles.go | ||
path_roles_test.go | ||
path_root.go | ||
path_sign_issuers.go | ||
path_tidy.go | ||
path_tidy_test.go | ||
secret_certs.go | ||
storage.go | ||
storage_migrations.go | ||
storage_migrations_test.go | ||
storage_test.go | ||
test_helpers.go | ||
util.go |