Bug 1489015

Summary: rhui-installer does not handle replacing/updating of local certificates for RHUI
Product: Red Hat Update Infrastructure for Cloud Providers Reporter: Craig Donnelly <cdonnell>
Component: ToolsAssignee: RHUI Bug List <rhui-bugs>
Status: CLOSED CURRENTRELEASE QA Contact: Vratislav Hutsky <vhutsky>
Severity: high Docs Contact:
Priority: high    
Version: 3.0.0CC: bkearney, kdixon, rbiba
Target Milestone: ---Keywords: Triaged
Target Release: ---   
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-05-16 13:21:03 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 Craig Donnelly 2017-09-06 15:15:03 UTC
Description of problem:
When running `rhui-installer` with --certs-update-all, the result of the successful run leaves the RHUA in a broken state.

Some certificates are replaced and the rhui-manager command will fail to work if the user cert has expired already.

Version-Release number of selected component (if applicable):
rhui-installer-3.0.0-1.el7ui.noarch

How reproducible:
100%

Steps to Reproduce:
1. Run `rhui-installer --certs-update-all`.
2. Remove /root/.rhui/<hostname>/user.crt
3. Attempt to use rhui-manager
4. Verify certs no longer match/verify with:
# for i in $(ls -1 /root/ssl-build/rhui-default-ca.crt*); do openssl verify -CAfile $i /etc/pki/rhui/certs/apache.crt ; done

Actual results:
RHUA is left in a broken state with incorrect certificates

Expected results:
rhui-installer should correctly regenerate/replace all needed certs for a working environment.

Additional info:
Entire paste of all actions taken are here: http://rx-paste.usersys.redhat.com/view/raw/a9b82597