Chapter 1. Prepare MicroShift for CIS Level 2 compliance


You can run MicroShift on a Red Hat Enterprise Linux (RHEL) host that is hardened to the Center for Internet Security (CIS) Level 2 benchmark. Use this content when you must meet organizational security compliance requirements for edge deployments while keeping core MicroShift functions such as scheduling, ingress, and persistent storage available.

Important

This documentation covers RPM package-mode installations only. Image-based deployments such as RHEL for Edge and image mode for RHEL are out of scope for the initial CIS Level 2 support.

MicroShift can run on RHEL hosts that are hardened to the Center for Internet Security (CIS) Level 2 benchmark.

CIS Level 2 hardening applies strict host controls such as firewall lockdown, audit rules, and system configuration policies that can interfere with container orchestration unless you apply documented overrides and postinstall configuration.

Important

This documentation covers RPM package-mode installations only. Image-based deployments such as RHEL for Edge and image mode for RHEL are out of scope for the initial CIS Level 2 support.

1.1.1. Supported platforms and scope

MicroShift CIS Level 2 documentation applies to the following environment:

  • RHEL 9 and RHEL 10
  • x86_64 and aarch64 architectures
  • RPM package-mode installations of MicroShift

Host compliance is verified with OpenSCAP and the scap-security-guide content by using the xccdf_org.ssgproject.content_profile_cis profile. You cannot use the OpenShift Container Platform Compliance Operator to harden a MicroShift host because that Operator depends on MachineConfig and related OpenShift Container Platform APIs that MicroShift does not provide.

1.1.2. How MicroShift affects CIS scan results

MicroShift introduces host changes that cause a predictable set of CIS rules to fail. These failures are expected on any system that runs Kubernetes containers and cannot be remediated without disabling core networking or container runtime behavior.

The host changes affect the following categories:

  • IP forwarding, which OVN-Kubernetes requires for pod networking
  • Container image file ownership under /var/lib/containers/storage/overlay/
  • kubelet volume and termination-log permissions for projected configuration
  • Privileged-command audit rules for binaries that MicroShift RPMs add after hardening

Plan for these expected failures when you interpret OpenSCAP results after you install and start MicroShift.

1.2. Security compliance standards in MicroShift

MicroShift supports multiple host-level security postures for regulated edge environments. Use Center for Internet Security (CIS) Level 2 hardening together with, or independently from, Federal Information Processing Standard (FIPS) mode depending on your organizational mandates.

1.2.1. Relationship to FIPS mode

FIPS mode controls cryptographic module behavior on the host and in MicroShift containers. CIS Level 2 hardening controls broader host security configuration such as networking defaults, auditing, and firewall policy.

You can enable both when your environment requires cryptographic validation and CIS host hardening. Configure FIPS when you install RHEL, then apply CIS hardening and the MicroShift-required overrides before or after you install MicroShift RPM packages, according to your deployment process.

1.2.2. Scope boundaries

The following boundaries apply to the current CIS Level 2 support for MicroShift:

  • Package mode (RPM) is supported.
  • RHEL for Edge and image mode for RHEL deployments are not covered in this documentation.
  • Host compliance is assessed with OpenSCAP on the RHEL system, not with the OpenShift Container Platform Compliance Operator.
  • Some CIS rule failures remain after a successful MicroShift deployment because of required container platform behavior.

Harden a RHEL host with the Red Hat Official CIS (Center for Internet Security) Ansible roles, apply the overrides that MicroShift requires for IP forwarding, and verify compliance with OpenSCAP.

Prerequisites

  • You have a RHEL 9 or RHEL 10 host on x86_64 or aarch64.
  • You have root or sudo privileges on the host.
  • You can install Ansible and the Red Hat Official CIS role for your RHEL major version.
  • You can install the openscap-scanner and scap-security-guide packages.

