Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 1874045

Summary: [RFE] Include steps for reverting back to default self-signed certificates in Product documentation of Satellite 6
Product: Red Hat Satellite Reporter: Sayan Das <saydas>
Component: InstallationAssignee: Malhar Jivrajani <mjivraja>
Status: CLOSED CURRENTRELEASE QA Contact: Satellite QE Team <sat-qe-bz-list>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.10.0CC: ahumbe, bkearney, dsinglet, dvoss, ehelms, ekohlvan, elavarde, jyejare, mjivraja, risantam, ryandeussing, wpinheir
Target Milestone: UnspecifiedKeywords: Documentation, FutureFeature, Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: connected-network
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2024-05-16 13:52:04 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 Sayan Das 2020-08-31 11:49:13 UTC
Document URL: 

SATELLITE --> https://access.redhat.com/documentation/en-us/red_hat_satellite/6.8-beta/html-single/installing_satellite_server_from_a_connected_network/index#configuring-satellite-custom-server-certificate_satellite 


CAPSULE --> https://access.redhat.com/documentation/en-us/red_hat_satellite/6.8-beta/html/installing_capsule_server/installing-capsule-server#configuring-capsule-custom-server-certificate_capsule


Section Number and Name: 

NA

Describe the issue: 

* We have steps provided in our product documentation about how to install custom SSL certificates on Satellite and capsule servers.

* We don't have any steps provided in case someone wants to revert back from Custom SSL to default Self-Signed certificates.


Suggestions for improvement: 

I have the steps outlined which were tested against, Satellite 6.8-beta and should be working for Satellite 6.6 and 6.7 as well.



On Satellie.

1. Reset back SSL certs for Satellite server to Self-Signed certs.
# satellite-installer --certs-reset


2. Ensure that following parameters in "/etc/foreman-installer/scenarios.d/satellite-answers.yaml" are having no values mentioned.  
~~~
  server_cert:
  server_key:
  server_cert_req:
  server_ca_cert:
~~~

3. Generate new certificate tar bundle for capsule server(s).
# capsule-certs-generate --foreman-proxy-fqdn capsule.example.com --certs-tar /root/capsule.example.com-certs.tar --certs-update-all

4. Note down the satellite-installer command provided by above command.


5. Copy the new certificate tar bundle to capsule server.
# scp /root/capsule.example.com-certs.tar root.com:/root/capsule.example.com-certs.tar



On Capsule,

1. Verify that "/root/capsule.example.com-certs.tar" is present.

2. Update the new "katello-ca-consumer-latest.noarch.rpm" package.
# yum -y localinstall http://satellite.example.com/pub/katello-ca-consumer-latest.noarch.rpm
# subscription-manager refresj

3. Execute the entire "satellite-installer" command provided by "capsule-certs-generate" command earlier. An example command will look like as following:
~~~
satellite-installer --scenario capsule \
     --certs-tar-file "/root/capsule.example.com-certs.tar" \
     --foreman-proxy-content-parent-fqdn "satellite.example.com" \
     --foreman-proxy-register-in-foreman "true" \ 
     --foreman-proxy-foreman-base-url "https://satellite.example.com" \                  
     --foreman-proxy-trusted-hosts "satellite.example.com" \
     --foreman-proxy-trusted-hosts "capsule.example.com" \
     --foreman-proxy-oauth-consumer-key "cjFsGy5ZFuXUJvKejrjf9SGCG4Souy5G" \
     --foreman-proxy-oauth-consumer-secret "TZRxacFCrB3TqvyArnio9ERuT9K68Vuj" \
     --puppet-server-foreman-url "https://satellite.example.com"
~~~


4. From Satellite GUI, Infrastructure --> Capsules --> Click on "capsule.example.com --> Click on "Refresh Features" .



Additional information: 

* From my point of view, it makes sense to provide this information via product documentation rather than via a solution article.

* There were scenarios where Custom SSL certificate were expired for satellite and CA was not available to provide new signed certificates which caused business outages or production delays. With above information provide, if someone wants, they can easily choose to revert back to default self-signed certificates and continue working with satellite\capsule without any issues.

Comment 5 Eric Lavarde 2021-01-08 07:57:56 UTC
One small correction: /root/capsule.example.com-certs.tar is actually compressed, hence a .tar.gz, it would be good to name the file accordingly.

And, yes, having it in the docs would be good, we've been bitten by this problem.

Comment 13 Ewoud Kohl van Wijngaarden 2024-01-24 11:37:11 UTC
(In reply to Eric Lavarde from comment #5)
> One small correction: /root/capsule.example.com-certs.tar is actually
> compressed, hence a .tar.gz, it would be good to name the file accordingly.
> 
> And, yes, having it in the docs would be good, we've been bitten by this
> problem.

I never realized this, but you're right that there's a -z option to the tar:

https://github.com/theforeman/puppet-certs/blob/c1eaa9087a654d3a1bd5584bd9f3e9f2fff6119e/manifests/tar_create.pp#L25

And that flag goes all the way back to the initial addition of the file in 2013.

I've opened https://projects.theforeman.org/issues/37097 and https://github.com/theforeman/puppet-certs/pull/440 to make the command tar -caf so it'll use the file extension to determine the compression. This also allows using xz or other types if users prefer this. https://github.com/theforeman/foreman-installer/pull/911 changes the suggested file name in the command, but docs need a separate PR.

Comment 15 Malhar Jivrajani 2024-05-16 13:52:04 UTC
Link to the upstream document: https://docs.theforeman.org/nightly/Installing_Server/index-katello.html#resetting-custom-ssl-certificate-to-default-self-signed-certificate-on-foreman_foreman

This feature will be visible in the document from the Satellite version 6.16.