When to Enable FIPS Mode on AlmaLinux 9 for Regulated Workloads
FIPS mode on AlmaLinux 9 narrows crypto to validated modules. Enable it only for regulated workloads, validate in staging, and verify with fips-mode-setup, /proc/sys/crypto/fips_enabled, and /proc/cmdline after reboot.
08 Jul 2025, 15:34 UTC

An auditor asks for FIPS 140-2 on your AlmaLinux 9 fleet, and the easy answer is to flip it on everywhere. The useful answer is to enable it only where a regulated workload requires a validated cryptographic boundary, and to do it before production data flows through the system.
AlmaLinux 9 ships RHEL 9-derived FIPS tooling such as dracut-fips and fips-mode-setup. The validation scope is the system cryptographic libraries, not the whole operating system. AlmaLinux is RHEL-compatible but does not independently hold a FIPS 140-2 validation; compliance depends on the underlying module and your organization’s accreditation process.
What FIPS mode actually changes
FIPS mode is not a general hardening switch. It constrains the kernel crypto API and user-space libraries to approved algorithms and self-tests. OpenSSL and GnuTLS route operations through FIPS-approved paths where available, and non-approved algorithms such as MD5, SHA-1 signatures, or legacy TLS ciphers become unavailable.
Third-party or out-of-tree kernel and cryptographic modules fall outside the FIPS validation boundary. If a service depends on those modules, FIPS mode will break it.
Enablement mechanics without surprises
FIPS can be enabled at install time via boot or kickstart options, or post-install before the system processes regulated data. Post-install enablement requires root, a maintenance window, and a reboot.
A supported post-install workflow on AlmaLinux 9 uses fips-mode-setup to automate kernel command line changes and initramfs regeneration:
# fips-mode-setup --enableRun as root on the AlmaLinux 9 host. The command updates the bootloader entry to include fips=1, regenerates the initramfs with dracut-fips, and schedules a reboot. The reboot is required for the kernel crypto API to enter FIPS mode.
Risks to plan for: services that rely on non-approved algorithms will fail after reboot. Validate in a staging system that mirrors production packages and traffic. Schedule the change with a rollback plan, because initramfs regeneration and kernel parameter changes are state-changing.
Verification you can trust in production
After reboot, confirm the system is actually in FIPS mode and that the boot chain is correct.
- Run fips-mode-setup --check as root and confirm it reports FIPS mode as enabled.
- Read /proc/sys/crypto/fips_enabled and confirm it returns 1.
- Inspect /proc/cmdline and confirm the fips=1 kernel parameter is present.
- Use OpenSSL to list providers or negotiate a TLS connection and confirm only FIPS-approved algorithms are in use.
These checks verify the kernel flag, the userspace tooling, and the practical effect on applications.
Trade-offs and limits that drive the decision
Enabling FIPS on an already running system can break existing services. The restriction is intentional, but it is also irreversible for non-approved code paths.
Limitations to document for stakeholders: FIPS mode does not patch vulnerabilities or secure overall configuration by itself. It only narrows algorithm choice to validated modules. Out-of-tree drivers, custom crypto libraries, and some container images will not be covered.
If you need to revert, use fips-mode-setup --disable as root, regenerate the initramfs, and reboot. Treat disablement as a change with the same maintenance and validation requirements as enablement.
Enable FIPS mode on AlmaLinux 9 when a specific workload requires a validated cryptographic boundary, after staging validation, and with verification steps in place. For general hardening without a regulatory requirement, standard patching, SELinux, and TLS configuration provide broader security benefit with fewer compatibility costs.
0 replies
A thoughtful contribution can make all the difference. Be the first to share one.