-
Notifications
You must be signed in to change notification settings - Fork 98
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refs #37601 - Refresh/deploy CA cert on hosts (#3193)
Co-authored-by: Maximilian Kolb <[email protected]> Co-authored-by: Shimon Shtein <[email protected]> Co-authored-by: Eric Helms <[email protected]>
- Loading branch information
1 parent
dad55b2
commit 4880f92
Showing
16 changed files
with
206 additions
and
16 deletions.
There are no files selected for viewing
7 changes: 7 additions & 0 deletions
7
guides/common/assembly_refreshing-the-self-signed-ca-certificate-on-hosts.adoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
include::modules/con_refreshing-the-self-signed-ca-certificate-on-hosts.adoc[] | ||
|
||
include::modules/proc_deploying-the-ca-certificate-on-a-host-by-using-script-rex.adoc[leveloffset=+1] | ||
|
||
include::modules/proc_deploying-the-ca-certificate-on-a-host-by-using-ansible-rex.adoc[leveloffset=+1] | ||
|
||
include::modules/proc_deploying-the-ca-certificate-on-a-host-manually.adoc[leveloffset=+1] |
4 changes: 3 additions & 1 deletion
4
...mbly_renewing-custom-ssl-certificate.adoc → ...ommon/assembly_renewing-certificates.adoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
guides/common/modules/con_refreshing-the-self-signed-ca-certificate-on-hosts.adoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
[id="refreshing-the-self-signed-ca-certificate-on-hosts"] | ||
= Refreshing the self-signed CA certificate on hosts | ||
|
||
When you change the CA certificate on your {ProjectServer}, you must refresh the CA certificate on your hosts. | ||
|
||
Ensure that you use a temporary dual CA certificate file for uninterrupted operation. | ||
For more information, see {AdministeringDocURL}planning-for-self-signed-ca-certificate-renewal[Planning for self-signed CA certificate renewal] in _{AdministeringDocTitle}_. | ||
|
||
If you have already changed the CA certificate on {ProjectServer} without using the temporary dual CA certificate file, you must refresh the certificate on hosts manually because the scripted variant will not recognize {ProjectServer}. | ||
|
||
[IMPORTANT] | ||
==== | ||
You only must redeploy the CA certificate if you use a self-signed CA certificate. | ||
==== |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
[id="renewing-certificates"] | ||
= Renewing certificates | ||
|
||
You can renew the CA certificate on {ProjectServer} or the {customssl} certificate on {ProjectServer} as well as on {SmartProxyServer}. |
4 changes: 0 additions & 4 deletions
4
guides/common/modules/con_renewing-the-custom-ssl-certificate.adoc
This file was deleted.
Oops, something went wrong.
32 changes: 32 additions & 0 deletions
32
...n/modules/proc_deploying-the-ca-certificate-on-a-host-by-using-ansible-rex.adoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
[id="deploying-the-ca-certificate-on-a-host-by-using-ansible-rex"] | ||
= Deploying the CA certificate on a host by using Ansible REX | ||
|
||
You can use remote execution (REX) with the Ansible provider to deploy the CA certificate. | ||
|
||
include::snip_prerequisites-deploying-ca-cert-rex.adoc[] | ||
|
||
.Procedure | ||
. In the {ProjectWebUI}, navigate to *Monitor* > *Jobs*. | ||
. Click *Run Job*. | ||
. From the *Job category* list, select `Ansible Commands`. | ||
. From the *Job template* list, select `Download and execute a script`. | ||
. Click *Next*. | ||
. Select hosts on which you want to execute the job. | ||
. In the *url* field, enter the following URL: | ||
+ | ||
[options="nowrap" subs="+quotes,verbatim,attributes"] | ||
---- | ||
https://_{foreman-example-com}_/unattended/public/foreman_ca_refresh | ||
---- | ||
+ | ||
include::snip_replace-fqdn-projectserver.adoc[] | ||
+ | ||
You can use HTTP when the CA certificate is expired. | ||
. Optional: Click *Next* and configure advanced fields and scheduling as you require. | ||
. Click *Run on selected hosts*. | ||
|
||
include::snip_verification-ca-set-correctly.adoc[] | ||
|
||
[role="_additional-resources"] | ||
.Additional resources | ||
* xref:executing-a-remote-job_managing-hosts[] |
32 changes: 32 additions & 0 deletions
32
...on/modules/proc_deploying-the-ca-certificate-on-a-host-by-using-script-rex.adoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
[id="deploying-the-ca-certificate-on-a-host-by-using-script-rex"] | ||
= Deploying the CA certificate on a host by using Script REX | ||
|
||
You can use remote execution (REX) with the Script provider to deploy the CA certificate. | ||
|
||
include::snip_prerequisites-deploying-ca-cert-rex.adoc[] | ||
|
||
.Procedure | ||
. In the {ProjectWebUI}, navigate to *Monitor* > *Jobs*. | ||
. Click *Run Job*. | ||
. From the *Job category* list, select `Commands`. | ||
. From the *Job template* list, select `Download and run a script`. | ||
. Click *Next*. | ||
. Select hosts on which you want to execute the job. | ||
. In the *url* field, enter the following URL: | ||
+ | ||
[options="nowrap" subs="+quotes,verbatim,attributes"] | ||
---- | ||
https://_{foreman-example-com}_/unattended/public/foreman_ca_refresh | ||
---- | ||
+ | ||
include::snip_replace-fqdn-projectserver.adoc[] | ||
+ | ||
You can use HTTP when the CA certificate is expired. | ||
. Optional: Click *Next* and configure advanced fields and scheduling as you require. | ||
. Click *Run on selected hosts*. | ||
|
||
include::snip_verification-ca-set-correctly.adoc[] | ||
|
||
[role="_additional-resources"] | ||
.Additional resources | ||
* xref:executing-a-remote-job_managing-hosts[] |
59 changes: 59 additions & 0 deletions
59
guides/common/modules/proc_deploying-the-ca-certificate-on-a-host-manually.adoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
[id="deploying-the-ca-certificate-on-a-host-manually"] | ||
= Deploying the CA certificate on a host manually | ||
|
||
You can deploy the CA certificate on the host manually by rendering a public provisioning template, which provides the CA certificate. | ||
|
||
.Prerequisites | ||
* You have root access on both your {ProjectServer} and your host. | ||
|
||
.Procedure | ||
. Download the certificate on your {ProjectServer}: | ||
+ | ||
[options="nowrap" subs="+quotes,verbatim,attributes"] | ||
---- | ||
# curl -o "{project-context}_ca_cert.crt" https://_{foreman-example-com}_/unattended/public/foreman_raw_ca | ||
---- | ||
+ | ||
include::snip_replace-fqdn-projectserver.adoc[] | ||
. Transfer the CA certificate to your host securely, for example by using `scp`. | ||
. Login to your host by using SSH. | ||
. Copy the certificate to the truststore: | ||
ifdef::client-content-dnf[] | ||
ifndef::satellite[] | ||
* On {EL}: | ||
endif::[] | ||
+ | ||
[options="nowrap" subs="+quotes,verbatim,attributes"] | ||
---- | ||
# cp {project-context}_ca_cert.crt /etc/pki/ca-trust/source/anchors | ||
---- | ||
endif::[] | ||
ifdef::client-content-apt[] | ||
* On {DL}: | ||
+ | ||
[options="nowrap" subs="+quotes,verbatim,attributes"] | ||
---- | ||
# cp {project-context}_ca_cert.crt /usr/local/share/ca-certificates/ | ||
---- | ||
endif::[] | ||
. Update the truststore: | ||
ifdef::client-content-dnf[] | ||
ifndef::satellite[] | ||
* On {EL}: | ||
endif::[] | ||
+ | ||
[options="nowrap" subs="+quotes,verbatim,attributes"] | ||
---- | ||
# update-ca-trust | ||
---- | ||
endif::[] | ||
ifdef::client-content-apt[] | ||
* On {DL}: | ||
+ | ||
[options="nowrap" subs="+quotes,verbatim,attributes"] | ||
---- | ||
# update-ca-certificates | ||
---- | ||
endif::[] | ||
|
||
include::snip_verification-ca-set-correctly.adoc[] |
16 changes: 16 additions & 0 deletions
16
guides/common/modules/proc_planning-for-self-signed-ca-certificate-renewal.adoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
[id="planning-for-self-signed-ca-certificate-renewal"] | ||
= Planning for self-signed CA certificate renewal | ||
|
||
If you need to update the Certification Authority (CA) certificate on your {ProjectServer}, add the new CA certificate and use a temporary dual CA certificate file to retain the HTTPS connections to your {ProjectServer} during the renewal. | ||
|
||
.Procedure | ||
. Add the new SSL certificate to the CA certificate file on {ProjectServer} and keep the old SSL certificate. | ||
. Renew the certificates on {ProjectServer} and any {SmartProxyServers}. | ||
. Deploy the dual CA certificate on hosts. | ||
. Remove the old certificate from the CA certificates file on {ProjectServer}, so the CA certificate file contains only the new SSL certificate. | ||
. Renew the certificates on {ProjectServer} and any {SmartProxyServers}. | ||
. Deploy the new CA certificate on hosts. | ||
|
||
[role="_additional-resources"] | ||
.Additional resources | ||
* {ManagingHostsDocURL}refreshing-the-self-signed-ca-certificate-on-hosts[Refreshing the self-signed CA certificate on hosts] in _{ManagingHostsDocTitle}_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
guides/common/modules/snip_prerequisites-deploying-ca-cert-rex.adoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
.Prerequisites | ||
* The host is registered to {Project}. | ||
* Remote execution is enabled on the host. | ||
* The CA certificate has been changed on {ProjectServer}. | ||
For more information, see {AdministeringDocURL}planning-for-self-signed-ca-certificate-renewal[Planning for self-signed CA certificate renewal] in _{AdministeringDocTitle}_. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Replace _{foreman-example-com}_ with the FQDN of your {ProjectServer}. |
20 changes: 20 additions & 0 deletions
20
guides/common/modules/snip_verification-ca-set-correctly.adoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
.Verification | ||
* If the host can access {ProjectServer}, the following command succeeds on your host: | ||
+ | ||
[options="nowrap" subs="+quotes,verbatim,attributes"] | ||
---- | ||
$ curl --head https://_{foreman-example-com}_ | ||
---- | ||
+ | ||
include::snip_replace-fqdn-projectserver.adoc[] | ||
* If the host can access {SmartProxyServer}, the following command succeeds on your host: | ||
+ | ||
[options="nowrap" subs="+quotes,verbatim,attributes"] | ||
---- | ||
$ curl --head https://_{smartproxy-example-com}:{smartproxy_port}_/features | ||
---- | ||
+ | ||
Replace _{smartproxy-example-com}_ with the FQDN of your {SmartProxyServer}. | ||
ifndef::satellite[] | ||
Replace the port number with the port number you use. | ||
endif::[] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters