Skip to content
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

VaultPKISecret: include the CA chain (sans root) in 'tls.crt' #256

Merged
merged 3 commits into from
Jun 12, 2023

Conversation

tvoran
Copy link
Member

@tvoran tvoran commented Jun 9, 2023

When the destination type is "kubernetes.io/tls", construct tls.crt as certificate + ca_chain from the Vault issue response. (issuing_ca is used when ca_chain is empty.) Uses the remove_roots_from_chain=true option with Vault to exclude the root CA from the Vault response. The remove_roots_from_chain option was added in Vault 1.12.

Tested using the Build Your Own Certificate Authority Vault tutorial and nginx ingress.

When the destination type is "kubernetes.io/tls", construct 'tls.crt'
as 'certificate' + 'ca_chain' from the Vault issue response.
('issuing_ca' is used when 'ca_chain' is empty.) Uses the
'remove_roots_from_chain=true' option with Vault to exclude the root
CA from the Vault response.
@tvoran tvoran added enhancement New feature or request PKI PKI secrets labels Jun 9, 2023
@tvoran tvoran added this to the v0.1.0 milestone Jun 9, 2023
@tvoran tvoran requested a review from a team June 9, 2023 09:00
Copy link
Contributor

@kschoche kschoche left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great!
Ran it locally and ✅

@@ -11,7 +11,7 @@ spec:
vaultAuthRef: vaultauth-sample
namespace: tenant-1
mount: pki
name: default
role: default
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch!

@kschoche kschoche merged commit 759d950 into main Jun 12, 2023
@kschoche kschoche deleted the VAULT-17049/pki-include-ca branch June 12, 2023 14:05
@benashz benashz requested review from benashz and removed request for benashz June 12, 2023 17:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request PKI PKI secrets
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants