Skip to content

Commit a371791

Browse files
committed
Make CQA changes
1 parent a8df17c commit a371791

13 files changed

Lines changed: 86 additions & 49 deletions

modules/containers-signature-verify-application.adoc

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
[id="containers-signature-verify-application_{context}"]
77
= Verifying the signature verification configuration
88

9+
[role="_abstract"]
910
After you apply the machine configs to the cluster, the Machine Config Controller detects the new `MachineConfig` object and generates a new `rendered-worker-<hash>` version.
1011

1112
.Prerequisites
@@ -20,7 +21,7 @@ After you apply the machine configs to the cluster, the Machine Config Controlle
2021
$ oc describe machineconfigpool/worker
2122
----
2223
+
23-
.Example output of initial worker monitoring
24+
**Example output of initial worker monitoring**
2425
+
2526
[source,terminal]
2627
----
@@ -126,7 +127,7 @@ Events: <none>
126127
$ oc describe machineconfigpool/worker
127128
----
128129
+
129-
.Example output after the worker is updated
130+
**Example output after the worker is updated**
130131
+
131132
[source,terminal]
132133
----
@@ -183,7 +184,7 @@ The `Observed Generation` parameter shows an increased count based on the genera
183184
$ oc debug node/<node> -- chroot /host cat /etc/containers/policy.json
184185
----
185186
+
186-
.Example output
187+
**Example output**
187188
+
188189
[source,terminal]
189190
----
@@ -230,7 +231,7 @@ To use host binaries, run `chroot /host`
230231
$ oc debug node/<node> -- chroot /host cat /etc/containers/registries.d/registry.redhat.io.yaml
231232
----
232233
+
233-
.Example output
234+
**Example output**
234235
+
235236
[source,terminal]
236237
----
@@ -248,7 +249,7 @@ docker:
248249
$ oc debug node/<node> -- chroot /host cat /etc/containers/registries.d/registry.access.redhat.com.yaml
249250
----
250251
+
251-
.Example output
252+
**Example output**
252253
+
253254
[source,terminal]
254255
----

modules/containers-signature-verify-enable.adoc

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,20 @@
66
[id="containers-signature-verify-enable_{context}"]
77
= Enabling signature verification for Red Hat Container Registries
88

9+
[role="_abstract"]
910
Enabling container signature validation for Red Hat Container Registries requires writing a signature verification policy file specifying the keys to verify images from these registries. For RHEL8 nodes, the registries are already defined in `/etc/containers/registries.d` by default.
1011

11-
.Procedure
12-
13-
. Create a Butane config file, `51-worker-rh-registry-trust.bu`, containing the necessary configuration for the worker nodes.
12+
.Prerequisites
13+
* You have access to the cluster as a user with the `cluster-admin` role.
1414
+
1515
[NOTE]
1616
====
1717
include::snippets/butane-version.adoc[]
1818
====
19+
20+
.Procedure
21+
22+
. Create a Butane config file, `51-worker-rh-registry-trust.bu`, containing the necessary configuration for the worker nodes:
1923
+
2024
[source,yaml,subs="attributes+"]
2125
----
@@ -89,7 +93,8 @@ $ oc apply -f 51-worker-rh-registry-trust.yaml
8993
$ oc get mc
9094
----
9195
+
92-
.Sample output
96+
**Sample output**
97+
+
9398
[source,terminal]
9499
----
95100
NAME GENERATEDBYCONTROLLER IGNITIONVERSION AGE
@@ -100,7 +105,7 @@ NAME GENERATEDBYCONTROLLER
100105
01-worker-container-runtime a2178ad522c49ee330b0033bb5cb5ea132060b0a 3.5.0 25m
101106
01-worker-kubelet a2178ad522c49ee330b0033bb5cb5ea132060b0a 3.5.0 25m
102107
51-master-rh-registry-trust 3.5.0 13s
103-
51-worker-rh-registry-trust 3.5.0 53s <1>
108+
51-worker-rh-registry-trust 3.5.0 53s
104109
99-master-generated-crio-seccomp-use-default 3.5.0 25m
105110
99-master-generated-registries a2178ad522c49ee330b0033bb5cb5ea132060b0a 3.5.0 25m
106111
99-master-ssh 3.2.0 28m
@@ -110,10 +115,10 @@ NAME GENERATEDBYCONTROLLER
110115
rendered-master-af1e7ff78da0a9c851bab4be2777773b a2178ad522c49ee330b0033bb5cb5ea132060b0a 3.5.0 8s
111116
rendered-master-cd51fd0c47e91812bfef2765c52ec7e6 a2178ad522c49ee330b0033bb5cb5ea132060b0a 3.5.0 24m
112117
rendered-worker-2b52f75684fbc711bd1652dd86fd0b82 a2178ad522c49ee330b0033bb5cb5ea132060b0a 3.5.0 24m
113-
rendered-worker-be3b3bce4f4aa52a62902304bac9da3c a2178ad522c49ee330b0033bb5cb5ea132060b0a 3.5.0 48s <2>
118+
rendered-worker-be3b3bce4f4aa52a62902304bac9da3c a2178ad522c49ee330b0033bb5cb5ea132060b0a 3.5.0 48s
114119
----
115-
<1> New machine config
116-
<2> New rendered machine config
120+
+
121+
Review the output to confirm that the new `51-worker-rh-registry-trust` machine config is listed and a new `rendered-worker` machine config has been created.
117122

