Skip to content

Commit 66a5fd6

Browse files
committed
BZ2079092: add SELinux warnings and fix hard returns
1 parent 498468e commit 66a5fd6

File tree

2 files changed

+32
-87
lines changed

2 files changed

+32
-87
lines changed

modules/security-hardening-how.adoc

Lines changed: 16 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -6,53 +6,34 @@
66

77
= Choosing how to harden {op-system}
88

9-
Direct modification of {op-system} systems in {product-title} is discouraged.
10-
Instead, you should think of modifying systems in pools of nodes, such
11-
as worker nodes and control plane nodes. When a new node is needed, in
12-
non-bare metal installs, you can request a new node of the type
13-
you want and it will be created from an {op-system} image plus the
14-
modifications you created earlier.
9+
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.
1510

16-
There are opportunities for modifying {op-system} before installation,
17-
during installation, and after the cluster is up and running.
11+
There are opportunities for modifying {op-system} before installation, during installation, and after the cluster is up and running.
1812

1913
[id="security-harden-before-installation_{context}"]
2014
== Hardening before installation
2115

22-
For bare metal installations, you can add hardening features to
23-
{op-system} before beginning the {product-title} installation. For example,
24-
you can add kernel options when you boot the {op-system} installer
25-
to turn security features on or off, such as SELinux or various
26-
low-level settings, such as symmetric multithreading.
16+
For bare metal installations, you can add hardening features to {op-system} before beginning the {product-title} installation. For example, you can add kernel options when you boot the {op-system} installer to turn security features on or off, such as various SELinux booleans or low-level settings, such as symmetric multithreading.
2717

28-
Although bare metal {op-system} installations are more difficult,
29-
they offer the opportunity of getting operating system
30-
changes in place before starting the {product-title} installation. This can be important when you need to ensure that certain
31-
features, such as disk encryption or special networking settings, be
32-
set up at the earliest possible moment.
18+
[WARNING]
19+
====
20+
Disabling SELinux on {op-system} nodes is not supported.
21+
====
22+
23+
Although bare metal {op-system} installations are more difficult, they offer the opportunity of getting operating system changes in place before starting the {product-title} installation. This can be important when you need to ensure that certain features, such as disk encryption or special networking settings, be set up at the earliest possible moment.
3324

3425
[id="security-harden-during-installation_{context}"]
3526
== Hardening during installation
3627

37-
You can interrupt the {product-title} installation process and change
38-
Ignition configs. Through Ignition configs, you can add your own files
39-
and systemd services to the {op-system} nodes.
40-
You can also make some basic security-related changes to the `install-config.yaml` file
41-
used for installation.
42-
Contents added in this way are available at each node's first boot.
28+
You can interrupt the {product-title} installation process and change Ignition configs. Through Ignition configs, you can add your own files and systemd services to the {op-system} nodes. You can also make some basic security-related changes to the `install-config.yaml` file used for installation. Contents added in this way are available at each node's first boot.
4329

4430
[id="security-harden-after-installation_{context}"]
4531
== Hardening after the cluster is running
46-
After the {product-title} cluster is up and running, there are
47-
several ways to apply hardening features to {op-system}:
32+
After the {product-title} cluster is up and running, there are several ways to apply hardening features to {op-system}:
4833

4934
* Daemon set: If you need a service to run on every node, you can add
50-
that service with a
51-
link:https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/[Kubernetes `DaemonSet` object].
52-
* Machine config: `MachineConfig` objects contain a subset of Ignition configs in the same format.
53-
By applying machine configs to all worker or control plane nodes,
54-
you can ensure that the next node of the same type that is added
55-
to the cluster has the same changes applied.
56-
57-
All of the features noted here are described in the {product-title}
58-
product documentation.
35+
that service with a link:https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/[Kubernetes `DaemonSet` object].
36+
37+
* 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.
38+
39+
All of the features noted here are described in the {product-title} product documentation.

modules/security-hosts-vms-rhcos.adoc

Lines changed: 16 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -5,66 +5,30 @@
55
[id="security-hosts-vms-rhcos_{context}"]
66
= Securing containers on {op-system-first}
77

8-
Containers simplify the act of deploying many applications to run on the same host,
9-
using the same kernel and container runtime to spin up each container.
10-
The applications can be owned by many users and, because they are kept
11-
separate, can run different, and even incompatible, versions of those applications
12-
at the same time without issue.
8+
Containers simplify the act of deploying many applications to run on the same host, using the same kernel and container runtime to spin up each container. The applications can be owned by many users and, because they are kept separate, can run different, and even incompatible, versions of those applications at the same time without issue.
139

14-
In Linux, containers are just a special type of process, so securing
15-
containers is similar in many ways to securing any other running process.
16-
An environment for running containers starts with an operating system
17-
that can secure the host kernel from
18-
containers and other processes running on the host, as well as
19-
secure containers from each other.
10+
In Linux, containers are just a special type of process, so securing containers is similar in many ways to securing any other running process. An environment for running containers starts with an operating system that can secure the host kernel from containers and other processes running on the host, as well as secure containers from each other.
2011

21-
Because {product-title} {product-version} runs on {op-system} hosts,
22-
with the option of using {op-system-base-full} as worker nodes,
23-
the following concepts apply by default to any deployed {product-title}
24-
cluster. These {op-system-base} security features are at the core of what
25-
makes running containers in {product-title} more secure:
12+
Because {product-title} {product-version} runs on {op-system} hosts, with the option of using {op-system-base-full} as worker nodes, the following concepts apply by default to any deployed {product-title} cluster. These {op-system-base} security features are at the core of what makes running containers in {product-title} more secure:
2613

27-
* _Linux namespaces_ enable creating an abstraction of a particular global system
28-
resource to make it appear as a separate instance to processes within a
29-
namespace. Consequently, several containers can use the same computing resource
30-
simultaneously without creating a conflict.
31-
Container namespaces that are separate from the host by default include mount table, process table,
32-
network interface, user, control group, UTS, and IPC namespaces.
33-
Those containers that need direct access to host namespaces need to have
34-
elevated permissions to request that access.
14+
* _Linux namespaces_ enable creating an abstraction of a particular global system resource to make it appear as a separate instance to processes within a namespace. Consequently, several containers can use the same computing resource simultaneously without creating a conflict. Container namespaces that are separate from the host by default include mount table, process table, network interface, user, control group, UTS, and IPC namespaces. Those containers that need direct access to host namespaces need to have elevated permissions to request that access.
3515
ifdef::openshift-enterprise,openshift-webscale,openshift-aro[]
36-
See
37-
link:https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html-single/building_running_and_managing_containers/index[Overview of Containers in Red Hat Systems]
38-
from the {op-system-base} 8 container documentation for details on the types of namespaces.
16+
See link:https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html-single/building_running_and_managing_containers/index[Overview of Containers in Red Hat Systems] from the {op-system-base} 8 container documentation for details on the types of namespaces.
3917
endif::[]
4018

41-
* _SELinux_ provides an additional layer of security to keep containers isolated
42-
from each other and from the host. SELinux allows administrators to enforce
43-
mandatory access controls (MAC) for every user, application, process, and file.
19+
* _SELinux_ provides an additional layer of security to keep containers isolated from each other and from the host. SELinux allows administrators to enforce mandatory access controls (MAC) for every user, application, process, and file.
4420

45-
* _CGroups_ (control groups) limit, account for, and isolate the resource usage
46-
(CPU, memory, disk I/O, network, etc.) of a collection of processes. CGroups are
47-
used to ensure that containers on the same host are not impacted by each other.
21+
[WARNING]
22+
====
23+
Disabling SELinux on {op-system} is not supported.
24+
====
4825

49-
* _Secure computing mode (seccomp)_ profiles can be associated with a container to
50-
restrict available system calls. See page 94 of the
51-
link:https://access.redhat.com/articles/5059881[OpenShift Security Guide] for details about seccomp.
26+
* _CGroups_ (control groups) limit, account for, and isolate the resource usage (CPU, memory, disk I/O, network, etc.) of a collection of processes. CGroups are used to ensure that containers on the same host are not impacted by each other.
5227

53-
* Deploying containers using _{op-system}_ reduces the attack surface by
54-
minimizing the host environment and tuning it for containers.
55-
The link:https://access.redhat.com/documentation/en-us/openshift_container_platform/3.11/html-single/cri-o_runtime/index[CRI-O container engine] further reduces that attack surface by
56-
implementing only those features required by Kubernetes and {product-title} to
57-
run and manage containers, as opposed to other container engines
58-
that implement desktop-oriented standalone features.
28+
* _Secure computing mode (seccomp)_ profiles can be associated with a container to restrict available system calls. See page 94 of the link:https://access.redhat.com/articles/5059881[OpenShift Security Guide] for details about seccomp.
5929

60-
{op-system} is a version of {op-system-base-full} that is specially
61-
configured to work as control plane (master) and worker nodes
62-
on {product-title} clusters.
63-
So {op-system} is tuned to efficiently run container workloads, along with
64-
Kubernetes and {product-title} services.
30+
* Deploying containers using _{op-system}_ reduces the attack surface by minimizing the host environment and tuning it for containers. The link:https://access.redhat.com/documentation/en-us/openshift_container_platform/3.11/html-single/cri-o_runtime/index[CRI-O container engine] further reduces that attack surface by implementing only those features required by Kubernetes and {product-title} to run and manage containers, as opposed to other container engines that implement desktop-oriented standalone features.
6531

66-
To further protect {op-system} systems in {product-title} clusters,
67-
most containers, except those managing or monitoring the host system itself,
68-
should run as a non-root user. Dropping the privilege level or
69-
creating containers with the least amount of privileges possible is recommended
70-
best practice for protecting your own {product-title} clusters.
32+
{op-system} is a version of {op-system-base-full} that is specially configured to work as control plane (master) and worker nodes on {product-title} clusters. So {op-system} is tuned to efficiently run container workloads, along with Kubernetes and {product-title} services.
33+
34+
To further protect {op-system} systems in {product-title} clusters, most containers, except those managing or monitoring the host system itself, should run as a non-root user. Dropping the privilege level or creating containers with the least amount of privileges possible is recommended best practice for protecting your own {product-title} clusters.

0 commit comments

Comments
 (0)