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

Allow cert_file to download certificates via https #146

Merged
merged 1 commit into from Dec 6, 2022

Conversation

rtib
Copy link
Contributor

@rtib rtib commented Aug 30, 2022

Pull Request (PR) description

Accept server certificates signed by trusted third-parties when receiving remote certificates via https.

This Pull Request (PR) fixes the following issues

When getting a remote certificate via https, by default the http client trusts the PuppetCA only, thus downloading files from a server using certificates signed by a third-party would fail. This patch allows the Puppet HTTP client to trust a server using a certificate signed by any CA trusted by the system.

Copy link
Member

@smortex smortex left a comment

Choose a reason for hiding this comment

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

This usage of include_system_store is quite recent, we should update the required version of Puppet accordingly in metadata.json. Available in 6.27.0+ and 7.16.0+. I think we can only set a single lower bound unfortunately.

@rtib
Copy link
Contributor Author

rtib commented Aug 31, 2022

Yeah, I've also thought about that, but I assume Puppet::HTTP::Client to ignore options which are not supported, thus the behaviour of earlier agent versions might not change. IMO, this is the alternative causing the least pain at all.

I was considering two alternatives to this:

  1. instead of include_system_store we could add ssl_context: { verify_peer: false }
  2. we could implement a version switch that adds one of the above options depending on the current agent version

I'm not very happy with those approaches and like the idea of getting this feature only on recent agents and ignored by older ones.

@smortex
Copy link
Member

smortex commented Aug 31, 2022

I'm not very happy with those approaches and like the idea of getting this feature only on recent agents and ignored by older ones.

Yeah, the alternatives suck. If it works well with older versions of Puppet this is probably fine, only improving the situation for newer Puppet.

@smortex smortex added the enhancement New feature or request label Dec 6, 2022
@smortex smortex merged commit d556099 into voxpupuli:master Dec 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants