Chapter 3. Managing compliance
3.1. Compliance feature overview Copy linkLink copied to clipboard!
The compliance feature ensures that your Kubernetes clusters adhere to industry standards and regulatory requirements through automated compliance checks.
3.1.1. OpenShift infrastructure compliance Copy linkLink copied to clipboard!
OpenShift infrastructure compliance, formerly known as Compliance 2.0, summarizes compliance information in a single interface after scheduled scans by using the Compliance Operator.
- If you have Red Hat OpenShift clusters with the Compliance Operator installed, you can create and manage compliance scan schedules directly in RHACS on the schedules page. The coverage page shows you the scan results associated with a benchmark and profile in a single interface.
You can now use the new OpenShift infrastructure compliance feature to assess compliance across your entire OpenShift cluster fleet and ensure consistent adherence to the security policies of your organization. RHACS now generates reports even if some clusters in a scheduled scan fail, so that you can keep visibility into the compliance status of successfully scanned clusters without data gaps.
For more information, see "Using OpenShift compliance".
RHACS also supports tailored profiles from the Compliance Operator, so that you can customize existing benchmarks to match the requirements of your organization. You can schedule scans that use these profiles directly from the RHACS portal.
For more information, see "Understanding tailored profiles in compliance scans".
To access the Compliance menu and API, a user must have at least read permissions for the Compliance resource and read permissions for the Cluster resource. Additionally, to use email notifiers in the scan schedule configuration, the user requires read permissions for the Integration resource.
3.1.2. Dashboard (deprecated) Copy linkLink copied to clipboard!
The compliance dashboard, formerly known as Compliance 1.0, summarizes compliance information from all clusters and covers workload and infrastructure compliance. The dashboard is deprecated in RHACS 4.8 and will be removed in a future release.
By running a compliance scan in RHACS, you can monitor the entire Kubernetes infrastructure and workloads and ensure that they meet the required standards. You can use the compliance dashboard for filtering and detailed reporting.
3.1.3. Compliance assessment and reporting by using RHACS Copy linkLink copied to clipboard!
On the dashboard page, you can assess and report on the compliance of your containerized infrastructure and workloads with the applicable technical controls from a range of security and regulatory frameworks.
You can run compliance scans based on the following industry standards:
- Center for Internet Security (CIS) Benchmarks for Kubernetes
- Health Insurance Portability and Accountability Act (HIPAA)
- National Institute of Standards and Technology (NIST) Special Publication 800-190
- NIST Special Publication 800-53
- Payment Card Industry Data Security Standard (PCI DSS)
OpenShift Compliance Operator Profiles
The Compliance Operator evaluates the compliance of both the OpenShift Container Platform Kubernetes API resources and the nodes running the cluster. There are several profiles available as part of the Compliance Operator installation.
For more information about the available profiles, see "Supported compliance profiles".
By scanning your environment based on these standards, you can:
- Evaluate your infrastructure for regulatory compliance.
- Harden your Kubernetes orchestrator.
- Understand and manage the overall security posture of your environment.
- Get a detailed overview of the compliance status of clusters, namespaces, and nodes.
3.1.4. Workload compliance for non-OpenShift clusters Copy linkLink copied to clipboard!
For non-OpenShift clusters, Red Hat Advanced Cluster Security for Kubernetes (RHACS) provides workload compliance through standard and custom security policies rather than through the default compliance profiles that earlier releases provided.
RHACS previously provided default compliance profiles to scan user workloads on non-OpenShift clusters. RHACS no longer includes this functionality.
You can use standard RHACS security policies to replace most of the checks that earlier compliance scans performed. Tag specific security policies with the relevant compliance benchmark controls. The RHACS policy engine then continuously evaluates your workloads against these tagged policies and reports a pass or fail result.
3.2. Using OpenShift compliance Copy linkLink copied to clipboard!
You can assess compliance across your entire OpenShift cluster fleet and ensure consistent adherence to the security policies of your organization. If you have Red Hat OpenShift clusters with the Compliance Operator installed, you can manage, view, and schedule Compliance Operator scans in RHACS by using the Compliance pages in the RHACS portal. The coverage page shows you the scan results associated with a benchmark and profile in a single interface.
To access the Compliance menu and API, a user must have at least read permissions for the Compliance resource and read permissions for the Cluster resource. Additionally, to use email notifiers in the scan schedule configuration, the user requires read permissions for the Integration resource.
You can create and manage compliance scan schedules on the schedules page that meet your operational needs. You can only have one schedule that scans the same profile on the same cluster.
3.2.1. Using OpenShift compliance overview Copy linkLink copied to clipboard!
You can create and manage compliance scan schedules to meet your operational needs, and monitor compliance status across all clusters by viewing and filtering scan results.
You can create and manage compliance scan schedules on the schedules page that meet your operational needs. You can only have one schedule that scans the same profile on the same cluster.
By viewing and filtering the scan results on the coverage page, you can monitor the compliance status across all clusters.
3.2.2. Customizing and automating your compliance scans Copy linkLink copied to clipboard!
By creating a compliance scan schedule, you can customize and automate your compliance scans to align with your operational requirements.
You can only have one schedule that scans the same profile on the same cluster. This means that you cannot create many scan schedules for the same profile on a single cluster.
Prerequisites
You have installed the Compliance Operator version 1.6.0 or later.
For more information about how to install the Compliance Operator, see "Using the Compliance Operator with Red Hat Advanced Cluster Security for Kubernetes".
Note- Currently, the compliance feature and the Compliance Operator evaluate only infrastructure and platform compliance.
- To use the compliance feature, you must run the Compliance Operator on a Red Hat OpenShift cluster.
Procedure
-
In the RHACS portal, click Compliance
OpenShift Schedules. - Click Create scan schedule.
In the Create scan schedule page, enter the following information:
- Name: Enter a name to identify different compliance scans.
- Description: Specify the reason for each compliance scan.
Schedule: Adjust the scan schedule to fit your required schedule:
Frequency: From the drop-down list, select how often you want to run the scan. If you do not select a frequency, the system selects
Dailyautomatically.The following values define how often you want to perform the scan:
-
Daily -
Weekly -
Monthly
-
On day(s): From the list, select one or more days of the week on which you want to perform the scan.
The following values define the days of the week on which you want to perform the scan:
-
Monday -
Tuesday -
Wednesday -
Thursday -
Friday -
Saturday -
Sunday -
The first of the month The middle of the monthNoteThese values are only applicable if you specify the frequency of scan as
WeeklyorMonthly.
-
-
Time: Start to type the time in
hh:mmat which you want to run the scan. From the list that is displayed, select a time.
- Click Next.
- Select one or more healthy clusters that you want to include in the scan.
- Click Next.
- Select one or more profiles that you want to include in the scan. The Type column shows the profile type as Built-in or Tailored. You can include both built-in and tailored profiles in the same scan schedule.
- Click Next.
Optional: To configure email delivery destinations for manually triggered reports, perform the following steps:
NoteYou can add one or more delivery destinations.
- Expand Add delivery destination.
In the Delivery destination page, enter the following information:
Email notifier: Select an email notifier from the drop-down list.
Optional: To configure the setting for a new email notifier integration, perform the following steps:
- From Select a notifier drop-down list, click Create email notifier.
In the Create email notifier page, enter the following information:
- Integration name: Enter a unique name for the email notifier. This name helps you identify and manage this specific email notifier configuration.
- Email server: Specify the address of the SMTP server that you want to use to send the emails.
- Username: Enter the username for authentication with the SMTP server. This is often the email address for sending the emails.
- Password: Enter the password for the SMTP username. The system uses this password for authentication with the SMTP server.
- From: This address usually represents the sender of the emails and is visible to the recipients. This is optional.
- Sender: Enter the name of the sender, which is displayed together with the From email address. This name helps recipients identify who sent the email.
- Default recipient: Enter the default email address that receives the notifications if you do not specify a recipient. This ensures that there is always a recipient for the emails.
- Annotation key for recipient: Specify the annotation key to define a recipient to inform about the policy violations related to a specific deployment or namespace. This is optional.
- Optional: Select the Enable unauthenticated SMTP checkbox, if your SMTP server does not require authentication. This is not recommended due to security reasons.
- Optional: Select the Disable TLS certificate validation (insecure) checkbox, if you want to disable TLS certificate validation. This is not recommended due to security reasons.
Optional: In the Use STARTTLS (requires TLS to be disabled) field, select the type of STARTTLS for securing the connection to the SMTP server from the drop-down list.
ImportantTo use this option, you must disable TLS certificate validation.
The following values define the type of STARTTLS for securing the connection to the SMTP server:
DisabledData is not encrypted.
PlainEncodes username and password in base64.
LoginSends username and password as separate base64-encoded strings for added security.
- Click Save integration.
- Distribution list: Enter one or more comma-separated email addresses of the recipients to receive the report.
Email template: The default template is automatically applied.
Optional: To customize the email subject and body as needed, perform the following steps:
- Click the pencil icon.
In the Edit email template page, enter the following information:
- Email subject: Enter the desired subject line for the email. The recipient’s inbox shows this subject and it should clearly indicate the purpose of the email.
- Email body: Compose the text of the email. This is the main content of the email and can include text, placeholders for dynamic content and any formatting necessary to get your message across effectively.
- Click Apply.
- Click Next.
- Review your scan configuration, and then click Save.
Verification
-
In the RHACS portal, click Compliance
OpenShift Schedules. - Select the compliance scan that you have created.
- In the Clusters section, verify that the operator status is healthy.
Optional: To edit the scan schedule, perform the following steps:
- From the Actions drop-down list, which is in the upper right of the page, select Edit scan schedule.
- Make your changes.
- Click Save.
Optional: To manually send a scan report:
Note- You can only send a scan report manually if you have configured an email delivery destination.
- Compliance reporting is only available for clusters running Compliance Operator version 1.6.0 or later.
From the Actions drop-down list, which is in the upper right of the page, select Send report.
You receive a confirmation that you have requested to send a report.
Optional: To download a scan report, perform the following steps:
NoteCompliance reporting is only available for clusters running Compliance Operator version 1.6.0 or later.
From the Actions drop-down list, which is in the upper right of the page, select Generate download.
You receive a confirmation that the report generation has started.
- Click the All report jobs tab.
- Optional: Set View only my jobs to on.
- Locate the report job that you created.
- Wait until the download is complete, and then click Ready for download.
-
Optional: To delete the report job, click the overflow menu
and then select Delete download.
3.2.2.1. Analyzing compliance scan schedules Copy linkLink copied to clipboard!
By viewing the Schedules page, you can analyze the various attributes of the compliance scan schedule that you created.
Prerequisites
You have created a compliance scan schedule.
For more information about how to create a compliance scan schedule, see "Customizing and automating your compliance scans".
Procedure
-
In the RHACS portal, click Compliance
OpenShift Schedules. - Optional: To sort the compliance scan schedules in ascending or descending order, select the Name column heading.
- Select the compliance scan that you have created.
- Optional: To sort the cluster health information in ascending or descending order, select a column heading in the Clusters section.
Optional: To view the status of the one or more requested jobs from different users:
- Click the All report jobs tab.
- You can find the status of the one or more report jobs in the Status column.
Optional: Choose the appropriate method to re-organize the information in the All report jobs section:
- To sort the jobs in ascending or descending order, select the Completed column heading.
To filter the jobs based on the report run states, select one or more states from the Filter by report run states drop-down list.
The following values are associated with the report run states:
-
Waiting -
Preparing -
Report ready for download -
Partial report ready for download -
Report successfully sent -
Partial report successfully sent -
Report failed to generate
-
- To view only the jobs that you created, set View only my jobs to on.
Optional: To view the job details associated with a report job, perform the following steps:
- Locate the report job for which you want to view the job details.
- To view the job details, expand the report job.
3.2.2.2. OpenShift Schedules page overview Copy linkLink copied to clipboard!
The OpenShift Schedules page lists all the scan schedules and organizes information into the following groups:
- Name
- The unique identifier or title given to each scan schedule.
- Schedule
- Indicates the frequency and timing of the scan.
- Last scanned
- Indicates the date and time of the most recent scan for that schedule.
- Clusters
- Lists the clusters included in the scan schedule.
- Profiles
- Identifies the one or more profiles applied in the compliance scan.
- My last job status
Shows the status of your job.
The following values define the job status:
Waiting- The report job is in the queue.
Preparing- The system is processing the report job.
Report ready for download- The report is ready and available for download.
Partial report ready for download- A report is partially complete and ready for download.
Report successfully sent- The report was successfully emailed.
Partial report successfully sent- A report is partially complete and was successfully emailed.
Report failed to generate- There was an issue with the report job. Hover to view the error message.
None- There are no recent jobs available.
To view the configuration details and report job status for a compliance scan, select the compliance scan you created.
3.2.2.2.1. Configuration details tab Copy linkLink copied to clipboard!
The Configuration details tab displays information about the scan schedule information such as the essential parameters, cluster status, associated profiles, and email delivery destinations.
3.2.2.2.1.1. Parameters section Copy linkLink copied to clipboard!
The Parameters section displays essential information about the compliance scan configuration.
The Parameters section has the following groups:
- Name
- The unique identifier for the compliance scan.
- Description
- Specifies additional information about the compliance scan.
- Schedule
- Specifies when the compliance scans should run.
- Last scanned
- The timestamp of the last compliance scan performed.
- Last updated
- The last date and time that the compliance scan data was modified.
3.2.2.2.1.2. Clusters section Copy linkLink copied to clipboard!
The Clusters section displays information about the clusters associated with the compliance scan.
The Clusters section has the following groups:
- Cluster
- Lists the one or more clusters associated with a compliance scan.
- Operator status
- Indicates the current health or operational status of the Operator.
3.2.2.2.1.3. Profiles section Copy linkLink copied to clipboard!
The Profiles section lists the compliance profiles associated with the scan.
The Profiles section lists the one or more profiles associated with a compliance scan.
3.2.2.2.1.4. Delivery destinations section Copy linkLink copied to clipboard!
The Delivery destinations section displays information about email notification settings for compliance reports.
The Delivery destinations section has the following groups:
- Email notifier
- Specifies the email notification system or tool set up to distribute reports or alerts.
- Distribution list
- Lists the recipients to receive the notifications or reports.
- Email template
- Specifies the email format for the notifications. You can use the default or customize the email subject and body as needed.
3.2.2.2.2. All report jobs tab Copy linkLink copied to clipboard!
The All report jobs tab shows the current status and requester for each report job. The row expansion section shows completed jobs.
The report jobs have the following groups:
- Completed
- Indicates which report jobs finished.
- Status
Displays the current state of each report job.
The following values define the report job status:
Waiting- The report job is in the queue.
Preparing- The system is processing the report job.
Report ready for download- The report is ready and available for download.
Partial report ready for download- A report is partially complete and ready for download.
Report successfully sent- The report was successfully emailed.
Partial report successfully sent- A report is partially complete and was successfully emailed.
Report failed to generate- There was an issue with the report job. Hover to view the error message.
None- There are no recent jobs available.
- Requester
- Identifies the user or system account that initiated the report job.
3.2.3. Assessing the profile compliance across clusters Copy linkLink copied to clipboard!
By viewing the Coverage page, you can assess the profile compliance for nodes and platform resources across clusters.
Prerequisites
You have installed the Compliance Operator version 1.6.0 or later.
For more information about how to install the Compliance Operator, see "Using the Compliance Operator with Red Hat Advanced Cluster Security for Kubernetes".
Note- Currently, the compliance feature and the Compliance Operator evaluate only infrastructure and platform compliance.
- The compliance feature requires the Compliance Operator to be running and does not support Amazon Elastic Kubernetes Service (EKS).
You have created a compliance scan schedule.
For more information about how to create a compliance scan schedule, see "Customizing and automating your compliance scans".
Procedure
-
In the RHACS portal, click Compliance
OpenShift Coverage.
3.2.3.1. OpenShift Coverage page overview Copy linkLink copied to clipboard!
When you view the Coverage page and apply a filter to a schedule, the system filters all results accordingly. This filter remains active for all coverage pages until you delete it. You can always view the results based on a single profile.
You can select profiles grouped according to their associated benchmarks by using the toggle group. Tailored profiles appear under a dedicated Tailored Profiles tab.
You calculate the compliance percentage based on the number of passed checks in relation to the total number of checks.
The Coverage page now only shows the results of the last scan. If the last scan fails, the Red Hat Advanced Cluster Security for Kubernetes (RHACS) deletes the previous results and you cannot see any information for this scan on the Coverage page.
The Checks view lists the profile checks. Use this view to easily navigate and understand your compliance status.
The profile check information has the following groups:
- Check
- The name of the profile check.
- Controls
- Shows the various controls associated with each check.
- Fail status
- Shows the checks that have failed and require your attention.
- Pass status
- Shows the checks that have been successfully passed.
- Manual status
- Shows the checks that require a manual review because they need additional organizational or technical knowledge that you cannot automate.
- Other status
- Shows the checks with a status other than pass or fail, such as warnings or informational statuses.
- Compliance
- Shows the overall compliance status and helps you to ensure that your environment meets the required standards.
A profile might show different numbers of checks across clusters. This can happen for the following reasons:
- Clusters run different versions of the Compliance Operator. Compliance Operator releases can add or remove rules, which changes the number of checks for a given profile.
- A tailored profile has a different definition on each cluster.
You can expect this behavior. Each cluster’s check results reflect the actual profile definition on that cluster. For more information, see "Understanding tailored profiles in compliance scans".
The Clusters view lists the clusters. Use this view to effectively monitor and manage your clusters.
The cluster information has the following groups:
- Cluster
- The name of the cluster.
- Last scanned
- Indicates when the system last scanned the individual clusters.
- Fail status
- Shows the clusters whose scan has failed and which require your attention.
- Pass status
- Shows the clusters that have successfully passed all checks.
- Manual status
- Shows the checks that require a manual review because they need additional organizational or technical knowledge that you cannot automate.
- Other status
- Shows the clusters that have a status other than pass or fail, such as warnings or informational alerts.
- Compliance
- Shows the overall compliance status of your clusters and helps you to ensure that they meet the required standards.
3.2.3.2. Monitoring and analyzing the health of your clusters Copy linkLink copied to clipboard!
By viewing the status of a profile check, you can efficiently monitor and analyze the health of your clusters.
Wait until the Compliance Operator returns the scan results. It might take a few minutes.
Procedure
-
In the RHACS portal, click Compliance
OpenShift Coverage. - Select a cluster to view the details of the individual scans.
Optional: Choose the appropriate method to re-organize the information in the Coverage page.
- To filter the scan results based on a scan schedule, from the drop-down list, select the scan schedule. If you do not select a particular scan schedule, the system selects All scan schedules automatically.
To filter the scan results based on an entity and its attributes, do any of the following tasks:
ImportantTo select many entities and attributes, click the right arrow icon to add another search criteria.
- To filter the scan results based on a profile check, enter the name of the profile check in the search bar to view the status.
To filter the scan results based on cluster attributes, from the drop-down list, select Cluster, and then select an attribute. Enter the details of the cluster attribute in the search bar to view the status.
The following values define the attributes of a cluster:
-
ID -
Name -
Label -
Type -
Platform Type
-
Optional: From the Compliance status drop-down list, select one or more statuses by using which you want to filter the scan details.
The following values define how you want to filter the scan details:
-
Pass -
Fail -
Error -
Info -
Manual -
Not Applicable -
Inconsistent
-
3.2.3.3. Compliance scan status overview Copy linkLink copied to clipboard!
By understanding the compliance scan status, you can manage the overall security posture of your environment.
| Status | Description |
|---|---|
|
| The compliance check failed. |
|
| The compliance check passed. |
|
| Skipped the compliance check because it was not applicable. |
|
| The compliance check gathered data, but RHACS could not make a pass or fail determination. |
|
| The compliance check failed due to a technical issue. |
|
| You must manually intervene to ensure compliance. |
|
| The compliance scan data is inconsistent, and requires closer inspection and targeted resolution. |
3.2.4. Understanding tailored profiles in compliance scans Copy linkLink copied to clipboard!
Tailored profiles are custom compliance profiles that you create in the Compliance Operator and use in Red Hat Advanced Cluster Security for Kubernetes (RHACS). Tailored profiles build on standard compliance profiles provided by the Compliance Operator, such as Center for Internet Security (CIS), National Institute of Standards and Technology (NIST), Payment Card Industry Data Security Standard (PCI-DSS), and Security Technical Implementation Guide (STIG) benchmarks. You can use tailored profiles to extend existing benchmarks and customize the combination of rules that you are using.
You create tailored profiles at the cluster level by using TailoredProfile custom resources (CRs), then use RHACS to schedule and manage scans across multiple clusters.
RHACS does not currently create, copy, or synchronize tailored profiles between clusters. You must create the TailoredProfile CR on each cluster where you want to run the profile.
3.2.4.1. Supported tailored profile types Copy linkLink copied to clipboard!
RHACS supports all TailoredProfile CR configurations available in the Compliance Operator.
| Type | Description |
|---|---|
| Profile extension |
Profiles that extend a single standard profile by using the |
| Disabled rules |
Profiles that exclude specific compliance checks by using the |
| Enabled rules |
Profiles that explicitly enable compliance checks by using the |
| Manual rules |
Profiles that mark specific checks as requiring manual verification by using the |
| Modified values |
Profiles that override default values for compliance checks by using the |
| Custom rules |
Profiles that include organization-specific checks by using the Compliance Operator |
| Profile combination |
Profiles that combine checks from more than one standard profile by using |
3.2.4.2. Tailored profile workflow Copy linkLink copied to clipboard!
Tailored profiles integrate with RHACS through the following workflow:
-
You create
TailoredProfileCRs in the Compliance Operator on each target cluster. TheTailoredProfileresource specifies which standard profile to extend, which rules to enable or disable, and any custom values to apply. - RHACS automatically discovers tailored profiles available on secured clusters. Tailored profiles appear in the RHACS compliance interface with standard profiles.
-
From the RHACS portal, you select tailored profiles and schedule scans across one or more clusters. RHACS creates the necessary
ScanSettingBindingresources on target clusters to start the scans. - RHACS collects scan results from all clusters and aggregates them in the Coverage dashboard. Results from tailored profiles appear in a dedicated Tailored Profiles tab, separate from standard profile results.
3.2.4.3. How tailored profiles appear in RHACS Copy linkLink copied to clipboard!
Tailored profiles behave like built-in profiles in most respects, with the following differences:
- Scan schedules
- When you create or edit a scan schedule, the profile selection table includes a Type column that displays Built-in for built-in profiles and Tailored for tailored profiles. You can select both types together in the same scan schedule.
- CSV reports
- In downloaded CSV compliance reports, the Profile type column displays Tailored Profile instead of Profile. The Control Reference column displays N/A for tailored profiles because tailored profile names do not map to a known compliance standard.
- Coverage page
- On the Coverage page, tailored profiles appear under a dedicated Tailored Profiles tab.
Tailored profiles with the same name can produce different check counts across clusters. Because each cluster manages its own tailored profile as a Kubernetes resource, they can differ in several ways:
- Different sets of enabled or disabled rules.
- Extending different base profiles.
- Extending the same base profile but on clusters running different Compliance Operator versions, which can cause the base profile itself to contain different rules.
You can expect this behavior. Each cluster’s check results reflect the actual tailored profile definition on that cluster.
3.2.4.4. Troubleshooting tailored profiles in RHACS Copy linkLink copied to clipboard!
If tailored profiles do not appear in RHACS, check the status of the tailored profile.
Procedure
Check the status of the tailored profile:
$ oc get tailoredprofile <profile_name> -n openshift-compliance -o yamlLook for the
status.statefield. A ready profile showsstatus.state: READY.
3.2.4.5. Tailored profile requirements and support Copy linkLink copied to clipboard!
Tailored profiles in Red Hat Advanced Cluster Security for Kubernetes (RHACS) have specific version requirements and naming conventions. Understanding these requirements helps you plan your compliance scanning strategy across multiple clusters and OpenShift Container Platform versions.
Tailored profiles are supported in RHACS version 4.11 and later. For information about Compliance Operator and OpenShift Container Platform version support, see the Compliance Operator release notes.
Compliance benchmark content can change between Compliance Operator versions. The same tailored profile might produce different results on clusters running different versions of the Operator. This is a known limitation related to upstream compliance content changes, not a RHACS limitation.
For details about compliance content changes, see the Compliance Operator release notes.