Guide to the Secure Configuration of Red Hat OpenShift Container Platform 4

This guide presents a catalog of security-relevant configuration settings for Red Hat OpenShift Container Platform 4. It is a rendering of content structured in the eXtensible Configuration Checklist Description Format (XCCDF) in order to support security automation. The SCAP content is is available in the scap-security-guide package which is developed at https://www.open-scap.org/security-policies/scap-security-guide.

Providing system administrators with such guidance informs them how to securely configure systems under their control in a variety of network roles. Policy makers and baseline creators can use this catalog of settings, with its associated references to higher-level security control catalogs, in order to assist them in security baseline creation. This guide is a catalog, not a checklist, and satisfaction of every item is not likely to be possible or sensible in many operational scenarios. However, the XCCDF format enables granular selection and adjustment of settings, and their association with OVAL and OCIL content provides an automated checking capability. Transformations of this document, and its associated automated checking content, are capable of providing baselines that meet a diverse set of policy objectives. Some example XCCDF Profiles, which are selections of items that form checklists and can be used as baselines, are available with this guide. They can be processed, in an automated fashion, with tools that support the Security Content Automation Protocol (SCAP). The NIST National Checklist Program (NCP), which provides required settings for the United States Government, is one example of a baseline created from this guidance.
Do not attempt to implement any of the settings in this guide without first testing them in a non-operational environment. The creators of this guidance assume no responsibility whatsoever for its use by other parties, and makes no guarantees, expressed or implied, about its quality, reliability, or any other characteristic.

Profile Information

Profile ID(default)

CPE Platforms

  • cpe:/a:redhat:openshift_container_platform:4.1

Revision History

Current version: 0.1.51

  • draft (as of 2020-07-20)

Table of Contents

  1. OpenShift Settings
    1. OpenShift - Account and Access Control
    2. OpenShift - Master Node Settings
    3. OpenShift - General Security Practices
    4. Network Configuration and Firewalls
    5. OpenShift - Master Node Settings
    6. OpenShift Secrets Management
    7. OpenShift - Registry Security Practices
    8. Authentication
    9. Security Context Constraints (SCC)
    10. Role-based Acess Control
    11. OpenShift etcd Settings
    12. Kubernetes Kubelet Settings
    13. OpenShift API Server
    14. OpenShift - Kubernetes - Scheduler Settings
    15. OpenShift Controller Settings
  2. Introduction
    1. How to Use This Guide
    2. General Principles

Checklist

Group   Guide to the Secure Configuration of Red Hat OpenShift Container Platform 4
Group   OpenShift Settings

[ref]   Each section of this configuration guide includes information about the default configuration of an OpenShift cluster and a set of recommendations for hardening the configuration. For each hardening recommendation, information on how to implement the control and/or how to verify or audit the control is provided. In some cases, remediation information is also provided. Many of the settings in the hardening guide are in place by default. The audit information for these settings is provided in order to verify that the cluster admininstrator has not made changes that would be less secure than the OpenShift defaults. A small number of items require configuration. Finally, there are some recommendations that require decisions by the system operator, such as audit log size, retention, and related settings.

Group   OpenShift - Account and Access Control

[ref]   In traditional Unix security, if an attacker gains shell access to a certain login account, they can perform any action or access any file to which that account has access. The same idea applies to cloud technology such as OpenShift. Therefore, making it more difficult for unauthorized people to gain shell access to accounts, particularly to privileged accounts, is a necessary part of securing a system. This section introduces mechanisms for restricting access to accounts under OpenShift.

Group   OpenShift - Master Node Settings

[ref]   Contains evaluations for the master node configuration settings.

Group   OpenShift - General Security Practices

[ref]   Contains evaluations for general security practices for operating an OpenShift environment.

Group   Network Configuration and Firewalls

[ref]   Most systems must be connected to a network of some sort, and this brings with it the substantial risk of network attack. This section discusses the security impact of decisions about networking which must be made when configuring a system.

This section also discusses firewalls, network access controls, and other network security frameworks, which allow system-level rules to be written that can limit an attackers' ability to connect to your system. These rules can specify that network traffic should be allowed or denied from certain IP addresses, hosts, and networks. The rules can also specify which of the system's network services are available to particular hosts or networks.

Group   OpenShift - Master Node Settings

[ref]   Contains evaluations for the master node configuration settings.

Group   OpenShift Secrets Management

[ref]   Secrets let you store and manage sensitive information, such as passwords, OAuth tokens, and ssh keys. Such information might otherwise be put in a Pod specification or in an image.

Group   OpenShift - Registry Security Practices

[ref]   Contains evaluations for OpenShift registry security practices, and cluster-wide registry configuration.

Group   Authentication

[ref]   In cloud workloads, there are many ways to create and configure to multiple authentication services. Some of these authentication methods by not be secure or common methodologies, or they may not be secure by default. This section introduces mechanisms for configuring authentication systems to OpenShift.

Group   Security Context Constraints (SCC)

[ref]   Similar to the way that RBAC resources control user access, administrators can use Security Context Constraints (SCCs) to control permissions for pods. These permissions include actions that a pod, a collection of containers, can perform and what resources it can access. You can use SCCs to define a set of conditions that a pod must run with in order to be accepted into the system.

Group   Role-based Acess Control

[ref]   Role-based access control (RBAC) objects determine whether a user is allowed to perform a given action within a project. Cluster administrators can use the cluster roles and bindings to control who has various access levels to the OpenShift Container Platform platform itself and all projects. Developers can use local roles and bindings to control who has access to their projects. Note that authorization is a separate step from authentication, which is more about determining the identity of who is taking the action.

Group   OpenShift etcd Settings

[ref]   Contains rules that check correct OpenShift etcd settings.

Group   Kubernetes Kubelet Settings

[ref]   The Kubernetes Kubelet is an agent that runs on each node in the cluster. It makes sure that containers are running in a pod. The kubelet takes a set of PodSpecs that are provided through various mechanisms and ensures that the containers described in those PodSpecs are running and healthy. The kubelet doesn’t manage containers which were not created by Kubernetes.

Group   OpenShift API Server

[ref]   This section contains recommendations for kube-apiserver configuration.

Group   OpenShift - Kubernetes - Scheduler Settings

[ref]   Contains evaluations for kube-scheduler configuration settings.

Group   OpenShift Controller Settings

[ref]   This section contains recommendations for the kube-controller-manager configuration

Group   Introduction

[ref]   The purpose of this guidance is to provide security configuration recommendations and baselines for Red Hat OpenShift Container Platform 4. The guide is intended for system and/or application administrators. Readers are assumed to possess basic system administration skills for the application's operating systems, as well as some familiarity with the product's documentation and administration conventions. Some instructions within this guide are complex. All directions should be followed completely and with understanding of their effects in order to avoid serious adverse effects on the system and its security.

Group   How to Use This Guide

[ref]   Readers should heed the following points when using the guide.

Group   Test in Non-Production Environment

[ref]   This guidance should always be tested in a non-production environment before deployment. This test environment should simulate the setup in which the system will be deployed as closely as possible.

Group   Root Shell Environment Assumed

[ref]   Most of the actions listed in this document are written with the assumption that they will be executed by the root user running the /bin/bash shell. Commands preceded with a hash mark (#) assume that the administrator will execute the commands as root, i.e. apply the command via sudo whenever possible, or use su to gain root privileges if sudo cannot be used. Commands which can be executed as a non-root user are are preceded by a dollar sign ($) prompt.

Group   Formatting Conventions

[ref]   Commands intended for shell execution, as well as configuration file text, are featured in a monospace font. Italics are used to indicate instances where the system administrator must substitute the appropriate information into a command or configuration file.

Group   Reboot Required

[ref]   A system or service reboot is implicitly required after some actions in order to complete the reconfiguration of the system. In many cases, the changes will not take effect until a reboot is performed. In order to ensure that changes are applied properly and to test functionality, always reboot the system after applying a set of recommendations from this guide.

Group   Read Sections Completely and in Order

[ref]   Each section may build on information and recommendations discussed in prior sections. Each section should be read and understood completely; instructions should never be blindly applied. Relevant discussion may occur after instructions for an action.

Group   General Principles

[ref]   The following general principles motivate much of the advice in this guide and should also influence any configuration decisions that are not explicitly covered.

Group   Least Privilege

[ref]   Grant the least privilege necessary for user accounts and software to perform tasks. For example, sudo can be implemented to limit authorization to super user accounts on the system only to designated personnel. Another example is to limit logins on server systems to only those administrators who need to log into them in order to perform administration tasks.

Group   Run Different Network Services on Separate Systems

[ref]   Whenever possible, a server should be dedicated to serving exactly one network service. This limits the number of other services that can be compromised in the event that an attacker is able to successfully exploit a software flaw in one network service.

Group   Configure Security Tools to Improve System Robustness

[ref]   Several tools exist which can be effectively used to improve a system's resistance to and detection of unknown attacks. These tools can improve robustness against attack at the cost of relatively little configuration effort.

Group   Encrypt Transmitted Data Whenever Possible

[ref]   Data transmitted over a network, whether wired or wireless, is susceptible to passive monitoring. Whenever practical solutions for encrypting such data exist, they should be applied. Even if data is expected to be transmitted only over a local network, it should still be encrypted. Encrypting authentication data, such as passwords, is particularly important. Networks of Red Hat OpenShift Container Platform 4 machines can and should be configured so that no unencrypted authentication data is ever transmitted between machines.

Red Hat and Red Hat Enterprise Linux are either registered trademarks or trademarks of Red Hat, Inc. in the United States and other countries. All other names are registered trademarks or trademarks of their respective companies.