Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.
Chapter 8. Enabling FIPS mode in a bootc image build
The Federal Information Processing Standard (FIPS) 140 defines requirements for cryptographic modules. To fulfill these requirements, you must enable FIPS mode. You can enable FIPS mode during the bootc container image build.
8.1. Creating a bootable disk image for a FIPS-enabled system Link kopierenLink in die Zwischenablage kopiert!
You can create a disk image and enable FIPS mode when performing an Anaconda installation. You must add the fips=1 kernel argument when booting the disk image.
Prerequisites
- You have Podman installed on your host machine.
-
You have
virt-installinstalled on your host machine. -
You have root access to run the
bootc-image-buildertool, and run the containers in--privilegedmode, to build the images.
Procedure
Create a
01-fips.tomlto configure FIPS enablement, for example:# Enable FIPS kargs = ["fips=1"]Create a Containerfile with the following instructions to enable the
fips=1kernel argument and adjust the cryptographic policies:FROM registry.redhat.io/rhel10/rhel-bootc:latest # Enable fips=1 kernel argument: https://bootc-dev.github.io/bootc/building/kernel-arguments.html COPY 01-fips.toml /usr/lib/bootc/kargs.d/ # Install and enable the FIPS crypto policy RUN dnf install -y crypto-policies-scripts && update-crypto-policies --no-reload --set FIPSBefore running the container, initialize the
outputfolder. Use the-pargument to ensure that the command does not fail if the directory already exists:$ mkdir -p ./outputCreate your bootc
<image>compatible base disk image by usingContainerfilein the current directory:$ sudo podman run \ --rm \ -it \ --privileged \ --pull=newer \ --security-opt label=type:unconfined_t \ -v ./config.toml:/config.toml:ro \ -v ./output:/output \ -v /var/lib/containers/storage:/var/lib/containers/storage \ registry.redhat.io/rhel10/bootc-image-builder:latest \ --type iso \ quay.io/<namespace>/<image>:<tag>Enable FIPS mode during the system installation:
-
When booting the RHEL Anaconda installer, on the installation screen, press the TAB key and add the
fips=1kernel argument. After the installation, the system starts in FIPS mode automatically.
-
When booting the RHEL Anaconda installer, on the installation screen, press the TAB key and add the
Verification
After login in to the system, check that FIPS mode is enabled:
$ cat /proc/sys/crypto/fips_enabled 1 $ update-crypto-policies --show FIPS
Additional resources