C-0141 - Ensure that the API Server --encryption-provider-config argument is set as appropriate

Prerequisites

Run Kubescape with host sensor (see here)

Framework

cis-v1.23-t1.0.1

Severity

High

Description of the the issue

etcd is a highly available key-value store used by Kubernetes deployments for persistent storage of all of its REST API objects. These objects are sensitive in nature and should be encrypted at rest to avoid any disclosures.

Related resources

Pod

What does this control test

Encrypt etcd key-value store.

How to check it manually

Run the following command on the Control Plane node:

ps -ef | grep kube-apiserver

Verify that the --encryption-provider-config argument is set to a EncryptionConfig file. Additionally, ensure that the EncryptionConfig file has all the desired resources covered especially any secrets.

Remediation

Follow the Kubernetes documentation and configure a EncryptionConfig file. Then, edit the API server pod specification file /etc/kubernetes/manifests/kube-apiserver.yaml on the master node and set the --encryption-provider-config parameter to the path of that file:

--encryption-provider-config=</path/to/EncryptionConfig/File>

Impact Statement

None

Default Value

By default, --encryption-provider-config is not set.

Example

No example