118123
.. Check that the worker machine config pool is updating with the new machine config:
119124
+
@@ -127,9 +132,10 @@ $ oc get mcp
127132
----
128133
NAME CONFIG UPDATED UPDATING DEGRADED MACHINECOUNT READYMACHINECOUNT UPDATEDMACHINECOUNT DEGRADEDMACHINECOUNT AGE
129134
master rendered-master-af1e7ff78da0a9c851bab4be2777773b True False False 3 3 3 0 30m
130-
worker rendered-worker-be3b3bce4f4aa52a62902304bac9da3c False True False 3 0 0 0 30m <1>
135+
worker rendered-worker-be3b3bce4f4aa52a62902304bac9da3c False True False 3 0 0 0 30m
131136
----
132-
<1> When the `UPDATING` field is `True`, the machine config pool is updating with the new machine config. When the field becomes `False`, the worker machine config pool has rolled out to the new machine config.
137+
+
138+
When the `UPDATING` field is `True`, the machine config pool is updating with the new machine config. When the field becomes `False`, the worker machine config pool has rolled out to the new machine config.
133139

134140
. If your cluster uses any RHEL7 worker nodes, when the worker machine config pool is updated, create YAML files on those nodes in the `/etc/containers/registries.d` directory, which specify the location of the detached signatures for a given registry server. The following example works only for images hosted in `registry.access.redhat.com` and `registry.redhat.io`.
135141

modules/containers-signature-verify-skopeo.adoc

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
[id="containers-signature-verify-skopeo_{context}"]
77
= Using skopeo to verify signatures of Red Hat container images
88

9-
You can verify the signatures for container images included in an {product-title} release image by pulling those signatures from link:https://mirror.openshift.com/pub/openshift-v4/signatures/openshift-release-dev/ocp-release/[OCP release mirror site]. Because the signatures on the mirror site are not in a format readily understood by Podman or CRI-O, you can use the `skopeo standalone-verify` command to verify that the your release images are signed by Red Hat.
9+
[role="_abstract"]
10+
You can verify the signatures for container images included in an {product-title} release image by pulling those signatures from the OCP release mirror site. Because the signatures on the mirror site are not in a format readily understood by Podman or CRI-O, you can use the `skopeo standalone-verify` command to verify that your release images are signed by Red Hat.
1011

1112
.Prerequisites
1213

