Red Hat Lightspeed via the Hybrid Cloud Console - Evaluate regulatory compliance.

Your next task is to evaluate the internet connected RHEL 9.7 system for compliance to the Center for Internet Security (CIS) Level 1 Server policy and identify what needs to be updated/changed to get the system into compliance.

Red Hat Lightspeed includes a compliance service that helps with this task.

The compliance service uses Open Security Content Automation Protocol (OpenSCAP) and the RHEL SCAP Security Guide (SSG) to evaluate systems for a variety of regulatory compliance policies like DISA STIG (Defense Information Systems Agency Security Technical Implementation Guide), PCI DSS (Payment Card Industry Data Security Standard), HIPAA (Health Insurance Portability and Accountability Act), CIS (Center for Internet Security), and several more.

Each policy is made up of a number of rules, and the compliance service enables you to define the policy from one of the standards, then tailor (change) the policy to meet your needs including disabling specific rules or changing specific values to better align with your organizational needs.

You will create a CIS Level 1 Server policy then customize the policy and add your RHEL 9.7 host to the policy.

After you’ve created the policy you’ll log into the terminal of the RHEL server and run the command that performs a compliance scan and sends the results to the Hybrid Cloud Console.

You’ll then review the results and identify any changes that need to be made to bring the system into compliance with the policy.

Expand a section below to complete the tasks in that section. Please complete each section in order.

Log in to the Hybrid Cloud Console

If you still have the Hybrid Cloud Console open from the previous module, skip to step #2 in the next section.

If you do not already have it open from the previous module, please use a web browser to navigate to the Hybrid Cloud Console .
Log into the Hybrid Cloud Console with the following credentials:

User:

rhpd-rhlightspeed-lb1141

Password:

rhdp*Lightspeed-2027!
Create a compliance policy
  1. On the main page locate the Red Hat Enterprise Linux tile in the upper left and click RHEL.

LB1141 M02 01
Figure 1. Hybrid Cloud Console Home Page
  1. On the left hand navigation bar go to Security → Compliance → SCAP Policies

Depending on your screen resolution the left hand navigation bar may automatically minimize. You may need to click the hamburger menu (3 lines stacked on top of each other) in the upper left corner in order to see the menu bar.

This page is showing you the SCAP policies in your environment.

  1. Click the Create new policy button.

  2. Select RHEL 9.

  3. Near the Policy type box in the Filter by policy name search bar, type CIS

  4. Select the radio button to the left of “CIS Red Hat Enterprise Linux 9 Benchmark for Level 1 - Server”.

This will look like the below image.

LB1141 M03 02
Figure 2. Creating a SCAP policy
SCAP policies have dependencies on the version of RHEL. Notice the Supported OS versions column. Not all policies support all versions of RHEL.
  1. Click Next.

  2. Provide a policy name of:

CHANGEME CIS L1 Server Policy
Please replace the default policy name with the policy name as shown above. This helps you find your policy in later steps and will help with automated cleanup tasks.
  1. Optionally you can enter a description or business objective.

  2. Red Hat Lightspeed allows you to set a compliance threshold. This means that anything over the entered threshold is considered compliant even if some rules are not passed.
    Set the Compliance threshold (%) to 97

  3. Click Next.

  4. Locate and select your RHEL 9.7 host. It may help to use the search filter.
    Reminder: your system name is: rhel-CHANGEME-1

Please only add your host to this policy.
  1. Click Next.

  2. In the Rules section of the wizard you can tailor your policy. This means that you can customize the policy by unselecting rules or editing values.
    One place where Infinicorp is more strict than the policy is that the maximum password age at Infinicorp is 45 days. You need to tailor the policy to reflect this.

  3. Next to the Name filter in the Filter by name box enter:

Set Existing Passwords Maximum Age
  1. Expand the resulting rule so that you can see the details.
    Scroll down to where you see the Depends on values as shown in the image below.

LB1141 M03 03
Figure 3. Tailoring Max Age value
  1. Click the pencil icon beside maximum password age: 60.

  2. Enter a new value of 45 and click the check icon as shown in the image below.

LB1141 M03 04
Figure 4. Tailoring Max Age value

