The Kubernetes Kubelet certificate authority must be owned by root.

STIG ID: CNTR-K8-003170  |  SRG: SRG-APP-000516-CTR-001325 |  Severity: medium |  CCI: CCI-000366 |  Vulnerability Id: V-242450

Vulnerability Discussion

The Kubernetes kube proxy kubeconfig contain the argument and setting for the Control Planes. These settings contain network rules for restricting network communication between pods, clusters, and networks. If these files can be changed, data traversing between the Kubernetes Control Panel components would be compromised. Many of the security settings within the document are implemented through this file.

Check

On the Control Plane, run the command:
ps -ef | grep kubelet

If the "client-ca-file" option exists, this is a finding.

Note the path to the config file (identified by --config).

Run the command:
grep -i clientCAFile <path_to_config_file>

Note the path to the client ca file.

Run the command:
stat -c %U:%G <path_to_client_ca_file>

If the command returns any non root:root file permissions, this is a finding.

Fix

On the Control Plane, run the command:
ps -ef | grep kubelet

Remove the "client-ca-file" option.

Note the path to the config file (identified by --config).

Run the command:
grep -i clientCAFile <path_to_config_file>

Note the path to the client ca file.

Run the command:
chown root:root <path_to_client_ca_file>