Skip to content

Fall back to the vendored PEM CA bundle for the system trust store - #558

Open
silug wants to merge 1 commit into
OpenVoxProject:mainfrom
silug:system-store-pem-fallback
Open

Fall back to the vendored PEM CA bundle for the system trust store#558
silug wants to merge 1 commit into
OpenVoxProject:mainfrom
silug:system-store-pem-fallback

Conversation

@silug

@silug silug commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Pull Request (PR) description

include_system_store requests from the server (report processors posting to external HTTPS endpoints, and any Puppet.runtime[:http] caller passing the option) stopped trusting publicly-signed certificates in the 9.0.0 betas, failing with PKIX path building errors. This is what broke acceptance/suites/tests/https/client_may_use_external_cert_chains.rb on all platforms in acceptance run 31098859281.

Root cause: Puppet::Server::Config.load_puppet_and_system_ssl_context builds the system trust by merging a vendored Java keystore from /opt/puppetlabs/puppet/ssl/puppet-cacerts, and puppet-runtime deliberately stopped shipping that keystore for the 9.x agent (puppet-runtime@066fd48, on the reasonable suspicion it was an unused PE-era artifact -- OpenVox does not package Java). The server was its one consumer; with the file absent the context silently degrades to puppet-CA-only trust with a single warning.

Fall back to the PEM CA bundle the runtime still ships at /opt/puppetlabs/puppet/ssl/cert.pem, loaded through the same SSLUtils reader already used for the ssl_trust_store setting. The keystore is still preferred when present, so 8.x-era agents are unaffected. Trust content is identical either way (both forms are generated from the same Mozilla bundle).

Verified against openvox-server 9.0.0~beta4 with the 9.0.0~beta2 agent on a local beaker rig: the isolated reproduction (puppetserver ruby fetching https://voxpupuli.org with include_system_store: true) fails with PKIX before and returns 200 after, and the full client_may_use_external_cert_chains.rb acceptance test passes with the patched jar.

Longer term this pairs with openvox#554 (stop bundling CA certificates): when that lands, this method should grow a further fallback to the system trust anchors. This change keeps 9.0 compatible with the trust behavior 8.x shipped.

Generated by Claude Code

This Pull Request (PR) fixes the following issues

N/A

include_system_store requests from the server (report processors posting to external HTTPS endpoints, and any Puppet.runtime[:http] caller passing the option) stopped trusting publicly-signed certificates in the 9.0.0 betas, failing with PKIX path building errors. This is what broke acceptance/suites/tests/https/client_may_use_external_cert_chains.rb on all platforms in acceptance run 31098859281.

Root cause: Puppet::Server::Config.load_puppet_and_system_ssl_context builds the system trust by merging a vendored Java keystore from /opt/puppetlabs/puppet/ssl/puppet-cacerts, and puppet-runtime deliberately stopped shipping that keystore for the 9.x agent (puppet-runtime@066fd48, on the reasonable suspicion it was an unused PE-era artifact -- OpenVox does not package Java). The server was its one consumer; with the file absent the context silently degrades to puppet-CA-only trust with a single warning.

Fall back to the PEM CA bundle the runtime still ships at /opt/puppetlabs/puppet/ssl/cert.pem, loaded through the same SSLUtils reader already used for the ssl_trust_store setting. The keystore is still preferred when present, so 8.x-era agents are unaffected. Trust content is identical either way (both forms are generated from the same Mozilla bundle).

Verified against openvox-server 9.0.0~beta4 with the 9.0.0~beta2 agent on a local beaker rig: the isolated reproduction (puppetserver ruby fetching https://voxpupuli.org with include_system_store: true) fails with PKIX before and returns 200 after, and the full client_may_use_external_cert_chains.rb acceptance test passes with the patched jar.

Longer term this pairs with openvox#554 (stop bundling CA certificates): when that lands, this method should grow a further fallback to the system trust anchors. This change keeps 9.0 compatible with the trust behavior 8.x shipped.

Signed-off-by: Steven Pritchard <steven.pritchard@gmail.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
@bastelfreak bastelfreak closed this Aug 7, 2026
@bastelfreak bastelfreak reopened this Aug 7, 2026
@bastelfreak bastelfreak mentioned this pull request Aug 7, 2026

class Puppet::Server::Config
PUPPET_KEYSTORE_LOCATION = '/opt/puppetlabs/puppet/ssl/puppet-cacerts'
PUPPET_CA_BUNDLE_LOCATION = '/opt/puppetlabs/puppet/ssl/cert.pem'

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Personally I think it's better to have a shared truststore for agent and server instead of two. Also handling Java keystores is annoying. But I am wondering if this could lead to any issues.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

If we stick to this, we can also remove PUPPET_KEYSTORE_LOCATION

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

Successfully merging this pull request may close these issues.

2 participants