Procedure

  1. Install Ansible and obtain the CIS hardening role for your RHEL major version by running the following commands:

    $ sudo dnf install ansible-core -y
    $ ansible-galaxy RedHatOfficial.rhel${<MAJOR_VERSION>}_cis
    $ ansible-galaxy collection install community.general:<10.0.0 ansible.posix

    Replace <MAJOR_VERSION> with the major version of the target operating system.

  2. Create one of the following playbooks that apply CIS Level 2 hardening and override the IP forwarding variables so that the role does not disable forwarding before MicroShift starts.

    Example playbook for RHEL 9

    ---
    - name: Apply CIS Level 2 hardening
      hosts: localhost
      connection: local
      become: true
      roles:
        - role: RedHatOfficial.rhel9_cis
          vars:
            sysctl_net_ipv4_ip_forward: false
            sysctl_net_ipv6_conf_all_forwarding: false

    Example playbook for RHEL 10

    ---
    - name: Apply CIS Level 2 hardening
      hosts: localhost
      connection: local
      become: true
      roles:
        - role: RedHatOfficial.rhel10_cis
          vars:
            sysctl_net_ipv4_ip_forward: false
            sysctl_net_ipv4_conf_all_forwarding: false
            sysctl_net_ipv4_conf_default_forwarding: false
            sysctl_net_ipv6_conf_all_forwarding: false
            sysctl_net_ipv6_conf_default_forwarding: false

    Setting each variable to false tells the role not to disable forwarding. The setting does not enable forwarding. MicroShift enables IP forwarding at startup.

  3. Validate the playbook definition before executing the playbook by entering the following command:

    $ ansible-playbook --check <path_to_playbook>.yml

    Replace <path_to_playbook> with the playbook file path.

  4. Harden the system by running the playbook that you created for your RHEL major version against the host by entering the following command:

    $ ansible-playbook <path_to_playbook>.yml

    Replace <path_to_playbook> with the playbook file path.

  5. Install OpenSCAP scanner packages by entering the following command:

    $ sudo dnf install -y openscap-scanner scap-security-guide
  6. Evaluate the host against the CIS profile by entering one of the following commands for your target operating system.

    • If your target operating system is RHEL 9, enter the following command:

      $ sudo oscap xccdf eval \
        --profile xccdf_org.ssgproject.content_profile_cis \
        --results /tmp/cis-results.xml \
        --report /tmp/cis-report.html \
        /usr/share/xml/scap/ssg/content/ssg-rhel9-ds.xml
    • If your target operating system is RHEL 10, enter the following command:

      $ sudo oscap xccdf eval \
        --profile xccdf_org.ssgproject.content_profile_cis \
        --results /tmp/cis-results.xml \
        --report /tmp/cis-report.html \
        /usr/share/xml/scap/ssg/content/ssg-rhel10-ds.xml
  7. Review /tmp/cis-report.html and remediate unexpected failures before you install MicroShift.

Verification

  • The OpenSCAP report uses the xccdf_org.ssgproject.content_profile_cis profile.
  • Remaining failures match only rules that you expect to address after MicroShift installation, or that are documented as unavoidable for container platforms.

Install MicroShift RPM packages on a Center for Internet Security (CIS) Level 2 hardened host, open the required firewall access, regenerate privileged-command audit rules, start MicroShift, and verify that workloads run.

Prerequisites

  • You hardened the host and applied the IP forwarding playbook overrides.
  • You completed the RPM installation prerequisites for MicroShift, including repository configuration and a pull secret.
  • You have root or sudo privileges on the host.
  • You installed the oc CLI.

Procedure

  1. Install MicroShift from RPM packages by following the standard package-mode installation procedure.

    CIS hardening enables firewalld and restricts traffic. Configure the firewall before or immediately after installation so that the API server, router, and pod networking can function.

  2. Configure required firewall trusted sources and any optional ports that your workloads need.
  3. If you installed MicroShift after you applied CIS hardening, regenerate audit rules for privileged binaries so that they cover binaries from MicroShift RPMs by entering the following commands:

    $ sudo find / -xdev \( -perm -4000 -o -perm -2000 \) -type f 2>/dev/null | \
      awk '{print "-a always,exit -F path=" $1 " -F perm=x -F auid>=1000 -F auid!=unset -k privileged"}' | \
      sudo tee /etc/audit/rules.d/99-privileged-post-install.rules > /dev/null
    $ sudo augenrules --load
  4. Start MicroShift by entering the following command:

    $ sudo systemctl enable --now microshift
  5. Wait for the node to become ready by entering the following command:

    $ oc get node
  6. Deploy a smoke-test application that uses persistent storage and is exposed through an ingress route to validate scheduling, storage, and ingress on the hardened host.

