Skip to content

fix: do not treat clientcert as a legacy network fact in puppet lookup#9579

Open
raman1236 wants to merge 1 commit intopuppetlabs:mainfrom
raman1236:fix/lookup-clientcert-not-legacy
Open

fix: do not treat clientcert as a legacy network fact in puppet lookup#9579
raman1236 wants to merge 1 commit intopuppetlabs:mainfrom
raman1236:fix/lookup-clientcert-not-legacy

Conversation

@raman1236
Copy link
Copy Markdown

Description

Remove clientcert from TRUSTED_INFORMATION_FACTS in puppet lookup so that its presence in a --facts file does not require hostname, domain, and fqdn to also be present.

Problem

In Puppet 8, legacy facts (hostname, domain, fqdn) are no longer calculated by default. However, clientcert is still present in cached facts because it's set by puppet agent (not facter).

When running puppet lookup --facts <facts_file>, if the facts file contains clientcert but not the other three facts, puppet raises:

When overriding any of the hostname,domain,fqdn,clientcert facts ... they must all be overridden.

Removing clientcert works around the error, but then $trusted['certname'] is broken.

Fix

Remove clientcert from TRUSTED_INFORMATION_FACTS. It is not a facter fact and should not be grouped with the network addressing facts (hostname, domain, fqdn).

Tests

Updated existing tests and added a new test verifying that providing only clientcert without the other facts does not raise an error.

Fixes #9564

Remove clientcert from TRUSTED_INFORMATION_FACTS so that its presence
in a --facts file does not require hostname, domain, and fqdn to also
be present.

clientcert is not a facter fact but is set by puppet agent. In puppet 8,
legacy facts (hostname, domain, fqdn) are no longer calculated by
default, but clientcert is still present in cached facts. This caused
puppet lookup to fail with 'they must all be overridden' when using
cached facts.

Fixes puppetlabs#9564
@raman1236 raman1236 requested a review from a team as a code owner April 5, 2026 23:52
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.

puppet8-lookup considers clientcert to be a legacy fact

2 participants