RHCOS (Red Hat Enterprise Linux CoreOS) is the operating system that runs on every OpenShift control plane and worker node. It is not a general-purpose Linux distribution — it is a purpose-built, immutable, container-optimised OS designed to run exclusively as a managed node in an OpenShift cluster. Its security posture is architecturally different from a hardened RHEL installation: rather than hardening a mutable system through configuration management, RHCOS makes the OS layer structurally resistant to modification by design. The root filesystem’s /usr tree is read-only (enforced at mount time by rpm-ostree and, in recent versions, by composefs over the OSTree object store), /etc and /var are writable but managed exclusively by the Machine Config Operator (MCO), and no package manager is available at runtime for ad-hoc software installation. An operator who wants to change any node-level configuration — kernel arguments, sysctl settings, systemd units, certificates, kubelet configuration — creates a MachineConfig object in the OpenShift API; the MCO renders it into an Ignition config, applies it to the target MachineConfigPool (master, worker, or custom), and drains and reboots the affected nodes in a rolling fashion. Direct SSH access to nodes for configuration changes is explicitly unsupported and actively discouraged — oc debug node/<name> is the supported emergency access path, dropping into a privileged container on the node’s host namespaces under audit.
Provisioning and first-boot security in RHCOS is handled by Ignition: a first-boot provisioning tool that runs in the initramfs before any systemd unit, reads a JSON configuration document (the Ignition config) delivered via userdata, kernel argument, or a URL, and applies an ordered set of filesystem operations, file writes, and systemd unit enablements before handing off to systemd. The Ignition config is the canonical bootstrap artifact — it configures network interfaces, writes SSH authorised keys, installs certificates, and optionally configures disk encryption before any user data is written. RHCOS disk encryption is not enabled by default and must be explicitly opted into via the diskEncryption stanza in the OpenShift install-config: tpm2 mode seals the LUKS2 volume key to the node’s TPM2 chip using a Clevis tpm2 pin (with PCR 7 for Secure Boot state), tang mode binds it to a Tang server using NBDE/Clevis, and combining both — with a Clevis SSS threshold-2 policy requiring both the TPM PCR measurement and Tang server reachability — is the recommended pattern for bare-metal deployments requiring the strongest protection. The cipher used is AES-256-XTS (or AES-256-CBC in FIPS mode). When encryption is configured, it is applied before the first systemd unit runs — all data written to the root disk from the very first journal entry onwards is encrypted, with no unencrypted window during installation. Secure Boot is supported and recommended on bare-metal: RHCOS ships a shim-signed EFI binary chain rooted in the Microsoft CA, with GRUB as the bootloader (RHCOS does not yet support UKI-based boot) measuring boot components into TPM PCRs via GRUB’s TPM module, enabling the TPM2 PCR 7 Clevis binding to reflect the Secure Boot policy state that was active when the disk was sealed.
Runtime security controls in RHCOS are non-negotiable by design. SELinux is always enforcing — disabling it is explicitly unsupported, and a node with SELinux disabled must be re-provisioned rather than reconfigured before it can rejoin a production cluster. The targeted policy with MCS category separation confines every container process to a unique label pair and the sVirt model (via libvirt on KVM-backed nodes) extends this to VM processes. cgroups v2 is the default resource controller since OpenShift 4.14, enabling the QoS-based eviction and memory pressure handling that cgroupv2 provides. seccomp profiles are applied to containers by the container runtime (CRI-O, which replaced Docker in OpenShift 4.x) using the RuntimeDefault profile mandated by the PSA Restricted policy; SCCs provide the OpenShift-specific pod security layer on top of PSA, with the restricted-v2 SCC as the default for all authenticated users. The CRI-O container runtime implements only the features required by Kubernetes, deliberately excluding the broader feature surface of daemon-oriented container engines — reducing the attack surface compared to a general-purpose container runtime. FIPS 140-3 mode can be enabled cluster-wide at install time (fips: true in install-config.yaml); this switches the kernel and all cryptographic libraries to FIPS-approved algorithms (AES-256-CBC for LUKS, HMAC-SHA-256 for integrity, RSA-2048 minimum for TLS), and once enabled cannot be disabled without re-provisioning. The MCO manages day-2 security hardening through MachineConfig objects: kernel arguments (audit=1, slub_debug), sysctl settings via MachineConfig with kernel-devel extensions, custom SELinux policy modules via MachineConfig file drops into /etc/selinux/targeted/, and AIDE configuration — all applied uniformly across node pools through the same GitOps-friendly MachineConfig API, making RHCOS security posture reproducible, auditable, and version-controlled in the same repository as the workloads it runs.