@@ -18,11 +19,12 @@ You can verify the signatures for container images included in an {product-title
1819
+
1920
[source,terminal]
2021
----
21-
$ oc adm release info <release_version> \ <1>
22+
$ oc adm release info <release_version>
2223
----
23-
<1> Substitute <release_version> with your release number, for example, `4.14.3`.
2424
+
25-
.Example output snippet
25+
Substitute `<release_version>` with your release number, for example, `4.14.3`.
26+
+
27+
**Example output snippet**
2628
+
2729
[source,terminal]
2830
----
@@ -42,17 +44,19 @@ $ curl -o pub.key https://access.redhat.com/security/data/fd431d51.txt
4244
+
4345
[source,terminal]
4446
----
45-
$ curl -o signature-1 https://mirror.openshift.com/pub/openshift-v4/signatures/openshift-release-dev/ocp-release/sha256=<sha_from_version>/signature-1 \ <1>
47+
$ curl -o signature-1 https://mirror.openshift.com/pub/openshift-v4/signatures/openshift-release-dev/ocp-release/sha256=<sha_from_version>/signature-1
4648
----
47-
<1> Replace `<sha_from_version>` with SHA value from the full link to the mirror site that matches the SHA of your release. For example, the link to the signature for the 4.12.23 release is `https://mirror.openshift.com/pub/openshift-v4/signatures/openshift-release-dev/ocp-release/sha256=e73ab4b33a9c3ff00c9f800a38d69853ca0c4dfa5a88e3df331f66df8f18ec55/signature-1`, and the SHA value is `e73ab4b33a9c3ff00c9f800a38d69853ca0c4dfa5a88e3df331f66df8f18ec55`.
49+
+
50+
Replace `<sha_from_version>` with the SHA value from the full link to the mirror site that matches the SHA of your release. For example, the link to the signature for the 4.12.23 release is `https://mirror.openshift.com/pub/openshift-v4/signatures/openshift-release-dev/ocp-release/sha256=e73ab4b33a9c3ff00c9f800a38d69853ca0c4dfa5a88e3df331f66df8f18ec55/signature-1`, and the SHA value is `e73ab4b33a9c3ff00c9f800a38d69853ca0c4dfa5a88e3df331f66df8f18ec55`.
4851
4952
. Get the manifest for the release image by running the following command:
5053
+
5154
[source,terminal]
5255
----
53-
$ skopeo inspect --raw docker://<quay_link_to_release> > manifest.json \ <1>
56+
$ skopeo inspect --raw docker://<quay_link_to_release> > manifest.json
5457
----
55-
<1> Replace `<quay_link_to_release>` with the output of the `oc adm release info` command. For example, `quay.io/openshift-release-dev/ocp-release@sha256:e73ab4b33a9c3ff00c9f800a38d69853ca0c4dfa5a88e3df331f66df8f18ec55`.
58+
+
59+
Replace `<quay_link_to_release>` with the output of the `oc adm release info` command. For example, `quay.io/openshift-release-dev/ocp-release@sha256:e73ab4b33a9c3ff00c9f800a38d69853ca0c4dfa5a88e3df331f66df8f18ec55`.
5660
5761
. Use skopeo to verify the signature:
5862
+
@@ -66,9 +70,9 @@ where:
6670
`<release_number>`:: Specifies the release number, for example `4.14.3`.
6771
`<arch>`:: Specifies the architecture, for example `x86_64`.
6872
+
69-
.Example output
73+
**Example output**
74+
+
7075
[source,terminal]
7176
----
7277
Signature verified using fingerprint 567E347AD0044ADE55BA8A5F199E2F91FD431D51, digest sha256:e73ab4b33a9c3ff00c9f800a38d69853ca0c4dfa5a88e3df331f66df8f18ec55
7378
----
74-

modules/containers-signature-verify-unsigned.adoc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,19 @@
66
[id="containers-signature-verify-artifacts_{context}"]
77
= Understanding the verification of container images lacking verifiable signatures
88

9+
[role="_abstract"]
910
Each {product-title} release image is immutable and signed with a Red Hat production key. During an {product-title} update or installation, a release image might deploy container images that do not have verifiable signatures. Each signed release image digest is immutable. Each reference in the release image is to the immutable digest of another image, so the contents can be trusted transitively. In other words, the signature on the release image validates all release contents.
1011

1112
For example, the image references lacking a verifiable signature are contained in the signed {product-title} release image:
1213

1314
.Example release info output
1415
[source,terminal]
1516
----
16-
$ oc adm release info quay.io/openshift-release-dev/ocp-release@sha256:2309578b68c5666dad62aed696f1f9d778ae1a089ee461060ba7b9514b7ca417 -o pullspec <1>
17-
quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:9aafb914d5d7d0dec4edd800d02f811d7383a7d49e500af548eab5d00c1bffdb <2>
17+
$ oc adm release info quay.io/openshift-release-dev/ocp-release@sha256:2309578b68c5666dad62aed696f1f9d778ae1a089ee461060ba7b9514b7ca417 -o pullspec
18+
quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:9aafb914d5d7d0dec4edd800d02f811d7383a7d49e500af548eab5d00c1bffdb
1819
----
1920

20-
<1> Signed release image SHA.
21-
<2> Container image lacking a verifiable signature included in the release.
21+
The first line displays the signed release image SHA. The subsequent lines display the container images lacking a verifiable signature that are securely included in the release.
2222

2323
[id="containers-signature-verification-automatic_{context}"]
2424
== Automated verification during updates

modules/removing-cso-operator.adoc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
[id="uninstalling-container-security-operator_{context}"]
77
= Uninstalling the {rhq-cso}
88

9+
[role="_abstract"]
910
To uninstall the Container Security Operator, you must uninstall the Operator and delete the `imagemanifestvulns.secscan.quay.redhat.com` custom resource definition (CRD).
1011

1112
.Procedure
@@ -27,7 +28,7 @@ To uninstall the Container Security Operator, you must uninstall the Operator an
2728
$ oc delete customresourcedefinition imagemanifestvulns.secscan.quay.redhat.com
2829
----
2930
+
30-
.Example output
31+
**Example output**
3132
+
3233
[source,terminal]
3334
----

modules/security-hardening-how.adoc

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
[id="security-hardening-how_{context}"]
77
= Choosing how to harden {op-system}
88

9+
[role="_abstract"]
910
Direct modification of {op-system} systems in {product-title} is discouraged. Instead, you should think of modifying systems in pools of nodes, such as worker nodes and control plane nodes. When a new node is needed, in non-bare metal installs, you can request a new node of the type you want and it will be created from an {op-system} image plus the modifications you created earlier.
1011

1112
There are opportunities for modifying {op-system} before installation, during installation, and after the cluster is up and running.
@@ -31,9 +32,13 @@ You can interrupt the {product-title} installation process and change Ignition c
3132
== Hardening after the cluster is running
3233
After the {product-title} cluster is up and running, there are several ways to apply hardening features to {op-system}:
3334

34-
* Daemon set: If you need a service to run on every node, you can add
35-
that service with a link:https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/[Kubernetes `DaemonSet` object].
35+
* Daemon set: If you need a service to run on every node, you can add that service with a Kubernetes `DaemonSet` object.
3636

3737
* Machine config: `MachineConfig` objects contain a subset of Ignition configs in the same format. By applying machine configs to all worker or control plane nodes, you can ensure that the next node of the same type that is added to the cluster has the same changes applied.
3838

3939
All of the features noted here are described in the {product-title} product documentation.
40+
41+
[id="additional-resources_security-hardening-how"]
42+
[role="_additional-resources"]
43+
== Additional resources
44+
* link:https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/[Kubernetes DaemonSet object documentation]

modules/security-hardening-what.adoc

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,27 @@
66
[id="security-hardening-what_{context}"]
77
= Choosing what to harden in {op-system}
88

9+
[role="_abstract"]
10+
With the knowledge of what operating system features you want to harden, you can decide how to best configure and enforce security profiles in {op-system}.
11+
912
ifdef::openshift-origin[]
10-
For information on how to approach security for any {op-system-base} system, see the link:https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/9#Security[Security] category in the Red{nbsp}Hat Enterprise Linux 9 documentation.
13+
For information on how to approach security for any {op-system-base} system, see the Security category in the Red{nbsp}Hat Enterprise Linux 9 documentation.
1114

1215
Use these documents to learn about managing security updates, security hardening, securing networks, and other security measures.
1316
endif::[]
1417
ifdef::openshift-enterprise,openshift-webscale,openshift-aro[]
15-
For information on how to approach security for any {op-system-base} system, see the link:https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/9/html-single/security_hardening/index#scanning-container-and-container-images-for-vulnerabilities_scanning-the-system-for-security-compliance-and-vulnerabilities[{op-system-base} 9 Security Hardening] guide.
18+
For information on how to approach security for any {op-system-base} system, see the {op-system-base} 9 Security Hardening guide.
1619

1720
Use this guide to learn how to approach cryptography, evaluate vulnerabilities, and assess threats to various services.
1821
Likewise, you can learn how to scan for compliance standards, check file integrity, perform auditing, and encrypt storage devices.
1922
endif::[]
2023

21-
With the knowledge of what features you want to harden, you can then decide how to harden them in {op-system}.
24+
[id="additional-resources_security-hardening-what"]
25+
[role="_additional-resources"]
26+
== Additional resources
27+
ifdef::openshift-origin[]
28+
* link:https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/9#Security[Red Hat Enterprise Linux 9 Security Product Documentation]
29+
endif::[]
30+
ifdef::openshift-enterprise,openshift-webscale,openshift-aro[]
31+
* link:https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/9/html-single/security_hardening/index#scanning-container-and-container-images-for-vulnerabilities_scanning-the-system-for-security-compliance-and-vulnerabilities[{op-system-base} 9 Security Hardening Guide]
32+
endif::[]

modules/security-pod-scan-cso-using.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
[id="security-pod-scan-cso-using_{context}"]
77
= Using the {rhq-cso}
88

9+
[role="_abstract"]
910
The following procedure shows you how to use the {rhq-cso}.
1011

1112
.Prerequisites

modules/security-pod-scan-cso.adoc

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
[id="security-pod-scan-cso_{context}"]
77
= Installing the {rhq-cso}
88

9+
[role="_abstract"]
910
You can install the {rhq-cso} from the {product-title} web console Operator Hub, or by using the CLI.
1011

1112
.Prerequisites
@@ -48,7 +49,7 @@ $ oc get packagemanifests container-security-operator \
4849
| head -1
4950
----
5051
+
51-
.Example output
52+
**Example output**
5253
+
5354
[source,terminal]
5455
----
@@ -65,15 +66,15 @@ metadata:
6566
name: container-security-operator
6667
namespace: openshift-operators
6768
spec:
68-
channel: ${CHANNEL} <1>
69+
channel: ${CHANNEL}
6970
installPlanApproval: Automatic
7071
name: container-security-operator
7172
source: redhat-operators
7273
sourceNamespace: openshift-marketplace
73-
startingCSV: ${STARTING_CSV} <2>
74+
startingCSV: ${STARTING_CSV}
7475
----
75-
<1> Specify the value you obtained in the previous step for the `spec.channel` parameter.
76-
<2> Specify the value you obtained in the previous step for the `spec.startingCSV` parameter.
76+
+
77+
For the `spec.channel` parameter, specify the value you obtained in the previous step (such as `stable-3.8`). For the `spec.startingCSV` parameter, specify the value you obtained in the previous step (such as `container-security-operator.v3.8.9`).
7778

7879
.. Enter the following command to apply the configuration:
7980
+
@@ -82,7 +83,7 @@ spec:
8283
$ oc apply -f container-security-operator.yaml
8384
----
8485
+
85-
.Example output
86+
**Example output**
8687
+
8788
[source,terminal]
8889
----

modules/security-pod-scan-query-cli.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
[id="security-pod-scan-query-cli_{context}"]
77
= Querying image vulnerabilities from the CLI
88

9+
[role="_abstract"]
910
Using the `oc` command, you can display information about vulnerabilities detected by the {rhq-cso}.
1011

1112
.Prerequisites

0 commit comments

Comments
 (0)