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 1658360 - katello-certs-check is not showing satellite-installer command if wildcard SSL certificate is used.
Summary: katello-certs-check is not showing satellite-installer command if wildcard SS...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Certificates
Version: 6.4
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: Unspecified
Assignee: Chris Roberts
QA Contact: Omkar Khatavkar
URL:
Whiteboard:
: 1758181 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-12-11 20:38 UTC by Anto P Joseph
Modified: 2024-02-28 20:32 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-11-17 20:54:56 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Anto P Joseph 2018-12-11 20:38:22 UTC
Description of problem:

katello-certs-check is not showing satellite-installer command if wildcard SSL certificate is used.


Satellite FQDN(hostname) : satellite.example.com
Wildcard certificates (Subject: CN = *.example.com)


Running katello-certs-check
# katello-certs-check -c wildcard_sat.crt -k wildcard_sat.key -b chain.cert

  > validation succeeded

is printing the only capsule related commands.

=============
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 "~/wildcard_sat.crt"\
                                   --server-key "~/wildcard_sat.key"\
                                   --server-ca-cert "chain.cert"\

  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 "~/wildcard_sat.crt"\
                                   --server-key "~/wildcard_sat.key"\
                                   --server-ca-cert "chain.cert"\
                                   --certs-update-server
==============


Upon checking following changes noticed.


======== vim /usr/sbin/katello-certs-check

# Script is ending with Following conditions


#In Satellite 6.2

if [ $EXIT_CODE == "0" ]; then 	 >>>> satellite-installer command & capsule-cert-generate commands


#In Satellite 6.4
if [ $EXIT_CODE == "0" -a $CERT_HOSTNAME == $HOSTNAME ]; then    >>>>  satellite installer command

ISSUE : WildCard doesn't fall under this  $CERT_HOSTNAME != $HOSTNAME   (*.example.com != satellite.example.com)
---

elif [ $EXIT_CODE == "0" ]; then     >>>>   capsule certs-generate command printed

========

Is this expected? Planned from Satellite 6.4?


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


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:

If wildcard SSL is used, katello-certs-check is returning EXAMPLE "capsule-certs-check" commands only.

Expected results:

katello-certs-check should return EXAMPLES of "satellite-installer" and "capsule-certs-check" commands.

Additional info:

Comment 9 whitedm 2019-09-18 18:04:26 UTC
The symptoms described in this bug affect Satellite 6.5.1, as I just worked with Red Hat Support to install a wildcard cert onto our existing Satellite server.
(As an aside, RHEL support was able to give me the `satellite-installer` command, and I now have my SSL cert installed -- I'm not requesting support in this post, but am rather providing additional information).

The 'katello-certs-check' output validated everything, but this line is interesting:

/sbin/katello-certs-check: line 168: [: too many arguments


Full stdout from katello-certs-check -c foo.crt -k foo.key -b foo.ca-bundle:


Checking server certificate encoding: 
[OK]

Checking expiration of certificate: 
[OK]

Checking expiration of CA bundle: 
[OK]

Checking if server certificate has CA:TRUE flag 
[OK]

Checking to see if the private key matches the certificate: 
[OK]

Checking CA bundle against the certificate file: 
[OK]

Checking Subject Alt Name on certificate 
[OK]

Checking Key Usage extension on certificate for Key Encipherment 
[OK]

/sbin/katello-certs-check: line 168: [: too many arguments
Validation succeeded


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

      capsule-certs-generate --foreman-proxy-fqdn "$CAPSULE" \
                                --certs-tar  "~/$CAPSULE-certs.tar" \
                                --server-cert "/root/foo.crt" \
                                --server-key "/root/foo.key" \
                                --server-ca-cert "/root/foo.ca-bundle" \

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

      capsule-certs-generate --foreman-proxy-fqdn "$CAPSULE" \
                                --certs-tar  "~/$CAPSULE-certs.tar" \
                                --server-cert "/root/foo.crt" \
                                --server-key "/root/foo.key" \
                                --server-ca-cert "/root/foo.ca-bundle" \
                                --certs-update-server

Comment 10 Stephen Wadeley 2019-10-03 13:47:17 UTC
see also

Bug 1758181 - katello-certs-check does not support wildcard certificates

Comment 11 Stephen Wadeley 2019-11-19 16:12:06 UTC
(In reply to Stephen Wadeley from comment #10)
> see also
> 
> Bug 1758181 - katello-certs-check does not support wildcard certificates

Bug 1654326 - katello-certs-check gives the wrong output if using certificate with wildcard

Comment 12 Stephen Wadeley 2020-09-02 14:00:27 UTC
*** Bug 1758181 has been marked as a duplicate of this bug. ***

Comment 13 Eric Helms 2020-11-17 20:54:56 UTC
Testing this with Satellite 6.8, and a set of self generated wildcard certificates I am not able to reproduce. Therefore, I am going to opt to close this current release. If this continues to be an issue, please re-open with details about the version of Satellite and any details about the certificates being used that you can supply without giving away your certificates.


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