Skip to content

Commit 567484f

Browse files
authored
Merge pull request #96169 from ShaunaDiaz/OSDOCS-13052
OSDOCS-13052: updates and clarifies API server custom CAs MicroShift
2 parents a0d3354 + d4418d8 commit 567484f

File tree

3 files changed

+30
-27
lines changed

3 files changed

+30
-27
lines changed

microshift_configuring/microshift_auth_security/microshift-custom-ca.adoc

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ include::_attributes/attributes-microshift.adoc[]
66

77
toc::[]
88

9-
You can encrypt connections by using custom certificate authorities (CAs) with the {microshift-short} service.
9+
Allow and encrypt connections with external clients by replacing the {microshift-short} default API server certificate with a custom server certificate issued by a certificate authority (CA).
1010

1111
include::modules/microshift-custom-ca-con.adoc[leveloffset=+1]
1212

@@ -20,10 +20,11 @@ include::modules/microshift-custom-ca-cert-cleaning.adoc[leveloffset=+1]
2020

2121
[id="Additional-resources_microshift-custom-ca_{context}"]
2222
== Additional resources
23-
* link:https://docs.openshift.com/container-platform/{ocp-version}/security/certificates/api-server.html#customize-certificates-api-add-named_api-server-certificates[OpenShift: Add an API server named certificate]
2423

25-
* link:https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/9/html/securing_networks/creating-and-managing-tls-keys-and-certificates_securing-networks#doc-wrapper[RHEL: Creating and managing TLS keys and certificates]
24+
* https://docs.redhat.com/en/documentation/openshift_container_platform/{ocp-version}/html/security_and_compliance/configuring-certificates#customize-certificates-api-add-named_api-server-certificates[OpenShift: Add an API server named certificate]
2625

27-
* link:https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/9/html/securing_networks/using-shared-system-certificates_securing-networks#the-system-wide-trust-store_using-shared-system-certificates[The system-wide truststore]
26+
* link:https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/9/html/securing_networks/creating-and-managing-tls-keys-and-certificates_securing-networks#doc-wrapper[RHEL: Creating and managing TLS keys and certificates]
2827

29-
* link:https://docs.openshift.com/container-platform/{ocp-version}/cli_reference/openshift_cli/managing-cli-profiles.html[OpenShift CLI Reference: oc login]
28+
* link:https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/9/html/securing_networks/using-shared-system-certificates_securing-networks#the-system-wide-trust-store_using-shared-system-certificates[The system-wide truststore]
29+
30+
* link:https://docs.redhat.com/en/documentation/openshift_container_platform/{ocp-version}/html/cli_tools/openshift-cli-oc#managing-cli-profiles[OpenShift CLI Reference: oc login]

modules/microshift-custom-ca-con.adoc

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,42 +4,43 @@
44

55
:_mod-docs-content-type: CONCEPT
66
[id="microshift-custom-cas_{context}"]
7-
= How custom certificate authorities work in {microshift-short}
7+
= Using custom certificate authorities for the {microshift-short} API server
88

9-
The default API server certificate is issued by an internal {microshift-short} cluster certificate authority (CA). Clients outside of the cluster cannot verify the API server certificate by default. This certificate can be replaced by a custom server certificate that is issued externally by a custom CA that clients trust. The following steps illustrate the workflow in {microshift-short}:
9+
When {microshift-short} starts, an internal {microshift-short} cluster certificate authority (CA) issues the default API server certificate. By default, clients outside of the cluster cannot verify the {microshift-short}-issued API server certificate. You can grant secure access and encrypt connections between the {microshift-short} API server and external clients. Replace the default certificate with a custom server certificate issued externally by a CA that clients trust.
1010

11-
. Copy the certificates and keys to the preferred directory in the host operating system. Ensure that the files are accessible by root only.
11+
The following steps illustrate the workflow for customizing the API server certificate configuration in {microshift-short}:
12+
13+
. Copy the certificates and keys to the preferred directory in the host operating system. Ensure that the files are accessible only with root access.
1214

1315
. Update the {microshift-short} configuration for each custom CA by specifying the certificate names and new fully qualified domain name (FQDN) in the {microshift-short} `/etc/microshift/config.yaml` configuration file.
1416
+
1517
Each certificate configuration can contain the following values:
1618

17-
** The certificate file location is a required value.
18-
** A single common name containing the API server DNS and IP address or IP address range.
19+
* The certificate file location is a required value.
20+
* A single common name containing the API server DNS and IP address or IP address range.
1921
+
2022
--
2123
[TIP]
2224
====
23-
In most cases, {microshift-short} generates a new `kubeconfig` for your custom CA that includes the IP address or range that you specify. The exception is when wildcards are specified for the IP address. In this case, {microshift-short} generates a `kubeconfig` with the public IP address of the server. To use wildcards, you must update the `kubeconfig` file with your specific details.
25+
In most cases, {microshift-short} generates a new `kubeconfig` file for your custom CA that includes the IP address or range that you specify. The exception is when you specify wildcards for the IP address. In this case, {microshift-short} generates a `kubeconfig` file with the public IP address of the server. To use wildcards, you must update the `kubeconfig` file with your specific details.
2426
====
2527
--
26-
** Multiple Subject Alternative Names (SANs) containing the API server DNS and IP addresses or a wildcard certificate.
27-
** You can provide additional DNS names for each certificate.
28+
* Multiple Subject Alternative Names (SANs) containing the API server DNS and IP addresses or a wildcard certificate.
29+
* You can list additional DNS names for each certificate.
2830
2931
. After the {microshift-short} service restarts, you must copy the generated `kubeconfig` files to the client.
3032

