The Kubernetes PKI CRT must have file permissions set to 644 or more restrictive.

STIG ID: CNTR-K8-003330  |  SRG: SRG-APP-000516-CTR-001335 |  Severity: medium |  CCI: CCI-000366 |  Vulnerability Id: V-242466

Vulnerability Discussion

The Kubernetes PKI directory contains all certificates (.crt files) supporting secure network communications in the Kubernetes Control Plane. If these files can be modified, data traversing within the architecture components would become unsecure and compromised.

Check

Review the permissions of the Kubernetes PKI cert files by using the command:

sudo find /etc/kubernetes/pki/* -name "*.crt" | xargs stat -c '%n %a'

If any of the files have permissions more permissive than "644", this is a finding.

Fix

Change the ownership of the cert files to "644" by executing the command:

find /etc/kubernetes/pki -name "*.crt" | xargs chmod 644