CNTR-K8-001300 - Kubernetes Kubelet must not disable timeouts.

Information

Idle connections from the Kubelet can be used by unauthorized users to perform malicious activity to the nodes, pods, containers, and cluster within the Kubernetes Control Plane. Setting the streamingConnectionIdleTimeout defines the maximum time an idle session is permitted prior to disconnect. Setting the value to '0' never disconnects any idle sessions. Idle timeouts must never be set to '0' and should be defined at '5m' (the default is 4hr).

Solution

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

Remove the '--streaming-connection-idle-timeout' option if present.

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

Edit the Kubernetes Kubelet file in the --config directory on the Kubernetes Control Plane:

Set the argument 'streamingConnectionIdleTimeout' to a value of '5m'.

Reset the kubelet service using the following command:
service kubelet restart

See Also

https://dl.dod.cyber.mil/wp-content/uploads/stigs/zip/U_Kubernetes_V2R2_STIG.zip

Item Details

Category: SYSTEM AND COMMUNICATIONS PROTECTION

References: 800-53|SC-10, CAT|II, CCI|CCI-001133, Rule-ID|SV-245541r961068_rule, STIG-ID|CNTR-K8-001300, Vuln-ID|V-245541

Plugin: Unix

Control ID: eecc8455981fd9e2f463e45c9f0649077f94ccd390bb69c7265e791da1a6492b