Red Hat OpenShift policies in DevOps Config
Summarize
Summary of Red Hat OpenShift policies in DevOps Config
The DevOps Config Policy content pack includes predefined policies designed to validate your Red Hat OpenShift configuration, helping ensure compliance with best practices and security standards. Although DevOps Config is being prepared for future deprecation starting with the Washington D.C. release, existing policies remain supported and customizable by creating copies, as default policies themselves cannot be modified.
Show less
Key Features
- Audit Log Policies: Verify settings for audit log retention (maxbackup), file size limits (maxsize), and audit log file paths to ensure proper auditing configuration.
- Authentication Checks: Detect if insecure authentication methods such as basic auth files or static token files are enabled, marking configurations as non-compliant when found.
- Container Security: Ensure containers are not running with privileged access to reduce security risks.
- Security Context Constraints (SCC): Confirm that host PID namespace sharing is disabled to limit container access to host resources.
- Admission Control Plugin Validation: Verify that the NamespaceLifecycle plugin is enabled to manage namespace lifecycles properly.
- API Server and Kubelet Safety Settings: Check that read-only ports are disabled, global request timeouts are set within defined limits, and streaming connection timeouts are enabled to protect against denial-of-service attacks and resource exhaustion.
Practical Use for ServiceNow Customers
ServiceNow customers can use these policies to automatically assess and enforce Red Hat OpenShift configuration standards within their DevOps pipelines. By leveraging the default policies or customizing copies, teams can identify misconfigurations early, improve security posture, and maintain compliance with organizational or regulatory requirements. Input arguments allow tuning of thresholds such as log file sizes and timeout limits to fit specific environments.
Note that while you cannot modify default policies directly, creating customized copies enables adaptation to your unique operational needs without losing the benefits of automated validation.
By default, the DevOps Config Policy content pack contains a set of policies to validate your Red Hat OpenShift configuration.
Audit Log Maximum Backup Is Set (openshift_audit_log_maxbackup_is_set)
Checks whether the maximum number of old audit log files to be retained for API servers is set.
Results into a non-compliant status when the --audit-log-maxbackup argument is either not set or not within the specified limits.
- Input arguments
- lowerLimit
- The lower limit of the
--audit-log-maxbackupargument. - Type: Integer
- Mandatory: False
- The lower limit of the
- upperLimit
- The upper limit of the
--audit-log-maxbackupargument. - Type: Integer
- Mandatory: False
- The upper limit of the
- lowerLimit
Audit Log Maximum File Size Is Set (openshift_audit_log_maxsize_is_set)
Checks whether the maximum file size specified as the rollover threshold for audit log files is set. After an audit log file reaches the maximum file size, the original audit log file is renamed and a new log file with the original name is created.
Results into a non-compliant status when the --audit-log-maxsize argument is either not set or not within the specified limits.
- Input arguments
- lowerLimit
- The lower memory limit of the
--audit-log-maxsizeargument. - Type: Integer
- Mandatory: True
- The lower memory limit of the
- upperLimit
- The upper memory limit of the
--audit-log-maxsizeargument. - Type: Integer
- Mandatory: True
- The upper memory limit of the
- lowerLimit
Audit Log Path Isn't Set (openshift_audit_log_path_is_not_set)
Checks whether the auditing is enabled in OpenShift and the audit log file path is set.
Results into a non-compliant status when either the --audit-log-path argument for openshift-kube-apiserver isn’t set to /var/log/kube-apiserver/audit.log or the
--audit-log-path argument for openshift-apiserver isn’t set to /var/log/openshift-apiserver/audit.log.
Basic Auth File Isn’t Set (openshift_basic_auth_file_is_not_set)
Checks whether OpenShift doesn’t use the basic authentication mechanism to authenticate requests to the API server.
Results into a non-compliant status when the --basic-auth-file argument is set.
Containers Run Without Privilege Access (openshift_container_is_not_privileged)
Checks whether the containers within an OpenShift pod are run without privileged access.
Results into a non-compliant status when the privileged field for a container is set to true.
Host PID Namespace Is Disabled (openshift_scc_with_hostPID_namespace_disabled)
Checks whether there is at least one security context constraint (SCC) is defined that doesn’t allow containers to share the host PID namespace.
Results into a warning when there’s an SCC defined with the allowHostPID field set to true.
NamespaceLifecycle Plugin Is Enabled (openshift_namespacelifecycle_plugin_is_enabled)
Checks whether the admission control plugin NamespaceLifecycle is enabled.
Results into a non-compliant status when the NamespaceLifecycle plugin is disabled.
Read-Only Port Is Disabled (openshift_read_only_port_disabled)
Checks whether the Kubelet API server isn’t using the read-only port or the read-only port is set to 0.
Results into a non-compliant status when the kubelet-read-only-port argument isn’t set to 0.
Request Timeout Is Set (openshift_request_timeout_is_set)
Checks whether the global request timeout for API servers is set.
Results into a non-compliant status when the --min-request-timeout argument is either not set or not within the specified limits.
- Input arguments
- lowerLimit
- The lower limit of the
--min-request-timeoutargument. - Type: Integer
- Mandatory: False
- The lower limit of the
- upperLimit
- The upper limit of the
--min-request-timeoutargument. - Type: Integer
- Mandatory: False
- The upper limit of the
- lowerLimit
Streaming Connections Timeout Isn't Disabled (openshift_streaming_connections_timeout_not_disabled)
Checks whether the timeouts are set on streaming connections to ensure protection against denial-of-service attacks, inactive connections, and ephemeral ports exhaustion.
Results into a non-compliant status when the streamingConnectionIdleTimeout argument is set to 0 in the Kubelet config file.
Token Auth File Isn’t Set (openshift_token_auth_file_is_not_set)
Checks whether OpenShift doesn't use a static token file to authenticate requests to the API server.
Results into a non-compliant status when the --token-auth-file argument is set.