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 1612977 - katello-certs-check not showing full report
Summary: katello-certs-check not showing full report
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Certificates
Version: 6.4
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: 6.4.0
Assignee: Chris Roberts
QA Contact: Nikhil Kathole
URL: https://projects.theforeman.org/issue...
Whiteboard:
: 1612975 (view as bug list)
Depends On:
Blocks: 1619394
TreeView+ depends on / blocked
 
Reported: 2018-08-06 16:25 UTC by Chris Roberts
Modified: 2024-02-28 20:32 UTC (History)
6 users (show)

Fixed In Version: katello-installer-base-3.7.0.1-1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-10-16 19:23:00 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 24574 0 Normal Resolved katello-certs-check not showing full report 2020-06-02 12:54:39 UTC
Github Katello katello-installer pull 669 0 None closed Fixes #24574 - Update logic on Katello Certs Check output. 2020-06-02 12:54:39 UTC

Description Chris Roberts 2018-08-06 16:25:04 UTC
Description of problem:
Katello-certs-check not showing full results if certname = hostname

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


[root vm251-153 ~]# katello-certs-check -c root_ca/vm251-153.gsslab.pnq2.redhat.com.crt -k  SSL-est/server.key -b root_ca/ca-chain.crt.pem
Checking server certificate's encoding: [OK]
Checking expiration of certificate: [OK]
Checking expiration of CA bundle: [OK]
Checking if server cert has CA:TRUE flag[OK]
Validating the certificate subject= /C=IN/ST=Maharashtra/L=Pune/O=redhat LTD/OU=satellite/emailAddress=root localhost/CN=vm251-153.gsslab.pnq2.redhat.com
Checking to see if the private key matches the certificate: [OK]
Checking ca bundle against the cert file: [OK]
Checking Subject Alt Name on certificate[OK]
Checking Key Usage extension on certificate for Key Encipherment[OK]

  Validation succeeded.

  To use them inside a NEW $FOREMAN_PROXY, run this command:

      capsule-certs-generate --foreman-proxy-fqdn "$FOREMAN_PROXY"\
                                   --certs-tar  "~/$FOREMAN_PROXY-certs.tar"\
                                   --server-cert "/root/root_ca/vm251-153.gsslab.pnq2.redhat.com.crt"\
                                   --server-key "/root/SSL-est/server.key"\
                                   --server-ca-cert "/root/root_ca/ca-chain.crt.pem"\

  To use them inside an EXISTING $FOREMAN_PROXY, run this command INSTEAD:

      capsule-certs-generate --foreman-proxy-fqdn "$FOREMAN_PROXY"\
                                   --certs-tar  "~/$FOREMAN_PROXY-certs.tar"\
                                   --server-cert "/root/root_ca/vm251-153.gsslab.pnq2.redhat.com.crt"\
                                   --server-key "/root/SSL-est/server.key"\
                                   --server-ca-cert "/root/root_ca/ca-chain.crt.pem"\
                                   --certs-update-server

Comment 3 Brad Buckingham 2018-08-07 18:07:40 UTC
*** Bug 1612975 has been marked as a duplicate of this bug. ***

Comment 4 Ivan Necas 2018-08-08 15:37:28 UTC
I'm not sure I understand the bug report. What is the expected behaviour? Since it's marked as regression, what's the different behaviour comparing to 6.3?

Comment 5 Chris Roberts 2018-08-09 16:29:19 UTC
Ivan,

There was a logic flaw I had when I made it, I will make a PR so you can see the difference.

Comment 7 Nikhil Kathole 2018-08-31 08:51:58 UTC
Version tested:

Satellite 6.4 snap 19

When CN= hostname

Checking server certificate's encoding: [OK]
Checking expiration of certificate: [OK]
Checking expiration of CA bundle: [OK]
Checking if server cert has CA:TRUE flag[OK]
Validating the certificate subject= /C=IN/ST=Maharashtra/L=Pune/O=redhat/OU=QE/CN=<$hostname>
Checking to see if the private key matches the certificate: [OK]
Checking ca bundle against the cert file: [OK]
Checking Subject Alt Name on certificate[OK]
Checking Key Usage extension on certificate for Key Encipherment[OK]

Validation succeeded.

To install the Katello main server with the custom certificates, run:

    foreman-installer --scenario katello\
                      --certs-server-cert "/root/server.valid.crt"\
                      --certs-server-key "/root/server.key"\
                      --certs-server-ca-cert "/root/rootCA.pem"

To update the certificates on a currently running Katello installation, run:

    foreman-installer --scenario katello\
                      --certs-server-cert "/root/server.valid.crt"\
                      --certs-server-key "/root/server.key"\
                      --certs-server-ca-cert "/root/rootCA.pem"\
                      --certs-update-server --certs-update-server-ca

when CN != hostname

Checking server certificate's encoding: [OK]
Checking expiration of certificate: [OK]
Checking expiration of CA bundle: [OK]
Checking if server cert has CA:TRUE flag[OK]
Validating the certificate subject= /C=IN/ST=Maharashtra/L=Pune/O=redhat/OU=QE/CN=CAPSULE_FQDN
Checking to see if the private key matches the certificate: [OK]
Checking ca bundle against the cert file: [OK]
Checking Subject Alt Name on certificate[OK]
Checking Key Usage extension on certificate for Key Encipherment[OK]

  Validation succeeded.

  To use them inside a NEW $FOREMAN_PROXY, run this command:

      foreman-proxy-certs-generate --foreman-proxy-fqdn "$FOREMAN_PROXY"\
                                   --certs-tar  "~/$FOREMAN_PROXY-certs.tar"\
                                   --server-cert "/root/server.valid.crt"\
                                   --server-key "/root/server.key"\
                                   --server-ca-cert "/root/rootCA.pem"\

  To use them inside an EXISTING $FOREMAN_PROXY, run this command INSTEAD:

      foreman-proxy-certs-generate --foreman-proxy-fqdn "$FOREMAN_PROXY"\
                                   --certs-tar  "~/$FOREMAN_PROXY-certs.tar"\
                                   --server-cert "/root/server.valid.crt"\
                                   --server-key "/root/server.key"\
                                   --server-ca-cert "/root/rootCA.pem"\
                                   --certs-update-server

For branding issue, we are tracking https://bugzilla.redhat.com/show_bug.cgi?id=1600866#c4

Hi Chris, can you verify once above behaviour is correct? I feel also we need documentation issue for this as we are not showing commands for both capsule and satellite as before.

Comment 8 Chris Roberts 2018-09-04 13:24:04 UTC
Hi,

This is correct, we do not want to show both because it causes confusion for the customer. Since your hostname matches the sat we only show for the satellite installer, when not we show what to do to make capsule certs. I would mark this as verified.

Comment 9 Nikhil Kathole 2018-09-04 13:32:18 UTC
Thanks Chris. Marking as verified.

Also raised doc bug to change expected example output.

https://bugzilla.redhat.com/show_bug.cgi?id=1625255

Comment 10 Bryan Kearney 2018-10-16 19:23:00 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2018:2927


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