Verification

  • The microshift service is active.
  • The node reports Ready.
  • The smoke-test application is reachable through its route and can read and write persistent storage.
  • A postinstall OpenSCAP scan shows only the documented unavoidable CIS rule failures for IP forwarding, container file ownership, and kubelet volume permissions, plus any site-specific exceptions that you approved.

Use the configuration information when you prepare a Center for Internet Security (CIS) Level 2 host for MicroShift. The information includes required firewall access, playbook overrides, OpenSCAP profile names, expected CIS rule failures, and common remediation steps.

1.5.1. Required firewall access

CIS hardening enables firewalld and denies traffic by default. Configure the following access for MicroShift:

Table 1.1. Required trusted sources
SourceRequiredDescription

10.42.0.0/16 or your custom cluster network classless inter-domain routing (CIDR)

Yes

Host-network pod access to other pods

169.254.169.1

Yes

Host-network pod access to the MicroShift API server

Table 1.2. Common optional ports
PortProtocolDescription

80

TCP

HTTP applications through the router

443

TCP

HTTPS applications through the router

6443

TCP

HTTPS API server access

30000-32767

TCP or UDP

NodePort services

For complete firewall procedures, see the MicroShift firewall documentation.

1.5.2. Hardening playbook overrides

Set the following Ansible role variables to false so that the CIS role does not disable IP forwarding:

For RHEL 9:

  • sysctl_net_ipv4_ip_forward
  • sysctl_net_ipv6_conf_all_forwarding

For RHEL 10:

  • sysctl_net_ipv4_ip_forward
  • sysctl_net_ipv4_conf_all_forwarding
  • sysctl_net_ipv4_conf_default_forwarding
  • sysctl_net_ipv6_conf_all_forwarding
  • sysctl_net_ipv6_conf_default_forwarding

1.5.3. OpenSCAP profile and content

ItemValue

Profile ID

xccdf_org.ssgproject.content_profile_cis

RHEL 9 content

/usr/share/xml/scap/ssg/content/ssg-rhel9-ds.xml

RHEL 10 content

/usr/share/xml/scap/ssg/content/ssg-rhel10-ds.xml

Packages

openscap-scanner, scap-security-guide

1.5.4. Expected CIS rule failures with MicroShift

Table 1.3. IP forwarding
Rule IDRHEL 9RHEL 10

sysctl_net_ipv4_ip_forward

Yes

Yes

sysctl_net_ipv6_conf_all_forwarding

Yes

Yes

sysctl_net_ipv4_conf_all_forwarding

No

Yes

sysctl_net_ipv4_conf_default_forwarding

No

Yes

sysctl_net_ipv6_conf_default_forwarding

No

Yes

Table 1.4. Container file ownership
Rule IDRHEL 9RHEL 10

file_permissions_ungroupowned

Yes

No

no_files_unowned_by_user

Yes

No

no_files_or_dirs_ungroupowned

No

Yes

no_files_or_dirs_unowned_by_user

No

Yes

Table 1.5. kubelet volume permissions
Rule IDRHEL 9RHEL 10

dir_perms_world_writable_sticky_bits

Yes

Yes

file_permissions_unauthorized_world_writable

Yes

Yes

Table 1.6. Audit rules for privileged commands
Rule IDRHEL 9RHEL 10

audit_rules_privileged_commands

Yes (You can remediate this rule by regenerating audit rules after you install MicroShift RPMs.)

Yes (You can remediate this rule by regenerating audit rules after you install MicroShift RPMs.)

1.5.5. Troubleshooting

Pods cannot reach other pods or the API server
Verify that firewalld trusts the cluster network CIDR and 169.254.169.1, then reload the firewall.
Ingress routes are unreachable
Open router ports such as 80/tcp and 443/tcp in the appropriate firewall zone.
OpenSCAP reports IP forwarding failures after MicroShift starts
These failures are expected. OVN-Kubernetes requires IP forwarding. Ensure your hardening playbook used the documented overrides so that the CIS role does not fight MicroShift at boot.
audit_rules_privileged_commands fails after RPM install
Regenerate and load privileged-command audit rules after you install MicroShift packages.
Networking fails immediately after CIS hardening
Confirm that the playbook set the IP forwarding role variables to false and that MicroShift has started so that it can enable forwarding.
Red Hat logoGithubRedditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat Documentation

Legal Notice

Theme

© 2026 Red Hat
Back to top