Guide to the Secure Configuration of Amazon Elastic Kubernetes Service
Rules, Groups, and Values defined within the XCCDF Benchmark
-
Root of files obtained from OCP nodes
When scanning OpenShift clusters, some settings are not exposed as files. In the case that they are exported from the cluster (typically as yaml files), this variable determines the directory where...Value -
Kubernetes Settings
Each section of this configuration guide includes information about the configuration of a Kubernetes cluster and a set of recommendations for hardening the configuration. For each hardening recomm...Group -
Kubernetes - Account and Access Control
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...Group -
Use Dedicated Service Accounts
Kubernetes workloads should not use cluster node service accounts to authenticate to Amazon EKS APIs. Each Kubernetes workload that needs to authenticate to other AWS services using AWS IAM should ...Rule Unknown Severity -
Authentication
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 b...Group -
Manage Users with AWS IAM
Amazon EKS uses IAM to provide authentication to your Kubernetes cluster through the AWS IAM Authenticator for Kubernetes. You can configure the stock kubectl client to work with Amazon EKS by inst...Rule Unknown Severity -
Kubernetes - General Security Practices
Contains evaluations for general security practices for operating a Kubernetes environment.Group -
Consider Fargate for Untrusted Workloads
It is Best Practice to restrict or fence untrusted workloads when running in a multi-tenant environment.Rule Unknown Severity -
Kubernetes Kubelet Settings
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 ...Group -
Streaming Connection Timeout Options
Time until connection timeouts. Use (s) for seconds, (m) for minutes, and (h) for hours.Value -
kubelet - Hostname Override handling
Normally, OpenShift lets the kubelet get the hostname from either the cloud provider itself, or from the node's hostname. This ensures that the PKI allocated by the deployment uses the appropriate ...Rule Low Severity -
kubelet - Enable Client Certificate Rotation
To enable the kubelet to rotate client certificates, edit the kubelet configuration file <code>/etc/kubernetes/kubelet/kubelet-config.json</code> on the kubelet node(s) and set the below parameter:...Rule Medium Severity -
kubelet - Enable Protect Kernel Defaults
Protect tuned kernel parameters from being overwritten by the kubelet.
Rule Medium Severity -
kubelet - Do Not Disable Streaming Timeouts
Timeouts for streaming connections should not be disabled as they help to prevent denial-of-service attacks. To configure streaming connection timeouts, edit the kubelet configuration file <code>/e...Rule Medium Severity -
kubelet - Ensure that the --read-only-port is secured
Disable the read-only port.Rule Medium Severity -
OpenShift - Logging Settings
Contains evaluations for the cluster's logging configuration settings.Group -
Ensure Audit Logging is Enabled
The audit logs are part of the EKS managed Kubernetes control plane logs that are managed by Amazon EKS. Amazon EKS is integrated with AWS CloudTrail, a service that provides a record of actions ta...Rule Unknown Severity -
Ensure that application Namespaces have Network Policies defined.
Use network policies to isolate traffic in your cluster network.Rule High Severity -
Ensure Network Policy is Enabled
Use Network Policy to restrict pod to pod traffic within a cluster and segregate workloads.Rule Unknown Severity -
Encrypt Traffic to Load Balancers and Workloads
Encrypt traffic to HTTPS load balancers using TLS certificates.Rule Unknown Severity -
Ensure Private Endpoint Access
Disable access to the Kubernetes API from outside the node network if it is not required.Rule Unknown Severity -
Ensure Cluster Private Nodes
Disable public IP addresses for cluster nodes, so that they only have private IP addresses. Private Nodes are nodes with no public IP addresses.Rule Unknown Severity -
Kubernetes - Registry Security Practices
Contains evaluations for Kubernetes registry security practices, and cluster-wide registry configuration.Group -
Only use approved container registries
Use approved container registries.Rule Unknown Severity -
Ensure Image Vulnerability Scanning
Scan images being deployed to Amazon EKS for vulnerabilities.Rule Unknown Severity -
Ensure Cluster Service Account with read-only access to Amazon ECR
Configure the Cluster Service Account with Storage Object Viewer Role to only allow read- only access to Amazon ECR.Rule Unknown Severity -
Minimize user access to Amazon ECR
Restrict user access to Amazon ECR, limiting interaction with build images to only authorized personnel and service accounts.Rule Unknown Severity -
Kubernetes Secrets Management
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 -
Ensure Kubernetes Secrets are Encrypted
Encrypt Kubernetes secrets, stored in etcd, using secrets encryption feature during Amazon EKS cluster creation.Rule Unknown Severity -
Kubernetes - Worker Node Settings
Contains evaluations for the worker node configuration settings.Group -
Verify Group Who Owns The Worker Kubeconfig File
To properly set the group owner of/var/lib/kubelet/kubeconfig
, run the command:$ sudo chgrp root /var/lib/kubelet/kubeconfig
Rule Medium Severity -
Verify User Who Owns The Kubelet Configuration File
To properly set the owner of/etc/kubernetes/kubelet/kubelet-config.json
, run the command:$ sudo chown root /etc/kubernetes/kubelet/kubelet-config.json
Rule Medium Severity -
Verify User Who Owns The Worker Kubeconfig File
To properly set the owner of/var/lib/kubelet/kubeconfig
, run the command:$ sudo chown root /var/lib/kubelet/kubeconfig
Rule Medium Severity -
Verify Permissions on The Kubelet Configuration File
To properly set the permissions of/etc/kubernetes/kubelet/kubelet-config.json
, run the command:$ sudo chmod 0644 /etc/kubernetes/kubelet/kubelet-config.json
Rule Medium Severity -
Verify Permissions on the Worker Kubeconfig File
To properly set the permissions of/var/lib/kubelet/kubeconfig
, run the command:$ sudo chmod 0644 /var/lib/kubelet/kubeconfig
Rule Medium Severity -
kubelet - Allow Automatic Firewall Configuration
The kubelet has the ability to automatically configure the firewall to allow the containers required ports and connections to networking resources and destinations parameters potentially creating a...Rule Medium Severity -
kubelet - Enable Server Certificate Rotation
To enable the kubelet to rotate server certificates, edit the kubelet configuration file <code>/etc/kubernetes/kubelet/kubelet-config.json</code> on the kubelet node(s) and set the below parameter:...Rule Medium Severity -
Verify Group Who Owns The Kubelet Configuration File
To properly set the group owner of/etc/kubernetes/kubelet/kubelet-config.json
, run the command:$ sudo chgrp root /etc/kubernetes/kubelet/kubelet-config.json
Rule Medium Severity -
Disable Anonymous Authentication to the Kubelet
By default, anonymous access to the Kubelet server is enabled. This configuration check ensures that anonymous requests to the Kubelet server are disabled. Edit the Kubelet server configuration fil...Rule Medium Severity -
Ensure authorization is set to Webhook
Unauthenticated/unauthorized users should have no access to OpenShift nodes. The Kubelet should be set to only allow Webhook authorization. To ensure that the Kubelet requires authorization, valida...Rule Medium Severity -
kubelet - Configure the Client CA Certificate
By default, the kubelet is not configured with a CA certificate which can subject the kubelet to man-in-the-middle attacks. To configure a client CA certificate, edit the kubelet configuration fil...Rule Medium Severity -
kubelet - Enable Certificate Rotation
To enable the kubelet to rotate client certificates, edit the kubelet configuration file <code>/etc/kubernetes/kubelet/kubelet-config.json</code> on the kubelet node(s) and set the below parameter:...Rule Medium Severity -
kubelet - Do Not Disable Streaming Timeouts
Timouts for streaming connections should not be disabled as they help to prevent denial-of-service attacks. To configure streaming connection timeouts To set the <code>streamingConnectionIdleTimeou...Rule Medium Severity -
Kubernetes - Network Configuration and Firewalls
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 wh...Group -
Namespaces exempt of Network Policies
Namespaces regular expression explicitly allowed through network policy filters, e.g. setting value to "namespace1|namespace2" will exempt namespace "namespace1" and "namespace2" for network polici...Value -
Restrict Access to the Control Plane Endpoint
Enable Endpoint Private Access to restrict access to the cluster's control plane to only an allowlist of authorized IPs.Rule Unknown Severity
Node 2
The content of the drawer really is up to you. It could have form fields, definition lists, text lists, labels, charts, progress bars, etc. Spacing recommendation is 24px margins. You can put tabs in here, and can also make the drawer scrollable.