This updated the rule to a maximum password of 45 days.
You could have simply unchecked the rule if you didn’t want to evaluate this rule at all in your environment, but Infinicorp has very strict adherence to policies.

  1. Click Next.

  2. Review the policy and click Finish.

  3. Click Return to application to close the wizard. In the list of policies you should see your newly created policies. Use the filter by name and search for CHANGEME if you have issues locating it.

With your policy created and tailored you are ready to move onto the next step - evaluate the RHEL host against your newly created policy.

It is suggested to leave your Hybrid Cloud Console tab or window open as you will need it in a future section.
Evaluate your system for compliance

This RHEL 9.7 system was built using the image builder service in Red Hat Lightspeed.
As a part of the image build process Infinicorp identified that the system needed to be compliant to CIS Level 1 Server.
As a result it is expected that this system will be compliant, but there might still be improvements that can be made to the image.
Scanning the system will give us great insights into changes we can make for future images.

Red Hat Lightspeed uses an insights-client command on the host to perform the evaluation.

Though the name of Insights changed to Red Hat Lightspeed, packages, command lines, and APIs still refer to 'insights'. As such, the 'insights-client' command is still the correct one to use.
  1. From your showroom environment, click the tab labeled rhel-CHANGEME-1 terminal.

lb1187 M3 terminaltab
Figure 5. rhel-CHANGEME-1 terminal tab
  1. Run the following command:

sudo insights-client --compliance

Running the insights-client --compliance command will use OpenSCAP to scan the system and upload the resulting xccdf (eXtensible Configuration Checklist Description Format) file to the Hybrid Cloud Console for review.

LB1141 M03 05
Figure 6. Evaluating compliance status
While the regular insights-client command runs daily as a systemd process, the --compliance command is not included in that daily run. Once you deploy this on your systems you will want to schedule this to run on a recurring basis using cron or similar. This is covered in more detail in the documentation.

Do not continue to the next step until this command has completed and returns to the terminal prompt as shown in the image above. This process can take anywhere from 1-5 minutes.

Review your compliance report

To review the compliance report, return to the Hybrid Cloud Console. Ideally you already have this tab open from an earlier exercise. If not, go back to the section on logging into the Hybrid Cloud Console. We are going to pick back up in the compliance section where we left off.

  1. In the Hybrid Cloud Console go to Security → Compliance → Reports.
    If you closed the page, click this link to go to the right place.

  2. Locate (do not click) your policy. It may help to use the filter at the top to locate your policy.
    Your policy should be named CHANGEME CIS L1 Server Policy.

If you did not run insights-client --compliance in the previous section, or if the operation is still in progress, your policy will not display here. Policies do not display reports until at least one system is reporting.
  1. The report will show you at a glance the name of the policy, the operating system, and the compliance rate. You should be 100% compliant. Notice that there is an export symbol to the right of Systems meeting compliance.
    It is possible to export a report from this page, but we are not going to do so at this time.

LB1141 M03 06
Figure 7. Report Summary
  1. Click on your policy name. This will open the report giving additional details.

LB1141 M03 07
Figure 8. Report Details

From here you can see your policy status.
Starting in the upper left, we have 100% of systems compliant to the policy.
The only conditions that are showing are compliant and non-compliant, but there are several possible conditions:

  • Compliant - Passing with the specified threshold percentage

  • Non-compliant - Not passing with the specified threshold percentage

  • Unsupported - If a system is using a version of the SCAP Security Guide (SSG) that is either too old OR too new, the system will report itself as unsupported. There is a full support matrix available.

  • Not reporting - The system is assigned to the policy, but has not yet been evaluated for compliance.

The last two conditions are not displayed since you don’t have any systems in those conditions (compliant and non-compliant are always shown).
However, these conditions are great to be aware of.
It is common for someone for example to dnf upgrade and update the ssg package to the latest version.
That latest version may not be compatible with an older version of RHEL and the results can be deceptive.
Rather than giving a deceptive or potentially incorrect score, the compliance report will report as unsupported while still giving you a rules failed number.

Not reporting is also a huge help in large environments - If you have 5000 systems that you expect to be held to the CIS policy and only 4990 are reporting it might otherwise be difficult to know that those last 10 systems aren’t being scanned.
The compliance report will tell you if a system isn’t reporting.
There are also tabs below for Reporting and Never reported where you can easily get a list of these systems.

