This course is using an outdated version of the technology and is now considered to be Legacy content. It will be removed from our catalog on June 28, 2024. Please be sure to complete your course and finish any remaining labs before that date. We recommend moving to version 9.2, which is the latest version currently available.
Performance Checklist
In this lab, you will use Red Hat Satellite to scan all of your servers for compliance with a customized OpenSCAP policy, evaluate the results, and remediate at least one reported issue.
Outcomes
You should be able to:
Create a Red Hat Satellite compliance policy customized with a tailoring file.
Initiate an OpenSCAP scan on one or more hosts from Red Hat Satellite using a compliance policy.
Evaluate the results of a compliance policy's OpenSCAP scans in Red Hat Satellite's web UI.
Remediate failed compliance checks using the command provided by the OpenSCAP evaluation report.
Confirm that the workstation, satellite, servera,
serverb, serverc, serverd, and servere machines are started.
Log in to workstation as student using student as the password.
On workstation, run lab compliance-review setup to verify that the environment is ready.
The script re-registers all hosts to the Satellite Server to enabling remote execution as the root user.
[student@workstation ~]$lab compliance-review setup
From workstation, connect to the Satellite web UI at https://satellite.lab.example.com.
If prompted, accept the self-signed certificate and log in as admin using redhat as the password.
Upload a new tailoring file named ComplianceLab-TailoringFile to customize the default Standard System Security profile for RHEL 7 SCAP content.
Download the tailoring file from http://materials.example.com/labs/compliancelab-tailoring.xml to workstation.
On workstation open a command terminal.
Use the wget command to download the tailoring file from http://materials.example.com/labs/compliancelab-tailoring.xml to
the /home/student/Downloads directory.
[student@workstation ~]$wget \>http://materials.example.com/labs/compliancelab-tailoring.xml \>-P ~/Downloads...output omitted...
In the Satellite web UI, navigate to → . Click to upload a new tailoring file.
On the Upload new Tailoring File page, enter ComplianceLab-TailoringFile in the Name field.
Click to upload the /home/student/Downloads/compliancelab-tailoring.xml tailoring file.
Click .
Create a compliance policy named ComplianceLab-Policy1 using the default RHEL 7 SCAP content.
Choose the Standard System Security XCCDF profile and the ComplianceLab-TailoringFile tailoring file.
The policy should execute weekly on Sunday.
Use the following table to specify the other fields while creating the compliance policy:
Table 10.4. Compliance Policy Parameters
| Field | Value |
|---|---|
| Locations | Default Location |
| Organizations | org-example |
| Hostgroups | org-hostgroup1 |
Navigate to → .
Click .
On the New Compliance Policy page, enter ComplianceLab-Policy1 as the name of the policy.
The policy description is optional.
Click .
On the SCAP Content tab, select from the SCAP Content list. For XCCDF Profile, select . For Tailoring File, select . The XCCDF Profile in Tailoring File list automatically sets the XCCDF profile, because there is only one profile included in the tailoring file. Click .
On the Schedule tab, for Period, choose . For Weekday, select . Click .
On the Locations tab, click to move it to the Selected items list. Click .
On the Organizations tab, click to move it to the Selected items list. Click .
On the Hostgroups tab, click to move it to the Selected items list. Click to create the compliance policy.
Manually run the Puppet agent on the following hosts to update the clients with the new compliance policy. You may use the remote execution feature of Red Hat Satellite to do this.
servera.lab.example.com
serverb.lab.example.com
serverc.lab.example.com
serverd.lab.example.com
servere.lab.example.com
From the Satellite's web UI, use the remote execution feature to run the Puppet agent. Navigate to → . Select the following hosts in the Hosts page.
servera.lab.example.com
serverb.lab.example.com
serverc.lab.example.com
serverd.lab.example.com
servere.lab.example.com
Select from the list.
On the Job invocation page, for Job Category, select . Ensure that Execute now is selected for Schedule. Click .
On the Overview tab, wait until you see succeeded with the 100% Success message.
Initiate OpenSCAP scans of the following hosts from your Satellite Server's web UI:
servera.lab.example.com
serverb.lab.example.com
serverc.lab.example.com
serverd.lab.example.com
servere.lab.example.com
Navigate to → . Select the following hosts:
servera.lab.example.com
serverb.lab.example.com
serverc.lab.example.com
serverd.lab.example.com
servere.lab.example.com
Select from the list.
On the Job invocation page, for Job Category, select . Ensure that Execute now is selected for Schedule. Click .
On the Overview tab, wait until you see succeeded with the 100% Success message.
Evaluate the OpenSCAP reports in your Satellite Server's web UI to determine which checks passed and which failed on each host.
Remediate the Prevent Log In to Accounts With Empty Password compliance issue detected in the previous step on serverd using the commands provided by an OpenSCAP evaluation report.
Execute the commands on serverd using the remote execution feature of the Satellite Server.
On the OpenSCAP Evalution Report page of serverd, glance through the report to see what rules passed or failed.
Evaluate the severity of the security rules.
Search for Prevent Log In to Accounts With Empty Password in the OpenSCAP evaluation report.
Notice that the Prevent Log In to Accounts With Empty Password security rule fails with severity high.
Click the Prevent Log In to Accounts With Empty Password link.
The Remediation Shell script section provides the remediation commands to fix the compliance issue.
Click show.
Copy both commands.
sed --follow-symlinks -i 's/\<nullok\>//g' /etc/pam.d/system-auth sed --follow-symlinks -i 's/\<nullok\>//g' /etc/pam.d/password-auth
In the Satellite web UI, navigate to → .
Select serverd.lab.example.com.
Clear any other hosts that are selected.
Choose from the list.
On the Job invocation page, for Job Category, select . Paste the remediation commands from the previous step in the command field. Ensure that Execute now is selected for Schedule. Click .
On the Overview tab, wait until you see succeeded with the 100% Success message.
Scan all the hosts again for compliance and evaluate the OpenSCAP scan results.
Verify that the Prevent Log In to Accounts With Empty Password compliance issue is resolved on serverd.
Navigate to → . Select the following hosts:
servera.lab.example.com
serverb.lab.example.com
serverc.lab.example.com
serverd.lab.example.com
servere.lab.example.com
Select from the list.
On the Job invocation page, for Job Category, select . Ensure that Execute now is selected for Schedule. Click .
On the Overview tab, wait until you see succeeded with the 100% Success message.
Navigate to → to list the OpenSCAP scan reports uploaded by all the hosts.
Notice that the OpenSCAP scan on serverd must now show 10 passes and 0 failed result.
The other hosts must show 9 passes and 1 failed result.
Click the link under the Report At column to view the details for the latest scan result on serverd.
Click to view the OpenSCAP Evalution Report page.
Verify that the Prevent Log In to Accounts With Empty Password compliance report is resolved on serverd.
Log off from the Satellite web UI.