Use Red Hat Satellite to perform an OpenSCAP scan of one of your servers, and evaluate the results.
Outcomes
Create a Red Hat Satellite compliance policy for centralized OpenSCAP scans.
Manually trigger a compliance policy scan on a Red Hat Satellite client.
Evaluate the compliance report for that scan 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-scan
Instructions
On the serverd machine, install the scap-security-guide package to get the supported SCAP content for RHEL 9.
Log in to the serverd machine as the student user.
Change to the root user.
Use student as the password.
[student@workstation ~]$ssh student@serverd[student@serverd ~]$sudo -i[sudo] password for student:student[root@serverd ~]#
Install the scap-security-guide package on the serverd machine.
[root@serverd ~]#dnf install scap-security-guide...output omitted... Install 6 Packages Total download size: 3.2 M Installed size: 100 M Is this ok [y/N]:y...output omitted...
Return to the workstation machine.
[root@serverd ~]#logout[student@serverd ~]$logoutConnection to serverd closed. [student@workstation ~]$
Copy the /usr/share/xml/scap/ssg/content/ssg-rhel9-ds.xml file from the serverd machine to the Desktop directory on the workstation machine.
[student@workstation ~]$ scp \
serverd:/usr/share/xml/scap/ssg/content/ssg-rhel9-ds.xml \
Desktop/ssg-rhel9-ds.xml
...output omitted..Upload the supported SCAP content for RHEL 9 to Satellite.
Log in to the satellite machine as the student user.
Change to the root user.
Use student as the password.
[student@workstation ~]$ssh student@satellite[student@satellite ~]$sudo -i[sudo] password for student:student[root@satellite ~]#
Create the /usr/share/xml/scap/custom directory.
Copy the Desktop/ssg-rhel9-ds.xml file from the workstation machine to the /usr/share/xml/scap/custom directory.
[root@satellite ~]#mkdir -p /usr/share/xml/scap/custom[root@satellite ~]#scp student@workstation:Desktop/ssg-rhel9-ds.xml \ /usr/share/xml/scap/custom/student@workstation's password:student...output omitted...
From the satellite machine, use the hammer command to upload the SCAP content.
[root@satellite ~]# hammer scap-content bulk-upload --type directory \
--organization 'Operations' \
--directory /usr/share/xml/scap/custom
...output omitted...
Scap Contents uploaded.Log out of the satellite machine.
[root@satellite ~]#logout[student@satellite ~]$logoutConnection to satellite closed. [student@workstation ~]$
On the workstation machine, open a browser and connect to the Satellite web UI at https://satellite.lab.example.com.
If required, accept the self-signed certificate and log in as the admin user with redhat as the password.
In the Satellite web UI, select the Operations organization.
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, create a compliance policy named OpenSCAP-Policy1 by using the default RHEL 9 SCAP content.
Configure the policy to run every 10 minutes.
Navigate to → → and click .
Select Ansible as the deployment option, and then click .
On the tab, enter OpenSCAP-Policy1 as the name of the policy.
The policy description is optional.
Click .
On the tab, select rhel9 content from the list.
For , select [DRAFT] DISA STIG for Red Hat Enterprise Linux 9.
Click .
On the tab, select Custom for .
Enter */10 * * * * in the field to run the scan every 10 minutes.
Click .
On the tab, verify that Default Location is on the list.
Click .
On the tab, ensure that Operations is the selected organization.
Click .
On the tab, select org-hostgroup1 to move it to the list.
Click to create the compliance policy.
Execute the Ansible roles to set up the host for OpenSCAP revisions.
Return to → → and select the serverd.lab.example.com host checkbox.
Click and select Run all Ansible roles from the list.
Verify the results of the role execution.
Run an OpenSCAP scan for the serverd host.
Navigate to → → .
Select the checkbox for the serverd host.
Click → .
Select the OpenSCAP job category and the Run OpenSCAP scans job template, and then click .
View the results of the OpenSCAP-Policy1 OpenSCAP scan.
Navigate to → → .
Click for the OpenSCAP-Policy1 policy.
Click for the serverd host.
Browse through the scan results.