This bug has been migrated to another issue tracking site. It has been closed here and may no longer be being monitored.

If you would like to get updates for this issue, or to participate in it, you may do so at Red Hat Issue Tracker .
Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 2128595 - puppet_server_certname not used for defaults of foreman-proxy-puppet-ssl-key and foreman-proxy-puppet-ssl-cert
Summary: puppet_server_certname not used for defaults of foreman-proxy-puppet-ssl-key ...
Keywords:
Status: CLOSED MIGRATED
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Puppet
Version: 6.11.0
Hardware: Unspecified
OS: Linux
medium
medium
Target Milestone: Unspecified
Assignee: satellite6-bugs
QA Contact: Satellite QE Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-09-21 08:28 UTC by Anand Kulkarni
Modified: 2024-06-06 12:34 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2024-06-06 12:34:44 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker   SAT-25420 0 None Migrated None 2024-06-06 12:34:42 UTC

Description Anand Kulkarni 2022-09-21 08:28:09 UTC
Description of problem: puppet_server_certname not used for defaults of foreman-proxy-puppet-ssl-key and foreman-proxy-puppet-ssl-cert.

- Configure the Red Hat Satellite 6.11 to use a friendly CNAME for all URLs.

- On place where we see that the defaults are not inheriting the Certificate Name server is the Foreman-Proxy-Puppet part that is not inheriting the Puppet-Server-Certname value for the keys.

After setting puppet_server_certname to sat6.example.com the installer nicely generates the certificate files under that name:

~~~
# ls -l /etc/puppetlabs/puppet/ssl/certs/
total 8
-rw-r--r--. 1 puppet puppet 3866 Sep 15 07:37 ca.pem
-rw-r--r--. 1 puppet puppet 2061 Sep 15 07:37 sat6.example.com
~~~

- But later in the foreman-proxy it fails to load the files because it is still using the original FQDN based file:

~~~
2022-09-15T07:38:33  [W] Error details for Disabling all modules in the group ['puppet_proxy_puppet_api', 'puppet'] due to a failure in one of them: File at '/etc/puppetlabs/puppet/ssl/certs/satellite.example.com.pem' defined in 'puppet_ssl_cert' parameter doesn't exist or is unreadable: <Proxy::Error::ConfigurationError>: File at '/etc/puppetlabs/puppet/ssl/certs/satellite.example.com.pem' defined in 'puppet_ssl_cert' parameter doesn't exist or is unreadable
~~~

Version-Release number of selected component (if applicable): Red Hat Satellite 6.11


How reproducible: Yes.

Steps to Reproduce:

-Run satellite-installer --puppet_server_certname=sat6.example.com --reset-foreman-proxy-puppet-ssl-cert --reset-foreman-proxy-puppet-ssl-key

Actual results:
- The file '/etc/puppetlabs/puppet/ssl/certs/mysat6server.example.com.pem' is correctly created
- The proxy fails (can be seen in /var/log/foreman-proxy/proxy.log)  because it still tries to read /etc/puppetlabs/puppet/ssl/private_keys/<fqdn>.com.pem"
- 'satellite-installer --full-help | grep proxy-puppet-ssl'  still shows defaults with FQDN instead of the certname.


Expected results:

- The defaults for certificate file names use the configured 'certname'  value for which the installer is also generating the files.


Additional info:

The reason is that the installer has for the puppet ssl certificates 'hardcoded' the FQDN in the name, also for the default value to reset it:

~~~~
# satellite-installer --full-help | grep proxy-puppet-ssl
    --foreman-proxy-puppet-ssl-ca  SSL CA used to verify connections when accessing the Puppet master API (current: "/etc/puppetlabs/puppet/ssl/certs/ca.pem")
    --reset-foreman-proxy-puppet-ssl-ca Reset puppet_ssl_ca to the default value ("/etc/puppetlabs/puppet/ssl/certs/ca.pem")
    --foreman-proxy-puppet-ssl-cert  SSL certificate used when accessing the Puppet master API (current: "/etc/puppetlabs/puppet/ssl/certs/satellite.example.com.pem")
    --reset-foreman-proxy-puppet-ssl-cert Reset puppet_ssl_cert to the default value ("/etc/puppetlabs/puppet/ssl/certs/satellite.example.com.pem")
    --foreman-proxy-puppet-ssl-key  SSL private key used when accessing the Puppet master API (current: "/etc/puppetlabs/puppet/ssl/private_keys/satellite.example.com.pem")
    --reset-foreman-proxy-puppet-ssl-key Reset puppet_ssl_key to the default value ("/etc/puppetlabs/puppet/ssl/private_keys/satellite.example.com.pem")
~~~~

Workaround:
- Add manually the 'foreman-proxy-puppet-ssl-key' and 'foreman-proxy-puppet-ssl-cert' to the satellite-installer to configure the correct SSL files for foreman-proxy-puppet part

Comment 1 Eric Helms 2024-06-06 12:34:44 UTC
This BZ has been automatically migrated to the issues.redhat.com Red Hat Issue Tracker. All future work related to this report will be managed there.

Due to differences in account names between systems, some fields were not replicated.  Be sure to add yourself to Jira issue's "Watchers" field to continue receiving updates and add others to the "Need Info From" field to continue requesting information.

To find the migrated issue, look in the "Links" section for a direct link to the new issue location. The issue key will have an icon of 2 footprints next to it, and begin with "SAT-" followed by an integer.  You can also find this issue by visiting https://issues.redhat.com/issues/?jql= and searching the "Bugzilla Bug" field for this BZ's number, e.g. a search like:

"Bugzilla Bug" = 1234567

In the event you have trouble locating or viewing this issue, you can file an issue by sending mail to rh-issues. You can also visit https://access.redhat.com/articles/7032570 for general account information.


Note You need to log in before you can comment on or make changes to this bug.