-
Notifications
You must be signed in to change notification settings - Fork 73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Invalid certificate chain when using Vault with Intermediate CA #155
Comments
I'm encountering this issue too with the following versions:
|
Update: I was able to fix the issue by combining the intermediate certificate and the root certificate and passing the resulting file to Istio CSR as rootCAFile.
As shown in atoy3731's openssl s_client log dump, the intermediate certificate is printed twice, but both openssl and curl are happy.
|
While was trying to setup similar thing in our infrastructure stumbled upon an explanation for this issue:
While your solution works and follows all the security recommendations from the cert-manager to extract root CA - the proper answer might also be to change the vault configuration. In other words, when you set the signed certificate to the intermediate PKI backend - you should also add the root certificate to the chain. When generating a signed intermediary - adjust what is included in Instead of: vault write -format=json pki/root/sign-intermediate csr=@pki_intermediate.csr \
format=pem_bundle ttl="43800h" \
| jq -r '.data.certificate' > intermediate.cert.pem Use this: vault write -format=json pki/root/sign-intermediate csr=@pki_intermediate.csr \
format=pem_bundle ttl="43800h" \
| jq -r '.data.certificate, .data.issuing_ca' > intermediate.cert.pem |
@kekbur why are you getting : Verify return code: 19 (self signed certificate in certificate chain) ? even when using Vault CA |
Versions:
I'm using the following script to try to test using Vault for my Istio CA, but when using
curl
to between 2 istio-injected pods, I getCERTIFICATE_VERIFY_FAILED
:When running this command to test:
It appears the certificate chain is invalid and it can't get the local issuer certificate:
This only seems to be an issue when I'm using the intermediate CA from the above script. If I configure my issuer to use the root CA directly, things work as expected. For transparency, here's my issuer:
The text was updated successfully, but these errors were encountered: