Cannot issue intermediates from cross-signed intermediate due to error validating chain #28749
Labels
bug
Used to indicate a potential bug
reproduced
This issue has been reproduced by a Vault engineer
secret/pki
Describe the bug
I've followed the Build your own CA tutorial, and set up a cross-signed intermediate using a new root. In the tutorial this involves setting the
manual_chain
attribute on both the existing and cross-signed intermediate so that when new intermediate or leaf certs are issued, the chain includes the multiple trust paths to both roots.The problem comes if you want to issue a new intermediate from an intermediate that has multiple trust paths. The following error occurs when attempting to sign a CSR using an intermediate with multiple trust paths:
Reading the code that verifies the chain, it looks like it only handles a single trust path:
vault/sdk/helper/certutil/types.go
Lines 388 to 398 in 9097689
To Reproduce
Steps to reproduce the behavior:
manual_chain
attribute by running:vault secrets enable -path=pki_int_two pki
vault secrets tune -max-lease-ttl=43800h pki_int_two
Expected behavior
The sign-intermediate command should sign the new intermediate.
Instead we get
verification of parsed bundle failed: certificate 2 of certificate chain ca trust path is incorrect
.Environment:
vault status
): 1.16.11 (but also reproduced withmain
branch, currently 1.19.0-beta1)vault version
): 1.17.3The text was updated successfully, but these errors were encountered: