open-vault/command/healthcheck
Alexander Scheel 5ee7cc5e6d
Various health check improvements + tests (#18096)
* Rename common.go->healthcheck.go

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

* Push handling of no resources to the health checks

This allows us to better run on empty mounts.

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

* Exit when no issuers are found

This makes health checks less useful.

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

* Add additional test criteria, refactor tests

This will allow us to setup more tests.

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

* Add more OK statuses when checks are good

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

* Add test cases for all bad results

The test for too-many-certs was elided for now due to being too hard to
setup in CI.

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

* Add test for missing mount

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

* Add expected failure test on empty mount

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

* Add test for only having an issuer in the mount

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

* More consistently perform permission checks

Also return them to the caller when they're relevant.

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

* Add test without token

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

* Run health check tests in parallel

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

* Update command/healthcheck/healthcheck.go

Co-authored-by: Steven Clark <steven.clark@hashicorp.com>

* Update command/healthcheck/healthcheck.go

Co-authored-by: Steven Clark <steven.clark@hashicorp.com>

Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>
Co-authored-by: Steven Clark <steven.clark@hashicorp.com>
2022-11-23 14:42:19 +00:00
..
healthcheck.go Various health check improvements + tests (#18096) 2022-11-23 14:42:19 +00:00
pki.go Various health check improvements + tests (#18096) 2022-11-23 14:42:19 +00:00
pki_allow_if_modified_since.go Various health check improvements + tests (#18096) 2022-11-23 14:42:19 +00:00
pki_audit_visibility.go Various health check improvements + tests (#18096) 2022-11-23 14:42:19 +00:00
pki_ca_validity_period.go Rename PKI health check helpers (#18017) 2022-11-18 13:42:48 -05:00
pki_crl_validity_period.go Rename PKI health check helpers (#18017) 2022-11-18 13:42:48 -05:00
pki_enable_auto_tidy.go Various health check improvements + tests (#18096) 2022-11-23 14:42:19 +00:00
pki_hardware_backed_root.go Rename PKI health check helpers (#18017) 2022-11-18 13:42:48 -05:00
pki_role_allows_glob_wildcards.go Various health check improvements + tests (#18096) 2022-11-23 14:42:19 +00:00
pki_role_allows_localhost.go Various health check improvements + tests (#18096) 2022-11-23 14:42:19 +00:00
pki_role_no_store_false.go Various health check improvements + tests (#18096) 2022-11-23 14:42:19 +00:00
pki_root_issued_leaves.go Various health check improvements + tests (#18096) 2022-11-23 14:42:19 +00:00
pki_tidy_last_run.go Various health check improvements + tests (#18096) 2022-11-23 14:42:19 +00:00
pki_too_many_certs.go Rename PKI health check helpers (#18017) 2022-11-18 13:42:48 -05:00
shared.go Add mount tuning health checks (#17902) 2022-11-22 15:44:34 +00:00
util.go