43e722c69a
* Refactor tidy steps into two separate helpers This refactors the tidy go routine into two separate helpers, making it clear where the boundaries of each are: variables are passed into these method and concerns are separated. As more operations are rolled into tidy, we can continue adding more helpers as appropriate. Additionally, as we move to make auto-tidy occur, we can use these as points to hook into periodic tidying. Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com> * Refactor revInfo checking to helper This allows us to validate whether or not a revInfo entry contains a presently valid issuer, from the existing mapping. Coupled with the changeset to identify the issuer on revocation, we can begin adding capabilities to tidy to update this association, decreasing CRL build time and increasing the performance of OCSP. Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com> * Refactor issuer fetching for revocation purposes Revocation needs to gracefully handle using the old legacy cert bundle, so fetching issuers (and parsing them) needs to be done slightly differently than other places. Refactor this from revokeCert into a common helper that can be used by tidy. Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com> * Allow tidy to associate revoked certs, issuers When revoking a certificate, we need to associate the issuer that signed its certificate back to the revInfo entry. Historically this was performed during CRL building (and still remains so), but when running without CRL building and with only OCSP, performance will degrade as the issuer needs to be found each time. Instead, allow the tidy operation to take over this role, allowing us to increase the performance of OCSP and CRL in this scenario, by decoupling issuer identification from CRL building in the ideal case. Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com> * Add tests for tidy updates Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com> * Add changelog entry Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com> * Add documentation on new tidy parameter, metrics Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com> * Refactor tidy config into shared struct Finish adding metrics, status messages about new tidy operation. 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 | ||
integation_test.go | ||
key_util.go | ||
managed_key_util.go | ||
ocsp.go | ||
ocsp_test.go | ||
path_config_ca.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_revoke.go | ||
path_roles.go | ||
path_roles_test.go | ||
path_root.go | ||
path_sign_issuers.go | ||
path_tidy.go | ||
secret_certs.go | ||
storage.go | ||
storage_migrations.go | ||
storage_migrations_test.go | ||
storage_test.go | ||
test_helpers.go | ||
util.go |