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

Contact Vault with Self-signed CA #90

Open
valentin2105 opened this issue Dec 15, 2023 · 2 comments
Open

Contact Vault with Self-signed CA #90

valentin2105 opened this issue Dec 15, 2023 · 2 comments

Comments

@valentin2105
Copy link

valentin2105 commented Dec 15, 2023

Hello,

First of all, thanks for the module.

I'm trying to make this module work with a Vault Cluster exposing port 8200 with a Self-signed CA .

For the Deferred mode, It work after modifying the puppet.conf of the agent , by adding localcacert pointing to my CA, in the main section.

But for the "Puppet server mode" (without Deferred), (which I need because the configuration file that I want to deploy is a ERB template and the Deferred seem not work in this mode because its created on the server side.)

It give us Java errors :

Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

I tried adding the CA and even the vault node certificate in the Java Keystore, but it seem ignored. (after server restart)

Any feedback on this ?

I read that we need to use puppet'CA, but in my case, we have a specific CA different from the puppet one, and have to use it.

@valentin2105 valentin2105 changed the title Contact Vault with Custom CA Contact Vault with Self-signed CA Dec 15, 2023
@cgaspar-deshaw
Copy link

You don't want to evaluate the EPP server side, as that exposes the secrets to the compile server. Do something like:

content => Deferred('inline_epp', [file($my_epp_path), $parameters])

We also have a ruby function to find the template file based on Puppet::Parser::Files.find_template(file, scope.compiler.environment) to make the above more ergonomic.

All of this really should be easier.

@valentin2105
Copy link
Author

I succeeded connect my Puppet to Vault by using the Puppet certificates to Vault TLS.
And I avoid Deferred because our Puppet recipes are writted in only ERB template. (and too much work to move to EPP).

I would be nice to be able to add the Vault CA on the PuppetServer keystore ?

Nobody have achieved that ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants