Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 1946883

Summary: Puppet update wrong cert in foreman-scap-client configuration file on rhel 8.3 client
Product: Red Hat Satellite Reporter: Ranjan Kumar <rankumar>
Component: SCAP PluginAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED DUPLICATE QA Contact: Jameer Pathan <jpathan>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.8.0CC: mhulan, oprazak
Target Milestone: Unspecified   
Target Release: Unused   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-04-15 14:23:36 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Ranjan Kumar 2021-04-07 06:45:04 UTC
Description of problem: Running "puppet agent -tv" on the foreman-scap-client host(RHEL 8.3) update wrong cert in config file. client is subscribe with satellite.

Here is content of /etc/foreman_scap_client/config.yaml

:ca_file: '/var/lib/puppet/ssl/certs/ca.pem'
:host_certificate: '/var/lib/puppet/ssl/certs/myhost.example.com.pem'
:host_private_key: '/var/lib/puppet/ssl/private_keys/myhost.example.com.pem'


Version-Release number of selected component (if applicable): Satellite 6.8


How reproducible: Always


Steps to Reproduce:
1. Register a RHEL 8.3 host to satellite
2. Apply foreman_scap_client class on any host having RHEL version 8.3
3. run puppet agent -tv on the client
4. run foreman-scap-client <id> on the client. It fails with error
SCAP content is missing and download failed with error: SSL_connect returned=1 errno=0 state=error: certificate verify failed (unable to get local issuer certificate)


Actual results: foremna-scap-client fails with error


Expected results: foreman-scap-client should work on RHEL 8.3

Comment 1 Ranjan Kumar 2021-04-07 06:48:09 UTC
Workaround:

vi /usr/share/puppet/modules/foreman_scap_client/lib/facter/rh_certificates.rb

Change line number 6

From
data = Facter::Util::Resolution.exec('subscription-manager config')
To
data = Facter::Util::Resolution.exec('subscription-manager config --list')