open-vault/builtin/logical/pki
Alexander Scheel 8acbf7f480
Add PSS support to PKI Secrets Engine (#16519)
* Add PSS signature support to Vault PKI engine

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

* Use issuer's RevocationSigAlg for CRL signing

We introduce a new parameter on issuers, revocation_signature_algorithm
to control the signature algorithm used during CRL signing. This is
because the SignatureAlgorithm value from the certificate itself is
incorrect for this purpose: a RSA root could sign an ECDSA intermediate
with say, SHA256WithRSA, but when the intermediate goes to sign a CRL,
it must use ECDSAWithSHA256 or equivalent instead of SHA256WithRSA. When
coupled with support for PSS-only keys, allowing the user to set the
signature algorithm value as desired seems like the best approach.

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

* Add use_pss, revocation_signature_algorithm docs

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

* Add PSS to signature role issuance test matrix

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

* Add changelog

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

* Allow roots to self-identify revocation alg

When using PSS support with a managed key, sometimes the underlying
device will not support PKCS#1v1.5 signatures. This results in CRL
building failing, unless we update the entry's signature algorithm
prior to building the CRL for the new root.

With a RSA-type key and use_pss=true, we use the signature bits value to
decide which hash function to use for PSS support.

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

* Add clearer error message on failed import

When CRL building fails during cert/key import, due to PSS failures,
give a better indication to the user that import succeeded its just CRL
building that failed. This tells them the parameter to adjust on the
issuer and warns that CRL building will fail until this is fixed.

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

* Add case insensitive SigAlgo matching

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

* Convert UsePSS back to regular bool

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

* Refactor PSS->certTemplate into helper function

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

* Proper string output on rev_sig_alg display

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

* Copy root's SignatureAlgorithm for CRL building

Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>
2022-08-03 12:42:24 -04:00
..
cmd/pki Update to api 1.0.1 and sdk 0.1.8 2019-04-15 14:10:07 -04:00
backend.go Allow issuer/:issuer_ref/sign-verbatim/:role, add error on missing role (#15543) 2022-05-23 13:09:18 -04:00
backend_test.go Add PSS support to PKI Secrets Engine (#16519) 2022-08-03 12:42:24 -04: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 Add PSS support to PKI Secrets Engine (#16519) 2022-08-03 12:42:24 -04:00
cert_util_test.go Make PKI tests run in parallel (#16514) 2022-08-01 16:43:38 -04:00
chain_test.go Allow old certs to be cross-signed (#16494) 2022-08-03 06:34:21 -07:00
chain_util.go Refactor PKI storage calls to take a shared struct (#16019) 2022-06-29 12:00:44 -04:00
config_util.go Refactor PKI storage calls to take a shared struct (#16019) 2022-06-29 12:00:44 -04:00
crl_test.go Add PSS support to PKI Secrets Engine (#16519) 2022-08-03 12:42:24 -04:00
crl_util.go Add PSS support to PKI Secrets Engine (#16519) 2022-08-03 12:42:24 -04:00
fields.go Add PSS support to PKI Secrets Engine (#16519) 2022-08-03 12:42:24 -04: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
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 Remove structs, mapstructure from PKI storage (#16190) 2022-06-29 15:05:31 -04:00
path_config_urls.go Remove structs, mapstructure from PKI storage (#16190) 2022-06-29 15:05:31 -04:00
path_fetch.go Refactor PKI storage calls to take a shared struct (#16019) 2022-06-29 12:00:44 -04:00
path_fetch_issuers.go Add PSS support to PKI Secrets Engine (#16519) 2022-08-03 12:42:24 -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 PSS support to PKI Secrets Engine (#16519) 2022-08-03 12:42:24 -04:00
path_issue_sign.go Add PSS support to PKI Secrets Engine (#16519) 2022-08-03 12:42:24 -04:00
path_manage_issuers.go Add PSS support to PKI Secrets Engine (#16519) 2022-08-03 12:42:24 -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 Allow Multiple Issuers in PKI Secret Engine Mounts - PKI Pod (#15277) 2022-05-11 12:42:28 -04:00
path_roles.go Add PSS support to PKI Secrets Engine (#16519) 2022-08-03 12:42:24 -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 PSS support to PKI Secrets Engine (#16519) 2022-08-03 12:42:24 -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 warning on missing tidy targets (#16164) 2022-06-27 17:42:41 -04:00
secret_certs.go Allow Multiple Issuers in PKI Secret Engine Mounts - PKI Pod (#15277) 2022-05-11 12:42:28 -04:00
storage.go Add PSS support to PKI Secrets Engine (#16519) 2022-08-03 12:42:24 -04:00
storage_migrations.go Remove structs, mapstructure from PKI storage (#16190) 2022-06-29 15:05:31 -04:00
storage_migrations_test.go Make PKI tests run in parallel (#16514) 2022-08-01 16:43:38 -04:00
storage_test.go Make PKI tests run in parallel (#16514) 2022-08-01 16:43:38 -04:00
test_helpers.go Add PSS support to PKI Secrets Engine (#16519) 2022-08-03 12:42:24 -04:00
util.go Refactor PKI storage calls to take a shared struct (#16019) 2022-06-29 12:00:44 -04:00