Bug 1564921

Summary: katello-certs-check usage help output should use absolute paths
Product: Red Hat Satellite Reporter: csherrar
Component: CertificatesAssignee: Chris Roberts <chrobert>
Status: CLOSED NOTABUG QA Contact: Katello QA List <katello-qa-list>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.3.1CC: chrobert
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-04-12 16:49:02 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 csherrar 2018-04-08 23:17:14 UTC
Description of problem:
The usage help output for `katello-certs-check` uses relative paths and users may encounter errors if the paths to the files are incorrect. Suggest to change these to absolute paths as per https://bugzilla.redhat.com/show_bug.cgi?id=1551462#c6

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

How reproducible:
Always

Steps to Reproduce:
1. Enter command: # katello-certs-check
2. Note usage help output.

Actual results:

Verifies, that custom ssl cert files are usable
as part of the Satellite installation.

usage: /usr/sbin/katello-certs-check -c CERT_FILE -k KEY_FILE -r REQ_FILE -b CA_BUNDLE_FILE

Expected results:

Verifies, that custom ssl cert files are usable
as part of the Satellite installation.

usage: /usr/sbin/katello-certs-check -c /root/sat_cert/CERT_FILE -k /root/sat_cert/KEY_FILE -r /root/sat_cert/REQ_FILE -b /root/sat_cert/CA_BUNDLE_FILE

Additional info:

Comment 2 Chris Roberts 2018-04-12 16:49:02 UTC
Hi,

Even though the help does not show this, the end result and output is using the absolute path as seen below. We do not want to tell the users where to put their certs as I have seen them placed in many spots when I was in support.


usage: /usr/sbin/katello-certs-check -c CERT_FILE -k KEY_FILE -r REQ_FILE -b CA_BUNDLE_FILE
[root@sat-r220-02 certs]# pwd
/root/certs

[root@sat-r220-02 certs]# katello-certs-check -b ca.pem -k dogfood_server.key -r dogfood_server.csr -c dogfood_server.crt 
Checking expiration of certificate: [OK]
Checking expiration of CA bundle: [OK]
Validating the certificate subject= /C=US/ST=North Carolina/L=Raleigh/O=Red Hat/CN=sat-r220-02.lab.eng.rdu2.redhat.com
Checking to see if the private key matches the certificate: [OK]
Checking ca bundle against the cert file: [OK]
Checking for non ascii characters[OK]

Validation succeeded.

To install the Satellite server with the following custom certificates, run:

    satellite-installer --scenario satellite\
                      --certs-server-cert "/root/certs/dogfood_server.crt"\
                      --certs-server-cert-req "/root/certs/dogfood_server.csr"\
                      --certs-server-key "/root/certs/dogfood_server.key"\
                      --certs-server-ca-cert "/root/certs/ca.pem"


Marking as Working.