Looking at the bottom of the page, we can see the system that you scanned.
In this case your system is compliant, with a compliance score of 97% and 7 failed rules.
Since the compliance threshold was set at 97%, this 97% score is considered passing.

Each rule in a policy is weighted with a severity, so it is possible to have a 100% passing score and still have individual rules failing.

At this point you have scanned the system and your RHEL 9.7 has a passing score.
Next, you should take a look at what failed and see what can be improved.
(Move onto the next section, but don’t leave this page.)

Identifying failed rules

You know that your system is compliant to the CIS Level 1 Server policy, but the system still has 7 failed rules. Take a look to see what you can improve on this system to send back to Infinicorp SecOps.

Begin where you left off in the policy report.

LB1141 M03 07
Figure 9. Report Details
  1. In the bottom of the report you see the row with your system, the failed rules, and the compliance score.

  2. The system has 7 failed rules. Click the 7.

  3. Clicking the 7 took you to the system view with compliance specific details of this system and it applied the filter: Rule state: Failed rules.
    This shows you the system and only the rules that have failed.

  1. Click the arrow to the left of Disable SSH Root Login to expand the failed rule - this should look like the image below.

LB1141 M03 08
Figure 10. System Details

For any failed rule the compliance service shows you the name of the rule, the severity (which affects the scoring), the description of the rule, identifier and references with links, and a rationale for the rule.

Be sure to note that each rule also has a column for Remediation type which will be either Playbook or Manual.
For the Disable SSH Root Login rule there is a Playbook available to remediate the issue.

  1. Look through the other rules that have failed.
    Notice that the majority of the rules have playbooks available to remediate.

  2. Above the failed rules, next to the filters, notice that there is an export button.
    This will export the failed rules for review.
    This would be very useful for sending a list of failed rules to the SecOps team.

  3. Look through the list of rules and click the checkbox next to one or more of the rules that have a remediation type of Playbook.
    Selecting a rule will enable the Plan remediation button.

  4. Click the Plan remediation button.
    This will open the Plan a remediation wizard.

  5. Name your playbook:

CHANGEME compliance fix
  1. Under Plan name, click "Create new plan CHANGEME compliance fix"

LB1141 M03 09
Figure 11. Name New Plan
If you do not click the Create new plan dropdown, the "Create Plan" button will not become available.

The Plan summary assigns a point value to the remediation plan. This remediation capability is pretty basic compared to something like Ansible Automation Platform, and this plan summary keeps the plan from getting so complicated that Red Hat Lightspeed can’t relaibly remediate. The remediation tools cap you at 100 systems and 1000 action points.

You are also given the option to download a preview of the playbook, but you will do that in a moment.

  1. Click Create Plan.

LB1141 M03 10
Figure 12. Create Plan
  1. You will be redirected to the Automation Toolkit -→ Remediations Plans section of the Hybrid Cloud Console. Your plan will be open.
    The Planned remediation tab will list the fixes for the issues you selected and let you know if a reboot is required.

LB1141 M03 11
Figure 13. Remediation Plan
  1. While looking at your remediation plan you created, you have a couple of options in the upper right.
    The Execute button is unavailable. Your user in this lab does not have permission to execute remediation. No user gets this permission by default - it has to be explicitly provided.

Due to the high volume of concurrent participants taking this lab, this feature is not enabled. An interactive demo was shared at the end of module 2 that shows how this works.
  1. Click the Download button.
    The playbook is downloaded via your browser.

The exact steps may vary per browser, in chrome you click "Save" to save the file.

To view the playbook you will need to locate the downloaded file then open the .yml file in a text editor.

This playbook can help simplify the resolution of this issue - you could easily adapt this to run via ansible automation or sync this playbook with Ansible Automation Platform (AAP) - this is covered in the AAP documentation but we are not covering it in this lab.

At this point you have evaluated the internet connected RHEL 9.7 system for compliance to the Center for Internet Security (CIS) Level 1 Server policy and identified what needs to be updated/changed to get the system into compliance.

You can send the exported list of failed rules to the SecOps team as well as a playbook that shows how to fix the majority of the issues in the event that you need to secure this host even further.

This module is complete.