3133
. Configure additional CAs on the client system. For example, you can update CA bundles in the {op-system-base-full} truststore.
34+
+
35+
[IMPORTANT]
36+
====
37+
Custom server certificates must be validated against CA data configured in the trust root of the host operating system. For more information, read the following documentation:
3238

33-
. The certificates and keys are read from the specified file location on the host. Testing and validation of configuration is done from the client.
39+
* link:https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/9/html/securing_networks/using-shared-system-certificates_securing-networks#the-system-wide-trust-store_using-shared-system-certificates[The system-wide truststore]
40+
====
3441
35-
. External server certificates are not automatically renewed. You must manually rotate your external certificates.
42+
. The certificates and keys are read from the specified file location on the host. You can test and validate configuration from the client.
3643

37-
[NOTE]
38-
====
39-
If any validation fails, the {microshift-short} service skips the custom configuration and uses the default certificate to start. The priority is to continue the service uninterrupted. {microshift-short} logs errors when the service starts. Common errors include expired certificates, missing files, or incorrect IP addresses.
40-
====
44+
* If any validation fails, {microshift-short} skips the custom configuration and uses the default certificate to start. The priority is to continue the service uninterrupted. {microshift-short} logs errors when the service starts. Common errors include expired certificates, missing files, or wrong IP addresses.
4145
42-
[IMPORTANT]
43-
====
44-
Custom server certificates have to be validated against CA data configured in the trust root of the host operating system. For information, see link:https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/9/html/securing_networks/using-shared-system-certificates_securing-networks#the-system-wide-trust-store_using-shared-system-certificates[The system-wide truststore].
45-
====
46+
. External server certificates are not automatically renewed. You must manually rotate your external certificates.

modules/microshift-custom-ca-proc.adoc

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,16 @@
66
[id="microshift-custom-cas-configuring_{context}"]
77
= Configuring custom certificate authorities
88

9-
To configure externally generated certificates and domain names using custom certificate authorities (CAs), add them to the {microshift-short} `/etc/microshift/config.yaml` configuration file. You must also configure the host operating system trust root.
9+
To configure externally generated certificates and domain names by using custom certificate authorities (CAs), add them to the {microshift-short} `/etc/microshift/config.yaml` configuration file. You must also configure the host operating system trust root.
1010

1111
[NOTE]
1212
====
1313
Externally generated `kubeconfig` files are created in the `/var/lib/microshift/resources/kubeadmin/<hostname>/kubeconfig` directory. If you need to use `localhost` in addition to externally generated configurations, retain the original `kubeconfig` file in its default location. The `localhost` `kubeconfig` file uses the self-signed certificate authority.
1414
====
1515

1616
.Prerequisites
17-
* The OpenShift CLI (`oc`) is installed.
17+
18+
* The {oc-first} is installed.
1819
* You have access to the cluster as a user with the cluster administration role.
1920
* The certificate authority has issued the custom certificates.
2021
* A {microshift-short} `/etc/microshift/config.yaml` configuration file exists.
@@ -40,7 +41,7 @@ apiServer:
4041
----
4142
<1> Add the full path to the certificate.
4243
<2> Add the full path to the certificate key.
43-
<3> Optional. Add a list of explicit DNS names. Leading wildcards are allowed. If no names are provided, the implicit names are extracted from the certificates.
44+
<3> Optional. Add a list of explicit DNS names. Leading wildcards are allowed. If no names are listed, the implicit names are extracted from the certificates.
4445
4546
. Restart the {microshift-short} to apply the certificates by running the following command:
4647
+
@@ -136,6 +137,6 @@ Server certificate:
136137
Either replace the `certificate-authority-data` in the generated `kubeconfig` file with the new `rootCA` or add the `certificate-authority-data` to the trust root of the operating system. Do not use both methods.
137138
====
138139
139-
.. Configure additional CAs in the trust root of the operating system. For example, in the RHEL Client truststore on the client system. See link:https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/9/html/securing_networks/using-shared-system-certificates_securing-networks#the-system-wide-trust-store_using-shared-system-certificates[The system-wide truststore] for details.
140+
.. Configure additional CAs in the trust root of the operating system. For example, in the RHEL Client truststore on the client system. link:https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/9/html/securing_networks/using-shared-system-certificates_securing-networks#the-system-wide-trust-store_using-shared-system-certificates[The system-wide truststore].
140141
** Updating the certificate bundle with the configuration that contains the CA is recommended.
141142
** If you do not want to configure your certificate bundles, you can alternately use the `oc login localhost:8443 --certificate-authority=/path/to/cert.crt` command, but this method is not preferred.

0 commit comments

Comments
 (0)