Skip to content

Commit 7b47f9a

Browse files
authored
Merge pull request #64649 from opayne1/OSDOCS-4440
OSDOCS#4440: Adding a CA bundle
2 parents a507478 + d4b77c7 commit 7b47f9a

File tree

3 files changed

+84
-1
lines changed

3 files changed

+84
-1
lines changed

microshift_install/microshift-embed-in-rpm-ostree.adoc

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,18 @@ include::modules/microshift-adding-repos-to-image-builder.adoc[leveloffset=+1]
2323
2424
include::modules/microshift-adding-service-to-blueprint.adoc[leveloffset=+1]
2525

26+
include::modules/microshift-ca-adding-bundle.adoc[leveloffset=+1]
27+
28+
include::modules/microshift-ca-adding-bundle-ostree.adoc[leveloffset=+2]
29+
30+
[role="_additional-resources"]
31+
[id="additional-resources_microshift-add-cert-bundle"]
32+
.Additional resources
33+
34+
* xref:../microshift_install/microshift-embed-in-rpm-ostree.adoc#microshift-creating-ostree-iso_microshift-embed-in-rpm-ostree[Creating the {op-system-ostree} image]
35+
* link:https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/security_guide/sec-shared-system-certificates[Using Shared System Certificates in{op-system-base-full} 7]
36+
* link:https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/composing_a_customized_rhel_system_image/creating-system-images-with-composer-command-line-interface_composing-a-customized-rhel-system-image#image-customizations_creating-system-images-with-composer-command-line-interface[Creating system images using the image builder command-line interface {op-system-base-full} 8]
37+
2638
include::modules/microshift-creating-ostree-iso.adoc[leveloffset=+1]
2739

2840
include::modules/microshift-add-blueprint-build-iso.adoc[leveloffset=+1]
@@ -32,7 +44,7 @@ include::modules/microshift-download-iso-prep-for-use.adoc[leveloffset=+1]
3244
[role="_additional-resources"]
3345
.Additional resources
3446

35-
* link:https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/9/html/composing_installing_and_managing_rhel_for_edge_images/composing-a-rhel-for-edge-image-using-image-builder-command-line_composing-installing-managing-rhel-for-edge-images[Creating a RHEL for Edge Container blueprint using image builder CLI]
47+
* link:https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/9/html/composing_installing_and_managing_rhel_for_edge_images/composing-a-rhel-for-edge-image-using-image-builder-command-line_composing-installing-managing-rhel-for-edge-images[Creating a {op-system-ostree} Container blueprint using image builder CLI]
3648
* link:https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/9/html/composing_installing_and_managing_rhel_for_edge_images/composing-a-rhel-for-edge-image-using-image-builder-command-line_composing-installing-managing-rhel-for-edge-images#image-customizations_composing-a-rhel-for-edge-image-using-image-builder-command-line[Supported image customizations]
3749
* link:https://www.osbuild.org/guides/image-builder-on-premises/building-ostree-images.html#building-ostree-image[Building ostree images]
3850
* link:https://www.osbuild.org/guides/image-builder-on-premises/blueprint-reference.html[Blueprint reference]
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
//Module included in the following assemblies:
2+
//
3+
//* microshift_install/microshift-embed-in-rpm-ostree.adoc
4+
5+
6+
:_content-type: PROCEDURE
7+
[id="microshift-ca-adding-bundle-ostree_{context}"]
8+
= Adding a certificate authority bundle to an ostree image
9+
You can include additional trusted certificate authorities (CAs) to the {op-system-ostree-first} `rpm-ostree` image by adding them to the blueprint that you use to create the image. Using the following procedure sets up additional CAs to be trusted by the operating system when pulling images from an image registry.
10+
11+
[NOTE]
12+
====
13+
This procedure requires you to configure the CA bundle customizations in the blueprint, and then add steps to your kickstart file to enable the bundle. In the following steps, `data` is the key, and `<value>` represents the PEM-encoded certificate.
14+
====
15+
16+
.Prerequisites
17+
18+
* You have root user access to your build host.
19+
* Your build host meets the Image Builder system requirements.
20+
* You have installed and set up Image Builder and the `composer-cli` tool.
21+
22+
.Procedure
23+
24+
. Add the following custom values to your blueprint to add a directory.
25+
26+
.. Add instructions to your blueprint on the host where the image is built to create the directory, for example, `/etc/pki/ca-trust/source/anchors/` for your certificate bundles.
27+
+
28+
[source,terminal]
29+
----
30+
[[customizations.directories]]
31+
path = "/etc/pki/ca-trust/source/anchors"
32+
----
33+
34+
.. After the image has booted, create the certificate bundles, for example, `/etc/pki/ca-trust/source/anchors/cert1.pem`:
35+
+
36+
[source,terminal]
37+
----
38+
[[customizations.files]]
39+
path = "/etc/pki/ca-trust/source/anchors/cert1.pem"
40+
data = "<value>"
41+
----
42+
43+
. To enable the certificate bundle in the system-wide trust store configuration, use the `update-ca-trust` command on the host where the image you are using has booted, for example:
44+
+
45+
[source,terminal]
46+
----
47+
$ sudo update-ca-trust
48+
----
49+
50+
[NOTE]
51+
====
52+
The `update-ca-trust` command might be included in the `%post` section of a kickstart file used for MicroShift host installation so that all the necessary certificate trust is enabled on the first boot. You must configure the CA bundle customizations in the blueprint before adding steps to your kickstart file to enable the bundle.
53+
54+
[source,terminal]
55+
----
56+
%post
57+
# Update certificate trust storage in case new certificates were
58+
# installed at /etc/pki/ca-trust/source/anchors directory
59+
update-ca-trust
60+
%end
61+
----
62+
====
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
//Module included in the following assemblies:
2+
//
3+
//* microshift_install/microshift-embed-in-rpm-ostree.adoc
4+
5+
:_content-type: CONCEPT
6+
[id="microshift-ca-adding-bundle_{context}"]
7+
= Adding a certificate authority bundle
8+
9+
{product-title} uses the host trust bundle when clients evaluate server certificates. You can also use a customized security certificate chain to improve the compatibility of your endpoint certificates with clients specific to your deployments. To do this, you can add a certificate authority (CA) bundle with root and intermediate certificates to the {op-system-ostree-first} system-wide trust store.

0 commit comments

Comments
 (0)