Bookmark this page

Customize the OpenSCAP Policy in Red Hat Satellite

Objectives

After completing this section, students should be able to apply a tailoring file to a SCAP profile in Red Hat Satellite and use the customized SCAP profile to scan registered servers.

Customizing SCAP Profiles in Red Hat Satellite

Organizations sometimes need to adjust a standard security policy, making it stricter or more lenient based on its actual compliance requirements. SCAP tailoring files allow compliance managers to customize a profile without writing new SCAP content. You can create these tailoring files in SCAP Workbench and they are saved as XCCDF profiles.

Red Hat Satellite 6.3 introduced support for tailoring files. This feature allows users to upload a tailoring file to customize a compliance policy. The uploaded tailoring file is assigned to an existing SCAP profile when creating or updating a compliance policy.

Important

Red Hat Satellite does not have an interface to create or edit tailoring files. A compliance manager should create the tailoring file in SCAP Workbench, then upload it to the Satellite Server.

Uploading a Tailoring File

After you create a tailoring file in SCAP Workbench, save it in XCCDF Customization format. Then, upload it to the Red Hat Satellite Server that manages the compliance policy for your scans. You should have already installed the XCCDF profile on which the tailoring file is based on the Satellite Server.

Uploading a Tailoring File to Red Hat Satellite

The following steps outline the process for uploading a tailoring file to the Satellite Server:

  1. Log in to the Satellite Server's web UI as a user with the Compliance Manager role.

  2. Navigate to HostsTailoring Files and then click New Tailoring File.

  3. On the Upload new Tailoring File page, enter a name in the Name field. Click Browse to upload the tailoring file.

  4. Click Submit.

Assigning a Tailoring File to a Compliance Policy

A tailoring file is comprised of one or more XCCDF profiles. One tailoring file can be assigned to a compliance policy. Any change to a compliance policy is propagated to the Satellite's clients when their Puppet agents check in.

Assigning a Tailoring File using Satellite's Web Interface

The following steps outline the process for assigning a tailoring file to a compliance policy on a Satellite Server:

  1. Log in to the Satellite's web UI as a user with the Compliance manager role.

  2. Navigate to HostsPolicies. Choose Edit from the drop-down list of the required policy.

    Alternatively, click New Policy, or New Compliance Policy to create a new compliance policy.

  3. On the SCAP Content tab, choose the required tailoring file from the Tailoring File list.

  4. Choose an XCCDF Profile in Tailoring File from the drop-down list. Click Submit.

Executing a Compliance Scan using a Customized Compliance Policy

The Puppet agent running on the Satellite client fetches the change in the compliance policy. The interval between checks is set by the runinterval variable in the Puppet agent's configuration. The default run interval for the Puppet agent is 30 minutes. The Puppet agent can be executed manually either by remote execution from the Satellite Server or by running the puppet agent --test command on the client.

The /etc/foreman_scap_client/config.yaml file contains the information about the tailoring file and XCCDF profile to be used for the compliance scan.

# DO NOT EDIT THIS FILE MANUALLY
# IT IS MANAGED BY PUPPET
...output omitted...
# policy (key is id as in Foreman)
1:
  :profile: 'xccdf_com.lab.example_profile_common_customized'
  :content_path: '/var/lib/openscap/content/96c2a9d5278d5da905221bbb2dc61d0ace7ee3d97f021fccac994d26296d986d.xml'
  # Download path
  # A path to download SCAP content from proxy
  :download_path: '/compliance/policies/1/content/96c2a9d5278d5da905221bbb2dc61d0ace7ee3d97f021fccac994d26296d986d'
  :tailoring_path: '/var/lib/openscap/tailoring/7ebe67694d7ce79d08c960a5854c3b246fd317b5de187a7cd467f349a777a679.xml'
  :tailoring_download_path: '/compliance/policies/1/tailoring/7ebe67694d7ce79d08c960a5854c3b246fd317b5de187a7cd467f349a777a679'

In the above screen output, the xccdf_com.lab.example_profile_common_customized is the XCCDF tailoring profile. The tailoring_path variable defines the location of the tailoring file on the SCAP client. The tailoring_download_path variable defines the download location of the tailoring file from the Satellite Server.

The compliance scan is executed based on the Cron job defined in the compliance policy. To execute the scan manually you can either use remote execution from the Satellite Server or the foreman_scap_client command. The result of the scan is uploaded to the Satellite Server.

Revision: rh415-7.5-813735c