open-vault/builtin/logical/pki
Scott Miller b51b2a7027
Add cached OCSP client support to Cert Auth (#17093)
* wip

* Add cached OCSP client support to Cert Auth

* ->pointer

* Code cleanup

* Fix unit tests

* Use an LRU cache, and only persist up to 1000 of the most recently used values to stay under the storage entry limit

* Fix caching, add fail open mode parameter to cert auth roles

* reduce logging

* Add the retry client and GET then POST logic

* Drop persisted cache, make cache size configurable, allow for parallel testing of multiple servers

* dead code

* Update builtin/credential/cert/path_certs.go

Co-authored-by: Alexander Scheel <alex.scheel@hashicorp.com>

* Hook invalidate to reinit the ocsp cache size

* locking

* Conditionally init the ocsp client

* Remove cache size config from cert configs, it's a backend global

* Add field

* Remove strangely complex validity logic

* Address more feedback

* Rework error returning logic

* More edge cases

* MORE edge cases

* Add a test matrix with a builtin responder

* changelog

* Use an atomic for configUpdated

* Actually use ocsp_enabled, and bind to a random port for testing

* Update builtin/credential/cert/path_login.go

Co-authored-by: Alexander Scheel <alex.scheel@hashicorp.com>

* Refactor unit tests

* Add status to cache

* Make some functions private

* Rename for testing, and attribute

* Up to date gofumpt

* remove hash from key, and disable the vault dependent unit test

* Comment out TestMultiOCSP

* imports

* more imports

* Address semgrep results

* Attempt to pass some sort of logging to test_responder

* fix overzealous search&replace

Co-authored-by: Alexander Scheel <alex.scheel@hashicorp.com>
2022-11-21 10:39:24 -06:00
..
cmd/pki
backend.go Add new PKI api to combine and sign different CRLs from the same issuer (#17813) 2022-11-17 16:53:05 -05:00
backend_test.go Move pki docker tests to pkiext (#17928) 2022-11-14 18:26:26 -05:00
ca_test.go
ca_util.go
cert_util.go Prevent PSS with Go-incompatible CAs, CSRs, Private Keys (#17223) 2022-09-20 17:30:58 -04:00
cert_util_test.go Move pki docker tests to pkiext (#17928) 2022-11-14 18:26:26 -05:00
chain_test.go Move pki docker tests to pkiext (#17928) 2022-11-14 18:26:26 -05:00
chain_util.go PKI - Fix order of chain building writes (#17772) 2022-11-03 11:50:03 -04:00
config_util.go Handle removed default issuers (#17930) 2022-11-14 15:13:39 -05:00
crl_test.go Move pki docker tests to pkiext (#17928) 2022-11-14 18:26:26 -05:00
crl_util.go Move from %v->%w for errs (#17860) 2022-11-09 15:40:26 -05:00
fields.go Add automatic tidy of expired issuers (#17823) 2022-11-10 10:53:26 -05:00
integation_test.go Move pki docker tests to pkiext (#17928) 2022-11-14 18:26:26 -05:00
key_util.go
managed_key_util.go
ocsp.go Unit tests that validate OCSP signatures leverage revocation signature algo (#17452) 2022-10-07 12:33:17 -04:00
ocsp_test.go Add cached OCSP client support to Cert Auth (#17093) 2022-11-21 10:39:24 -06:00
path_config_ca.go Move from %v->%w for errs (#17860) 2022-11-09 15:40:26 -05:00
path_config_crl.go Fix various trivial warnings from staticcheck in the PKI plugin (#16946) 2022-08-31 16:25:14 -04:00
path_config_urls.go
path_fetch.go Return revocation info within existing certs/<serial> api (#17774) 2022-11-02 13:06:04 -04:00
path_fetch_issuers.go Move from %v->%w for errs (#17860) 2022-11-09 15:40:26 -05:00
path_fetch_keys.go
path_intermediate.go PKI: Add support for signature_bits param to the intermediate/generate api (#17388) 2022-10-03 12:39:54 -04:00
path_issue_sign.go Basics of Cert-Count Non-Locking Telemetry (#16676) 2022-09-20 10:32:20 -07:00
path_manage_issuers.go Move from %v->%w for errs (#17860) 2022-11-09 15:40:26 -05:00
path_manage_keys.go
path_manage_keys_test.go Move pki docker tests to pkiext (#17928) 2022-11-14 18:26:26 -05:00
path_resign_crls.go Add new PKI api to combine and sign different CRLs from the same issuer (#17813) 2022-11-17 16:53:05 -05:00
path_resign_crls_test.go Add new PKI api to combine and sign different CRLs from the same issuer (#17813) 2022-11-17 16:53:05 -05:00
path_revoke.go Move from %v->%w for errs (#17860) 2022-11-09 15:40:26 -05:00
path_roles.go Fix various trivial warnings from staticcheck in the PKI plugin (#16946) 2022-08-31 16:25:14 -04:00
path_roles_test.go Move pki docker tests to pkiext (#17928) 2022-11-14 18:26:26 -05:00
path_root.go Move from %v->%w for errs (#17860) 2022-11-09 15:40:26 -05:00
path_sign_issuers.go
path_tidy.go Add automatic tidy of expired issuers (#17823) 2022-11-10 10:53:26 -05:00
path_tidy_test.go Move pki docker tests to pkiext (#17928) 2022-11-14 18:26:26 -05:00
secret_certs.go
storage.go Add automatic tidy of expired issuers (#17823) 2022-11-10 10:53:26 -05:00
storage_migrations.go PKI - Fix order of chain building writes (#17772) 2022-11-03 11:50:03 -04:00
storage_migrations_test.go Move pki docker tests to pkiext (#17928) 2022-11-14 18:26:26 -05:00
storage_test.go Move pki docker tests to pkiext (#17928) 2022-11-14 18:26:26 -05:00
test_helpers.go Add new PKI api to combine and sign different CRLs from the same issuer (#17813) 2022-11-17 16:53:05 -05:00
util.go Move from %v->%w for errs (#17860) 2022-11-09 15:40:26 -05:00