Use Red Hat Satellite to scan all of your servers for compliance with a customized OpenSCAP policy and evaluate the results.
Outcomes
Create a Red Hat Satellite compliance policy that is customized with a tailoring file.
Initiate an OpenSCAP scan on one or more hosts from Red Hat Satellite by using a compliance policy.
Evaluate the results of a compliance policy's OpenSCAP scans in the Red Hat Satellite web UI.
As the student user on the workstation machine, use the lab command to prepare your environment for this exercise, and to ensure that all required resources are available.
[student@workstation ~]$ lab start compliance-review
Instructions
From the workstation machine, connect to the Satellite web UI at https://satellite.lab.example.com.
If prompted, accept the self-signed certificate and log in as the admin user with redhat as the password.
Upload a new tailoring file named ComplianceLab-TailoringFile to customize the default Standard System Security profile for RHEL 9 SCAP content.
Upload the tailoring file from /home/student/RH415-tailoring.xml to Satellite.
Select Operations from the list.
At some resolutions, the list displays in a sidebar menu. If the list does not display at the top, then navigate to → from the sidebar menu.
In the Satellite web UI, navigate to → → . Click to upload a new tailoring file.
On the page, enter ComplianceLab-TailoringFile in the field.
Click to upload the /home/student/RH415-tailoring.xml tailoring file.
Click .
Create a compliance policy named ComplianceLab-Policy1 by using the default RHEL 9 SCAP content.
Choose the [DRAFT] DISA STIG for Red Hat Enterprise Linux 9 XCCDF profile and the ComplianceLab-TailoringFile tailoring file.
The policy should execute weekly on Sunday and should be deployed by using Ansible.
Use the following table to specify the other fields for the compliance policy:
Table 11.3. Compliance Policy Parameters
| Field | Value |
|---|---|
| Deployment | Ansible |
| Locations | Default Location |
| Organizations | Operations |
| Hostgroups | org-hostgroup1 |
Navigate to → → .
Click .
Select Ansible as the deployment option, and then click .
On the page, enter ComplianceLab-Policy1 as the name of the policy.
The policy description is optional.
Click .
On the tab, set the following values:
Select rhel9 content from the list.
For , select ComplianceLab-TailoringFile.
The list automatically sets the [DRAFT] DISA STIG for Red Hat Enterprise Linux 9 [CUSTOMIZED] XCCDF profile, because only one profile is included in the tailoring file.
Click .
On the tab, choose Weekly for .
For , select Sunday.
Click .
On the tab, select Default Location to move it to the list.
Click .
On the tab, select Operations to move it to the list.
Click .
On the tab, select org-hostgroup1 to move it to the list.
Click to create the compliance policy.
Assign the ComplianceLab-Policy1 policy to all hosts.
Navigate to → → , and then select the checkboxes for the servera.lab.example.com and serverb.lab.example.com hosts.
Click and select Assign Compliance Policy from the list.
Select .
Select ComplianceLab-Policy1 from the list and click .
Select the checkboxes for the servera.lab.example.com and serverb.lab.example.com hosts.
Click , and then select Run all Ansible roles from the list.
Manually run the compliance scan on the following hosts to update the clients with the new compliance policy.
servera.lab.example.com
serverb.lab.example.com
View and download the results of the ComplianceLab-Policy1 OpenSCAP scan.