Reset from Custom Certs to Self-Signed Satellite 6
= Reset from Custom Certs to Self-Signed =
1) Edit /etc/katello-installer/answers.katello-installer.yaml
Examine the certs: section, it should look something like:
certs:
server_key: /root/certs/example6.redhat.com.key
ca_expiration: "36500"
regenerate_ca: false
generate: true
node_fqdn: sat-perf-04.idm.lab.bos.redhat.com
server_cert_req: /root/certs/example6.redhat.com.crt.req
org: SomeOrg
log_dir: /var/log/certs
...
Replace the entire "certs:" section with the following, ensure the indentation matches the existing file:
certs:
generate: true
deploy: true
group: foreman
remove all entries in that certs: section except for the above
2) Re-run katello-installer with the following flags:
# katello-installer -v -d --certs-update-all
When doing this, I got the following errors:
[ERROR
2014-12-08 13:08:48 verbose]
/Stage[main]/Certs::Candlepin/Exec[candlepin-add-client-cert-to-nss-db]:
Failed to call refresh: certutil -A -d '/etc/pki/katello/nssdb' -n
'amqp-client' -t ',,' -a -i '/etc/pki/katello/certs/java-client.crt'
returned 255 instead of one of [0]
[ERROR
2014-12-08 13:08:48 verbose]
/Stage[main]/Certs::Candlepin/Exec[candlepin-add-client-cert-to-nss-db]:
certutil -A -d '/etc/pki/katello/nssdb' -n 'amqp-client' -t ',,' -a -i
'/etc/pki/katello/certs/java-client.crt' returned 255 instead of one
of [0]
Tried then removing the "broker" and "amqp-client" certs from /etc/pki/katello/nssdb and re-run
katello-installer -v -d --certs-update-all --katello-proxy...
This time qpidd fails to re-start since it can't find it's certificate nick-named "broker". Which really isn't present in nssdb
trying to manually add the "broker" cert and now run katello-installer without --certs-update-all
This time qpidd fails to start with the error message "Failed to retrieve private key from certificate"
And indeed, trying
certutil
-K -d /etc/pki/katello/nssdb asks for a "password or pin" and the key
in /etc/pki/katello/nssdb/nss_password_file does not work
Resetting the password of the DB was dome by running
certutil -T -d /etc/pki/katello/nssdb
and then
certutil -W -d /etc/pki/katello/nssdb
and setting the password to the one specified in /etc/pki/katello/nssdb/nss_password_file
Finally, I impored the broker key using
pk12util
-i /etc/pki/katello/sat6.rhcdev.volvo.net-qpid-broker.pfx -d
/etc/pki/katello/nssdb -w /etc/pki/katello/nssd b/nss_db_password_file
-k /etc/pki/katello/nssd b/nss_db_password_file
3) Restart all services
# katello-service restart
4)
If you have remote Capsules not on the Satellite they need new
certificates as well, follow the "12.4. Configuring a Red Hat Satellite
Capsule Server" to regenerate and re-install the certificates:
Comments
Post a Comment