Kubernetes STIG SCAP Benchmark

  • Version/Release: V1R3
  • Published: 2023-08-29
  • Severity:
  • Sort:
View

Select any old version/release of this SCAP to view the previous requirements

This Security Technical Implementation Guide is published as a tool to improve the security of Department of Defense (DOD) information systems. The requirements are derived from the National Institute of Standards and Technology (NIST) 800-53 and related documents. Comments or proposed revisions to this document should be sent via email to the following address: disa.stig_spt@mail.mil.
b
The Kubernetes Controller Manager must use TLS 1.2, at a minimum, to protect the confidentiality of sensitive data during electronic dissemination.
RMF Control
AC-17
Severity
Medium
CCI
CCI-000068
Version
CNTR-K8-000150
Vuln IDs
V-242376
Rule IDs
SV-242376r879519_rule
The Kubernetes Controller Manager will prohibit the use of SSL and unauthorized versions of TLS protocols to properly secure communication. The use of unsupported protocol exposes vulnerabilities to the Kubernetes by rogue traffic interceptions, man-in-the-middle attacks, and impersonation of users or services from the container platform runtime, registry, and key store. To enable the minimum version of TLS to be used by the Kubernetes Controller Manager, the setting "tls-min-version" must be set.
Fix: F-45609r863732_fix

Edit the Kubernetes Controller Manager manifest file in the /etc/kubernetes/manifests directory on the Kubernetes Control Plane. Set the value of "--tls-min-version" to "VersionTLS12" or higher.

b
The Kubernetes Scheduler must use TLS 1.2, at a minimum, to protect the confidentiality of sensitive data during electronic dissemination.
RMF Control
AC-17
Severity
Medium
CCI
CCI-000068
Version
CNTR-K8-000160
Vuln IDs
V-242377
Rule IDs
SV-242377r879519_rule
The Kubernetes Scheduler will prohibit the use of SSL and unauthorized versions of TLS protocols to properly secure communication. The use of unsupported protocol exposes vulnerabilities to the Kubernetes by rogue traffic interceptions, man-in-the-middle attacks, and impersonation of users or services from the container platform runtime, registry, and keystore. To enable the minimum version of TLS to be used by the Kubernetes API Server, the setting "tls-min-version" must be set.
Fix: F-45610r863735_fix

Edit the Kubernetes Scheduler manifest file in the /etc/kubernetes/manifests directory on the Kubernetes Control Plane. Set the value of "--tls-min-version" to "VersionTLS12" or higher.

b
The Kubernetes API Server must use TLS 1.2, at a minimum, to protect the confidentiality of sensitive data during electronic dissemination.
RMF Control
AC-17
Severity
Medium
CCI
CCI-000068
Version
CNTR-K8-000170
Vuln IDs
V-242378
Rule IDs
SV-242378r879519_rule
The Kubernetes API Server will prohibit the use of SSL and unauthorized versions of TLS protocols to properly secure communication. The use of unsupported protocol exposes vulnerabilities to the Kubernetes by rogue traffic interceptions, man-in-the-middle attacks, and impersonation of users or services from the container platform runtime, registry, and keystore. To enable the minimum version of TLS to be used by the Kubernetes API Server, the setting "tls-min-version" must be set.
Fix: F-45611r863738_fix

Edit the Kubernetes API Server manifest file in the /etc/kubernetes/manifests directory on the Kubernetes Control Plane. Set the value of "--tls-min-version" to "VersionTLS12" or higher.

b
The Kubernetes etcd must use TLS to protect the confidentiality of sensitive data during electronic dissemination.
RMF Control
AC-17
Severity
Medium
CCI
CCI-000068
Version
CNTR-K8-000180
Vuln IDs
V-242379
Rule IDs
SV-242379r927237_rule
Kubernetes etcd will prohibit the use of SSL and unauthorized versions of TLS protocols to properly secure communication. The use of unsupported protocol exposes vulnerabilities to the Kubernetes by rogue traffic interceptions, man-in-the-middle attacks, and impersonation of users or services from the container platform runtime, registry, and keystore. To enable the minimum version of TLS to be used by the Kubernetes API Server, the setting "--auto-tls" must be set.
Fix: F-45612r927070_fix

Edit the Kubernetes etcd manifest file in the /etc/kubernetes/manifests directory on the Kubernetes Control Plane. Set the value of "--auto-tls" to "false".

b
The Kubernetes etcd must use TLS to protect the confidentiality of sensitive data during electronic dissemination.
RMF Control
AC-17
Severity
Medium
CCI
CCI-000068
Version
CNTR-K8-000190
Vuln IDs
V-242380
Rule IDs
SV-242380r927238_rule
The Kubernetes API Server will prohibit the use of SSL and unauthorized versions of TLS protocols to properly secure communication. The use of unsupported protocol exposes vulnerabilities to the Kubernetes by rogue traffic interceptions, man-in-the-middle attacks, and impersonation of users or services from the container platform runtime, registry, and keystore. To enable the minimum version of TLS to be used by the Kubernetes API Server, the setting "--peer-auto-tls" must be set.
Fix: F-45613r927073_fix

Edit the Kubernetes etcd manifest file in the /etc/kubernetes/manifests directory on the Kubernetes Control Plane. Set the value of "--peer-auto-tls" to "false".

c
The Kubernetes Controller Manager must create unique service accounts for each work payload.
RMF Control
AC-2
Severity
High
CCI
CCI-000015
Version
CNTR-K8-000220
Vuln IDs
V-242381
Rule IDs
SV-242381r927239_rule
The Kubernetes Controller Manager is a background process that embeds core control loops regulating cluster system state through the API Server. Every process executed in a pod has an associated service account. By default, service accounts use the same credentials for authentication. Implementing the default settings poses a High risk to the Kubernetes Controller Manager. Setting the "--use-service-account-credential" value lowers the attack surface by generating unique service accounts settings for each controller instance.
Fix: F-45614r927076_fix

Edit the Kubernetes Controller Manager manifest file in the /etc/kubernetes/manifests directory on the Kubernetes Control Plane. Set the value of "--use-service-account-credentials" to "true".

b
The Kubernetes API Server must enable Node,RBAC as the authorization mode.
RMF Control
AC-3
Severity
Medium
CCI
CCI-000213
Version
CNTR-K8-000270
Vuln IDs
V-242382
Rule IDs
SV-242382r927240_rule
To mitigate the risk of unauthorized access to sensitive information by entities that have been issued certificates by DOD-approved PKIs, all DOD systems (e.g., networks, web servers, and web portals) must be properly configured to incorporate access control methods that do not rely solely on the possession of a certificate for access. Successful authentication must not automatically give an entity access to an asset or security boundary. Authorization procedures and controls must be implemented to ensure each authenticated entity also has a validated and current authorization. Authorization is the process of determining whether an entity, once authenticated, is permitted to access a specific asset. Node,RBAC is the method within Kubernetes to control access of users and applications. Kubernetes uses roles to grant authorization API requests made by kubelets. Satisfies: SRG-APP-000340-CTR-000770, SRG-APP-000033-CTR-000095, SRG-APP-000378-CTR-000880, SRG-APP-000033-CTR-000090
Fix: F-45615r918145_fix

Edit the Kubernetes API Server manifest file in the /etc/kubernetes/manifests directory on the Kubernetes Control Plane. Set the value of "--authorization-mode" to "Node,RBAC".

b
The Kubernetes Scheduler must have secure binding.
RMF Control
AC-3
Severity
Medium
CCI
CCI-000213
Version
CNTR-K8-000300
Vuln IDs
V-242384
Rule IDs
SV-242384r879530_rule
Limiting the number of attack vectors and implementing authentication and encryption on the endpoints available to external sources is paramount when securing the overall Kubernetes cluster. The Scheduler API service exposes port 10251/TCP by default for health and metrics information use. This port does not encrypt or authenticate connections. If this port is exposed externally, an attacker can use this port to attack the entire Kubernetes cluster. By setting the bind address to localhost (i.e., 127.0.0.1), only those internal services that require health and metrics information can access the Scheduler API.
Fix: F-45617r863756_fix

Edit the Kubernetes Scheduler manifest file in the /etc/kubernetes/manifests directory on the Kubernetes Control Plane. Set the argument "--bind-address" to "127.0.0.1".

b
The Kubernetes Controller Manager must have secure binding.
RMF Control
AC-3
Severity
Medium
CCI
CCI-000213
Version
CNTR-K8-000310
Vuln IDs
V-242385
Rule IDs
SV-242385r879530_rule
Limiting the number of attack vectors and implementing authentication and encryption on the endpoints available to external sources is paramount when securing the overall Kubernetes cluster. The Controller Manager API service exposes port 10252/TCP by default for health and metrics information use. This port does not encrypt or authenticate connections. If this port is exposed externally, an attacker can use this port to attack the entire Kubernetes cluster. By setting the bind address to only localhost (i.e., 127.0.0.1), only those internal services that require health and metrics information can access the Control Manager API.
Fix: F-45618r863759_fix

Edit the Kubernetes Controller Manager manifest file in the /etc/kubernetes/manifests directory on the Kubernetes Control Plane. Set the argument "--bind-address" to "127.0.0.1".

c
The Kubernetes API server must have the insecure port flag disabled.
RMF Control
AC-3
Severity
High
CCI
CCI-000213
Version
CNTR-K8-000320
Vuln IDs
V-242386
Rule IDs
SV-242386r927241_rule
By default, the API server will listen on two ports. One port is the secure port and the other port is called the "localhost port". This port is also called the "insecure port", port 8080. Any requests to this port bypass authentication and authorization checks. If this port is left open, anyone who gains access to the host on which the Control Plane is running can bypass all authorization and authentication mechanisms put in place, and have full control over the entire cluster. Close the insecure port by setting the API server's "--insecure-port" flag to "0", ensuring that the "--insecure-bind-address" is not set.
Fix: F-45619r927080_fix

Edit the Kubernetes API Server manifest file in the /etc/kubernetes/manifests directory on the Kubernetes Control Plane. Set the value of "--insecure-port" to "0".

c
The Kubernetes API server must have the insecure bind address not set.
RMF Control
AC-3
Severity
High
CCI
CCI-000213
Version
CNTR-K8-000340
Vuln IDs
V-242388
Rule IDs
SV-242388r927242_rule
By default, the API server will listen on two ports and addresses. One address is the secure address and the other address is called the "insecure bind" address and is set by default to localhost. Any requests to this address bypass authentication and authorization checks. If this insecure bind address is set to localhost, anyone who gains access to the host on which the Control Plane is running can bypass all authorization and authentication mechanisms put in place and have full control over the entire cluster. Close or set the insecure bind address by setting the API server's "--insecure-bind-address" flag to an IP or leave it unset and ensure that the "--insecure-bind-port" is not set.
Fix: F-45621r927083_fix

Edit the Kubernetes API Server manifest file in the /etc/kubernetes/manifests directory on the Kubernetes Control Plane. Remove the value of "--insecure-bind-address" setting.

b
The Kubernetes API server must have the secure port set.
RMF Control
AC-3
Severity
Medium
CCI
CCI-000213
Version
CNTR-K8-000350
Vuln IDs
V-242389
Rule IDs
SV-242389r927243_rule
By default, the API server will listen on what is rightfully called the secure port, port 6443. Any requests to this port will perform authentication and authorization checks. If this port is disabled, anyone who gains access to the host on which the Control Plane is running has full control of the entire cluster over encrypted traffic. Open the secure port by setting the API server's "--secure-port" flag to a value other than "0".
Fix: F-45622r927086_fix

Edit the Kubernetes API Server manifest file in the /etc/kubernetes/manifests directory on the Kubernetes Control Plane. Set the value of "--secure-port" to a value greater than "0".

c
The Kubernetes API server must have anonymous authentication disabled.
RMF Control
AC-3
Severity
High
CCI
CCI-000213
Version
CNTR-K8-000360
Vuln IDs
V-242390
Rule IDs
SV-242390r927244_rule
The Kubernetes API Server controls Kubernetes via an API interface. A user who has access to the API essentially has root access to the entire Kubernetes cluster. To control access, users must be authenticated and authorized. By allowing anonymous connections, the controls put in place to secure the API can be bypassed. Setting "--anonymous-auth" to "false" also disables unauthenticated requests from kubelets. While there are instances where anonymous connections may be needed (e.g., health checks) and Role-Based Access Controls (RBACs) are in place to limit the anonymous access, this access should be disabled, and only enabled when necessary.
Fix: F-45623r927089_fix

Edit the Kubernetes API Server manifest file in the /etc/kubernetes/manifests directory on the Kubernetes Control Plane. Set the value of "--anonymous-auth" to "false".

b
Kubernetes Worker Nodes must not have sshd service running.
RMF Control
AC-3
Severity
Medium
CCI
CCI-000213
Version
CNTR-K8-000400
Vuln IDs
V-242393
Rule IDs
SV-242393r879530_rule
Worker Nodes are maintained and monitored by the Control Plane. Direct access and manipulation of the nodes should not take place by administrators. Worker nodes should be treated as immutable and updated via replacement rather than in-place upgrades.
Fix: F-45626r863782_fix

To stop the sshd service, run the command: systemctl stop sshd Note: If access to the worker node is through an SSH session, it is important to realize there are two requirements for disabling and stopping the sshd service and they should be done during the same SSH session. Disabling the service must be performed first and then the service stopped to guarantee both settings can be made if the session is interrupted.

c
The Kubernetes kubelet staticPodPath must not enable static pods.
RMF Control
AC-3
Severity
High
CCI
CCI-000213
Version
CNTR-K8-000440
Vuln IDs
V-242397
Rule IDs
SV-242397r927245_rule
Allowing kubelet to set a staticPodPath gives containers with root access permissions to traverse the hosting filesystem. The danger comes when the container can create a manifest file within the /etc/kubernetes/manifests directory. When a manifest is created within this directory, containers are entirely governed by the Kubelet not the API Server. The container is not susceptible to admission control at all. Any containers or pods that are instantiated in this manner are called "static pods" and are meant to be used for pods such as the API server, scheduler, controller, etc., not workload pods that need to be governed by the API Server.
Fix: F-45630r927092_fix

On each Control Plane and Worker node, run the command: ps -ef | grep kubelet Note the path to the config file (identified by --config). Edit the Kubernetes kubelet file in the --config directory on the Kubernetes Control Plane and Worker nodes. Remove the setting "staticPodPath". Restart the kubelet service using the following command: systemctl daemon-reload && systemctl restart kubelet

b
The Kubernetes API server must have Alpha APIs disabled.
RMF Control
AC-3
Severity
Medium
CCI
CCI-000213
Version
CNTR-K8-000470
Vuln IDs
V-242400
Rule IDs
SV-242400r927246_rule
Kubernetes allows alpha API calls within the API server. The alpha features are disabled by default since they are not ready for production and likely to change without notice. These features may also contain security issues that are rectified as the feature matures. To keep the Kubernetes cluster secure and stable, these alpha features must not be used.
Fix: F-45633r927095_fix

Edit any manifest file that contains the "--feature-gates" setting with "AllAlpha" set to "true". Set the value of "AllAlpha" to "false" or remove the setting completely. (AllAlpha - default=false)

b
The Kubernetes API Server must have an audit log path set.
RMF Control
AU-14
Severity
Medium
CCI
CCI-001464
Version
CNTR-K8-000610
Vuln IDs
V-242402
Rule IDs
SV-242402r927248_rule
When Kubernetes is started, components and user services are started for auditing startup events, and events for components and services, it is important that auditing begin on startup. Within Kubernetes, audit data for all components is generated by the API server. To enable auditing to begin, an audit policy must be defined for the events and the information to be stored with each event. It is also necessary to give a secure location where the audit logs are to be stored. If an audit log path is not specified, all audit data is sent to studio.
Fix: F-45635r927101_fix

Edit the Kubernetes API Server manifest file in the /etc/kubernetes/manifests directory on the Kubernetes Control Plane. Set the value of "--audit-log-path" to a secure location for the audit logs to be written. Note: If the API server is running as a Pod, then the manifest will also need to be updated to mount the host system filesystem where the audit log file is to be written.

b
Kubernetes API Server must generate audit records that identify what type of event has occurred, identify the source of the event, contain the event results, identify any users, and identify any containers associated with the event.
RMF Control
AC-2
Severity
Medium
CCI
CCI-000018
Version
CNTR-K8-000700
Vuln IDs
V-242403
Rule IDs
SV-242403r927249_rule
Within Kubernetes, audit data for all components is generated by the API server. This audit data is important when there are issues, to include security incidents that must be investigated. To make the audit data worthwhile for the investigation of events, it is necessary to have the appropriate and required data logged. To fully understand the event, it is important to identify any users associated with the event. The API server policy file allows for the following levels of auditing: None - Do not log events that match the rule. Metadata - Log request metadata (requesting user, timestamp, resource, verb, etc.) but not request or response body. Request - Log event metadata and request body but not response body. RequestResponse - Log event metadata, request, and response bodies. Satisfies: SRGID:SRG-APP-000092-CTR-000165, SRG-APP-000026-CTR-000070, SRG-APP-000027-CTR-000075, SRG-APP-000028-CTR-000080, SRG-APP-000101-CTR-000205, SRG-APP-000100-CTR-000200, SRG-APP-000100-CTR-000195, SRG-APP-000099-CTR-000190, SRG-APP-000098-CTR-000185, SRG-APP-000095-CTR-000170, SRG-APP-000096-CTR-000175, SRG-APP-000097-CTR-000180, SRG-APP-000507-CTR-001295, SRG-APP-000504-CTR-001280, SRG-APP-000503-CTR-001275, SRG-APP-000501-CTR-001265, SRG-APP-000500-CTR-001260, SRG-APP-000497-CTR-001245, SRG-APP-000496-CTR-001240, SRG-APP-000493-CTR-001225, SRG-APP-000492-CTR-001220, SRG-APP-000343-CTR-000780, SRG-APP-000381-CTR-000905
Fix: F-45636r927103_fix

Edit the Kubernetes API Server manifest file in the /etc/kubernetes/manifests directory on the Kubernetes Control Plane. Set the value of "--audit-policy-file" to the path of a file with the following content: # Log all requests at the RequestResponse level. apiVersion: audit.k8s.io/vX (Where X is the latest apiVersion) kind: Policy rules: - level: RequestResponse Note: If the API server is running as a Pod, then the manifest will also need to be updated to mount the host system filesystem where the audit policy file resides.

b
Kubernetes Kubelet must deny hostname override.
RMF Control
CM-5
Severity
Medium
CCI
CCI-001499
Version
CNTR-K8-000850
Vuln IDs
V-242404
Rule IDs
SV-242404r918167_rule
Kubernetes allows for the overriding of hostnames. Allowing this feature to be implemented within the kubelets may break the TLS setup between the kubelet service and the API server. This setting also can make it difficult to associate logs with nodes if security analytics needs to take place. The better practice is to setup nodes with resolvable FQDNs and avoid overriding the hostnames.
Fix: F-45637r918166_fix

Run the command: systemctl status kubelet. Note the path to the drop-in file. Determine the path to the environment file(s) with the command: grep -i EnvironmentFile <path_to_drop_in_file>. Remove the "--hostname-override" option from any environment file where it is present. Restart the kubelet service using the following command: systemctl daemon-reload && systemctl restart kubelet

b
The Kubernetes manifests must be owned by root.
RMF Control
CM-5
Severity
Medium
CCI
CCI-001499
Version
CNTR-K8-000860
Vuln IDs
V-242405
Rule IDs
SV-242405r879586_rule
The manifest files contain the runtime configuration of the API server, proxy, scheduler, controller, and etcd. If an attacker can gain access to these files, changes can be made to open vulnerabilities and bypass user authorizations inherit within Kubernetes with RBAC implemented.
Fix: F-45638r863813_fix

On the Control Plane, change to the /etc/kubernetes/manifest directory. Run the command: chown root:root * To verify the change took place, run the command: ls -l * All the manifest files should be owned by root:root.

b
The Kubernetes KubeletConfiguration file must be owned by root.
RMF Control
CM-5
Severity
Medium
CCI
CCI-001499
Version
CNTR-K8-000880
Vuln IDs
V-242406
Rule IDs
SV-242406r918168_rule
The kubelet configuration file contains the runtime configuration of the kubelet service. If an attacker can gain access to this file, changes can be made to open vulnerabilities and bypass user authorizations inherent within Kubernetes with RBAC implemented.
Fix: F-45639r863816_fix

On the Control Plane and Worker nodes, change to the --config directory. Run the command: chown root:root kubelet To verify the change took place, run the command: ls -l kubelet The kubelet file should now be owned by root:root.

b
The Kubernetes manifest files must have least privileges.
RMF Control
CM-5
Severity
Medium
CCI
CCI-001499
Version
CNTR-K8-000900
Vuln IDs
V-242408
Rule IDs
SV-242408r918174_rule
The manifest files contain the runtime configuration of the API server, scheduler, controller, and etcd. If an attacker can gain access to these files, changes can be made to open vulnerabilities and bypass user authorizations inherent within Kubernetes with RBAC implemented. Satisfies: SRG-APP-000133-CTR-000310, SRG-APP-000133-CTR-000295, SRG-APP-000516-CTR-001335
Fix: F-45641r918173_fix

On both Control Plane and Worker Nodes, change to the /etc/kubernetes/manifest directory. Run the command: chmod 644 * To verify the change took place, run the command: ls -l * All the manifest files should now have privileges of "644".

b
Kubernetes Controller Manager must disable profiling.
RMF Control
CM-7
Severity
Medium
CCI
CCI-000381
Version
CNTR-K8-000910
Vuln IDs
V-242409
Rule IDs
SV-242409r879587_rule
Kubernetes profiling provides the ability to analyze and troubleshoot Controller Manager events over a web interface on a host port. Enabling this service can expose details about the Kubernetes architecture. This service must not be enabled unless deemed necessary.
Fix: F-45642r863825_fix

Edit the Kubernetes Controller Manager manifest file in the /etc/kubernetes/manifests directory on the Kubernetes Control Plane. Set the argument "--profiling value" to "false".

b
The Kubernetes API server must use approved cipher suites.
RMF Control
SC-23
Severity
Medium
CCI
CCI-001184
Version
CNTR-K8-001400
Vuln IDs
V-242418
Rule IDs
SV-242418r927250_rule
The Kubernetes API server communicates to the kubelet service on the nodes to deploy, update, and delete resources. If an attacker were able to get between this communication and modify the request, the Kubernetes cluster could be compromised. Using approved cypher suites for the communication ensures the protection of the transmitted information, confidentiality, and integrity so that the attacker cannot read or alter this communication.
Fix: F-45651r927105_fix

Edit the Kubernetes API Server manifest file in the /etc/kubernetes/manifests directory on the Kubernetes Control Plane. Set the value of "--tls-cipher-suites" to: "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384"

b
Kubernetes API Server must have the SSL Certificate Authority set.
RMF Control
SC-23
Severity
Medium
CCI
CCI-001184
Version
CNTR-K8-001410
Vuln IDs
V-242419
Rule IDs
SV-242419r918176_rule
Kubernetes control plane and external communication are managed by API Server. The main implementation of the API Server is to manage hardware resources for pods and containers using horizontal or vertical scaling. Anyone who can access the API Server can effectively control the Kubernetes architecture. Using authenticity protection, the communication can be protected against man-in-the-middle attacks/session hijacking and the insertion of false information into sessions. The communication session is protected by utilizing transport encryption protocols such as TLS. TLS provides the Kubernetes API Server with a means to authenticate sessions and encrypt traffic. To enable encrypted communication for API Server, the parameter client-ca-file must be set. This parameter gives the location of the SSL Certificate Authority file used to secure API Server communication.
Fix: F-45652r918175_fix

Edit the Kubernetes API Server manifest file in the /etc/kubernetes/manifests directory on the Kubernetes Control Plane. Set the value of "--client-ca-file" to path containing Approved Organizational Certificate.

b
Kubernetes Kubelet must have the SSL Certificate Authority set.
RMF Control
SC-23
Severity
Medium
CCI
CCI-001184
Version
CNTR-K8-001420
Vuln IDs
V-242420
Rule IDs
SV-242420r918179_rule
Kubernetes container and pod configuration are maintained by Kubelet. Kubelet agents register nodes with the API Server, mount volume storage, and perform health checks for containers and pods. Anyone who gains access to Kubelet agents can effectively control applications within the pods and containers. Using authenticity protection, the communication can be protected against man-in-the-middle attacks/session hijacking and the insertion of false information into sessions. The communication session is protected by utilizing transport encryption protocols such as TLS. TLS provides the Kubernetes API Server with a means to authenticate sessions and encrypt traffic. To enable encrypted communication for Kubelet, the clientCAFile must be set. This parameter gives the location of the SSL Certificate Authority file used to secure Kubelet communication.
Fix: F-45653r918178_fix

On the Control Plane, run the command: ps -ef | grep kubelet Remove the "--client-ca-file" option if present. Note the path to the config file (identified by --config). Edit the Kubernetes Kubelet config file: Set the value of "clientCAFile" to a path containing an Approved Organizational Certificate. Restart the kubelet service using the following command: systemctl daemon-reload && systemctl restart kubelet

b
Kubernetes Controller Manager must have the SSL Certificate Authority set.
RMF Control
SC-23
Severity
Medium
CCI
CCI-001184
Version
CNTR-K8-001430
Vuln IDs
V-242421
Rule IDs
SV-242421r927251_rule
The Kubernetes Controller Manager is responsible for creating service accounts and tokens for the API Server, maintaining the correct number of pods for every replication controller and provides notifications when nodes are offline. Anyone who gains access to the Controller Manager can generate backdoor accounts, take possession of, or diminish system performance without detection by disabling system notification. Using authenticity protection, the communication can be protected against man-in-the-middle attacks/session hijacking and the insertion of false information into sessions. The communication session is protected by utilizing transport encryption protocols, such as TLS. TLS provides the Kubernetes Controller Manager with a means to be able to authenticate sessions and encrypt traffic.
Fix: F-45654r927108_fix

Edit the Kubernetes Controller Manager manifest file in the /etc/kubernetes/manifests directory on the Kubernetes Control Plane. Set the value of "--root-ca-file" to path containing Approved Organizational Certificate.

b
Kubernetes API Server must have a certificate for communication.
RMF Control
SC-23
Severity
Medium
CCI
CCI-001184
Version
CNTR-K8-001440
Vuln IDs
V-242422
Rule IDs
SV-242422r879636_rule
Kubernetes control plane and external communication is managed by API Server. The main implementation of the API Server is to manage hardware resources for pods and container using horizontal or vertical scaling. Anyone who can access the API Server can effectively control the Kubernetes architecture. Using authenticity protection, the communication can be protected against man-in-the-middle attacks/session hijacking and the insertion of false information into sessions. The communication session is protected by utilizing transport encryption protocols, such as TLS. TLS provides the Kubernetes API Server with a means to be able to authenticate sessions and encrypt traffic. To enable encrypted communication for API Server, the parameter etcd-cafile must be set. This parameter gives the location of the SSL Certificate Authority file used to secure API Server communication.
Fix: F-45655r863855_fix

Edit the Kubernetes API Server manifest file in the /etc/kubernetes/manifests directory on the Kubernetes Control Plane. Set the value of tls-cert-file and tls-private-key-file to path containing Approved Organizational Certificate.

b
Kubernetes etcd must enable client authentication to secure service.
RMF Control
SC-23
Severity
Medium
CCI
CCI-001184
Version
CNTR-K8-001450
Vuln IDs
V-242423
Rule IDs
SV-242423r879636_rule
Kubernetes container and pod configuration are maintained by Kubelet. Kubelet agents register nodes with the API Server, mount volume storage, and perform health checks for containers and pods. Anyone who gains access to Kubelet agents can effectively control applications within the pods and containers. Using authenticity protection, the communication can be protected against man-in-the-middle attacks/session hijacking and the insertion of false information into sessions. The communication session is protected by utilizing transport encryption protocols, such as TLS. TLS provides the Kubernetes API Server with a means to be able to authenticate sessions and encrypt traffic. To enable encrypted communication for Kubelet, the parameter client-cert-auth must be set. This parameter gives the location of the SSL Certificate Authority file used to secure Kubelet communication.
Fix: F-45656r863858_fix

Edit the Kubernetes etcd manifest file in the /etc/kubernetes/manifests directory on the Kubernetes Control Plane. Set the value of "--client-cert-auth" to "true" for the etcd.

b
Kubernetes Kubelet must enable tlsPrivateKeyFile for client authentication to secure service.
RMF Control
SC-23
Severity
Medium
CCI
CCI-001184
Version
CNTR-K8-001460
Vuln IDs
V-242424
Rule IDs
SV-242424r918182_rule
Kubernetes container and pod configuration are maintained by Kubelet. Kubelet agents register nodes with the API Server, mount volume storage, and perform health checks for containers and pods. Anyone who gains access to Kubelet agents can effectively control applications within the pods and containers. Using authenticity protection, the communication can be protected against man-in-the-middle attacks/session hijacking and the insertion of false information into sessions. The communication session is protected by utilizing transport encryption protocols such as TLS. TLS provides the Kubernetes API Server with a means to authenticate sessions and encrypt traffic. To enable encrypted communication for Kubelet, the tlsPrivateKeyFile must be set. This parameter gives the location of the SSL Certificate Authority file used to secure Kubelet communication.
Fix: F-45657r918181_fix

On the Control Plane, run the command: ps -ef | grep kubelet Remove the "--tls-private-key-file" option if present. Note the path to the config file (identified by --config). Edit the Kubernetes Kubelet config file: Set "tlsPrivateKeyFile" to a path containing the appropriate private key. Restart the kubelet service using the following command: systemctl daemon-reload && systemctl restart kubelet

b
Kubernetes Kubelet must enable tlsCertFile for client authentication to secure service.
RMF Control
SC-23
Severity
Medium
CCI
CCI-001184
Version
CNTR-K8-001470
Vuln IDs
V-242425
Rule IDs
SV-242425r918185_rule
Kubernetes container and pod configuration are maintained by Kubelet. Kubelet agents register nodes with the API Server, mount volume storage, and perform health checks for containers and pods. Anyone who gains access to Kubelet agents can effectively control applications within the pods and containers. Using authenticity protection, the communication can be protected against man-in-the-middle attacks/session hijacking and the insertion of false information into sessions. The communication session is protected by utilizing transport encryption protocols such as TLS. TLS provides the Kubernetes API Server with a means to authenticate sessions and encrypt traffic. To enable encrypted communication for Kubelet, the parameter tlsCertFile must be set. This parameter gives the location of the SSL Certificate Authority file used to secure Kubelet communication.
Fix: F-45658r918184_fix

On the Control Plane, run the command: ps -ef | grep kubelet Remove the "--tls-cert-file" option if present. Note the path to the config file (identified by --config). Edit the Kubernetes Kubelet config file: Set "tlsCertFile" to a path containing an Approved Organization Certificate. Restart the kubelet service using the following command: systemctl daemon-reload && systemctl restart kubelet

b
Kubernetes etcd must enable client authentication to secure service.
RMF Control
SC-23
Severity
Medium
CCI
CCI-001184
Version
CNTR-K8-001480
Vuln IDs
V-242426
Rule IDs
SV-242426r927252_rule
Kubernetes container and pod configuration are maintained by Kubelet. Kubelet agents register nodes with the API Server, mount volume storage, and perform health checks for containers and pods. Anyone who gains access to Kubelet agents can effectively control applications within the pods and containers. Using authenticity protection, the communication can be protected against man-in-the-middle attacks/session hijacking and the insertion of false information into sessions. The communication session is protected by utilizing transport encryption protocols, such as TLS. TLS provides the Kubernetes API Server with a means to be able to authenticate sessions and encrypt traffic. 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 and should be accessible only by authenticated etcd peers in the etcd cluster. The parameter "--peer-client-cert-auth" must be set for etcd to check all incoming peer requests from the cluster for valid client certificates.
Fix: F-45659r927111_fix

Edit the Kubernetes etcd manifest file in the /etc/kubernetes/manifests directory on the Kubernetes Control Plane. Set the value of "--peer-client-cert-auth" to "true" for the etcd.

b
Kubernetes etcd must have a key file for secure communication.
RMF Control
SC-23
Severity
Medium
CCI
CCI-001184
Version
CNTR-K8-001490
Vuln IDs
V-242427
Rule IDs
SV-242427r879636_rule
Kubernetes stores configuration and state information in a distributed key-value store called etcd. Anyone who can write to etcd can effectively control the Kubernetes cluster. Even just reading the contents of etcd could easily provide helpful hints to a would-be attacker. Using authenticity protection, the communication can be protected against man-in-the-middle attacks/session hijacking and the insertion of false information into sessions. The communication session is protected by utilizing transport encryption protocols, such as TLS. TLS provides the Kubernetes API Server and etcd with a means to be able to authenticate sessions and encrypt traffic. To enable encrypted communication for etcd, the parameter key-file must be set. This parameter gives the location of the key file used to secure etcd communication.
Fix: F-45660r863870_fix

Edit the Kubernetes etcd manifest file in the /etc/kubernetes/manifests directory on the Kubernetes Control Plane. Set the value of "--key-file" to the Approved Organizational Certificate.

b
Kubernetes etcd must have a certificate for communication.
RMF Control
SC-23
Severity
Medium
CCI
CCI-001184
Version
CNTR-K8-001500
Vuln IDs
V-242428
Rule IDs
SV-242428r879636_rule
Kubernetes stores configuration and state information in a distributed key-value store called etcd. Anyone who can write to etcd can effectively control a Kubernetes cluster. Even just reading the contents of etcd could easily provide helpful hints to a would-be attacker. Using authenticity protection, the communication can be protected against man-in-the-middle attacks/session hijacking and the insertion of false information into sessions. The communication session is protected by utilizing transport encryption protocols, such as TLS. TLS provides the Kubernetes API Server and etcd with a means to be able to authenticate sessions and encrypt traffic. To enable encrypted communication for etcd, the parameter cert-file must be set. This parameter gives the location of the SSL certification file used to secure etcd communication.
Fix: F-45661r863873_fix

Edit the Kubernetes etcd manifest file in the /etc/kubernetes/manifests directory on the Kubernetes Control Plane. Set the value of "--cert-file" to the Approved Organizational Certificate.

b
Kubernetes etcd must have the SSL Certificate Authority set.
RMF Control
SC-23
Severity
Medium
CCI
CCI-001184
Version
CNTR-K8-001510
Vuln IDs
V-242429
Rule IDs
SV-242429r927253_rule
Kubernetes stores configuration and state information in a distributed key-value store called etcd. Anyone who can write to etcd can effectively control a Kubernetes cluster. Even just reading the contents of etcd could easily provide helpful hints to a would-be attacker. Using authenticity protection, the communication can be protected against man-in-the-middle attacks/session hijacking and the insertion of false information into sessions. The communication session is protected by utilizing transport encryption protocols, such as TLS. TLS provides the Kubernetes API Server and etcd with a means to be able to authenticate sessions and encrypt traffic. To enable encrypted communication for etcd, the parameter "--etcd-cafile" must be set. This parameter gives the location of the SSL Certificate Authority file used to secure etcd communication.
Fix: F-45662r927114_fix

Edit the Kubernetes API Server manifest file in the /etc/kubernetes/manifests directory on the Kubernetes Control Plane. Set the value of "--etcd-cafile" to the Certificate Authority for etcd.

b
Kubernetes etcd must have a certificate for communication.
RMF Control
SC-23
Severity
Medium
CCI
CCI-001184
Version
CNTR-K8-001520
Vuln IDs
V-242430
Rule IDs
SV-242430r927254_rule
Kubernetes stores configuration and state information in a distributed key-value store called etcd. Anyone who can write to etcd can effectively control the Kubernetes cluster. Even just reading the contents of etcd could easily provide helpful hints to a would-be attacker. Using authenticity protection, the communication can be protected against man-in-the-middle attacks/session hijacking and the insertion of false information into sessions. The communication session is protected by utilizing transport encryption protocols, such as TLS. TLS provides the Kubernetes API Server and etcd with a means to be able to authenticate sessions and encrypt traffic. To enable encrypted communication for etcd, the parameter "--etcd-certfile" must be set. This parameter gives the location of the SSL certification file used to secure etcd communication.
Fix: F-45663r927117_fix

Edit the Kubernetes API Server manifest file in the /etc/kubernetes/manifests directory on the Kubernetes Control Plane. Set the value of "--etcd-certfile" to the certificate to be used for communication with etcd.

b
Kubernetes etcd must have a key file for secure communication.
RMF Control
SC-23
Severity
Medium
CCI
CCI-001184
Version
CNTR-K8-001530
Vuln IDs
V-242431
Rule IDs
SV-242431r927255_rule
Kubernetes stores configuration and state information in a distributed key-value store called etcd. Anyone who can write to etcd can effectively control a Kubernetes cluster. Even just reading the contents of etcd could easily provide helpful hints to a would-be attacker. Using authenticity protection, the communication can be protected against man-in-the-middle attacks/session hijacking and the insertion of false information into sessions. The communication session is protected by utilizing transport encryption protocols, such as TLS. TLS provides the Kubernetes API Server and etcd with a means to be able to authenticate sessions and encrypt traffic. To enable encrypted communication for etcd, the parameter "--etcd-keyfile" must be set. This parameter gives the location of the key file used to secure etcd communication.
Fix: F-45664r927120_fix

Edit the Kubernetes API Server manifest file in the /etc/kubernetes/manifests directory on the Kubernetes Control Plane. Set the value of "--etcd-keyfile" to the certificate to be used for communication with etcd.

b
Kubernetes etcd must have peer-cert-file set for secure communication.
RMF Control
SC-23
Severity
Medium
CCI
CCI-001184
Version
CNTR-K8-001540
Vuln IDs
V-242432
Rule IDs
SV-242432r879636_rule
Kubernetes stores configuration and state information in a distributed key-value store called etcd. Anyone who can write to etcd can effectively control the Kubernetes cluster. Even just reading the contents of etcd could easily provide helpful hints to a would-be attacker. Using authenticity protection, the communication can be protected against man-in-the-middle attacks/session hijacking and the insertion of false information into sessions. The communication session is protected by utilizing transport encryption protocols, such as TLS. TLS provides the Kubernetes API Server and etcd with a means to be able to authenticate sessions and encrypt traffic. To enable encrypted communication for etcd, the parameter peer-cert-file must be set. This parameter gives the location of the SSL certification file used to secure etcd communication.
Fix: F-45665r863885_fix

Edit the Kubernetes etcd manifest file in the /etc/kubernetes/manifests directory on the Kubernetes Control Plane. Set the value of "--peer-cert-file" to the certificate to be used for communication with etcd.

b
Kubernetes etcd must have a peer-key-file set for secure communication.
RMF Control
SC-23
Severity
Medium
CCI
CCI-001184
Version
CNTR-K8-001550
Vuln IDs
V-242433
Rule IDs
SV-242433r879636_rule
Kubernetes stores configuration and state information in a distributed key-value store called etcd. Anyone who can write to etcd can effectively control a Kubernetes cluster. Even just reading the contents of etcd could easily provide helpful hints to a would-be attacker. Using authenticity protection, the communication can be protected against man-in-the-middle attacks/session hijacking and the insertion of false information into sessions. The communication session is protected by utilizing transport encryption protocols, such as TLS. TLS provides the Kubernetes API Server and etcd with a means to be able to authenticate sessions and encrypt traffic. To enable encrypted communication for etcd, the parameter peer-key-file must be set. This parameter gives the location of the SSL certification file used to secure etcd communication.
Fix: F-45666r863888_fix

Edit the Kubernetes etcd manifest file in the /etc/kubernetes/manifests directory on the Kubernetes Control Plane. Set the value of "--peer-key-file" to the certificate to be used for communication with etcd.

c
Kubernetes Kubelet must enable kernel protection.
RMF Control
SC-3
Severity
High
CCI
CCI-001084
Version
CNTR-K8-001620
Vuln IDs
V-242434
Rule IDs
SV-242434r918188_rule
System kernel is responsible for memory, disk, and task management. The kernel provides a gateway between the system hardware and software. Kubernetes requires kernel access to allocate resources to the Control Plane. Threat actors that penetrate the system kernel can inject malicious code or hijack the Kubernetes architecture. It is vital to implement protections through Kubernetes components to reduce the attack surface.
Fix: F-45667r918187_fix

On the Control Plane, run the command: ps -ef | grep kubelet Remove the "--protect-kernel-defaults" option if present. Note the path to the Kubernetes Kubelet config file (identified by --config). Edit the Kubernetes Kubelet config file: Set "protectKernelDefaults" to "true". Restart the kubelet service using the following command: systemctl daemon-reload && systemctl restart kubelet

b
Kubernetes API Server must configure timeouts to limit attack surface.
RMF Control
SC-7
Severity
Medium
CCI
CCI-002415
Version
CNTR-K8-002600
Vuln IDs
V-242438
Rule IDs
SV-242438r927258_rule
Kubernetes API Server request timeouts sets the duration a request stays open before timing out. Since the API Server is the central component in the Kubernetes Control Plane, it is vital to protect this service. If request timeouts were not set, malicious attacks or unwanted activities might affect multiple deployments across different applications or environments. This might deplete all resources from the Kubernetes infrastructure causing the information system to go offline. The "--request-timeout" value must never be set to "0". This disables the request-timeout feature. (By default, the "--request-timeout" is set to "1 minute".)
Fix: F-45671r927127_fix

Edit the Kubernetes API Server manifest file in the /etc/kubernetes/manifests directory on the Kubernetes Control Plane. Set the value of "--request-timeout" greater than "0".

b
The Kubernetes component manifests must be owned by root.
RMF Control
CM-6
Severity
Medium
CCI
CCI-000366
Version
CNTR-K8-003110
Vuln IDs
V-242444
Rule IDs
SV-242444r879887_rule
The Kubernetes manifests are those files that contain the arguments and settings for the Control Plane services. These services are etcd, the api server, controller, proxy, and scheduler. If these files can be changed, the scheduler will be implementing the changes immediately. Many of the security settings within the document are implemented through these manifests.
Fix: F-45677r712687_fix

Change the ownership of the manifest files to root: root by executing the command: chown root:root /etc/kubernetes/manifests/*

b
The Kubernetes component etcd must be owned by etcd.
RMF Control
CM-6
Severity
Medium
CCI
CCI-000366
Version
CNTR-K8-003120
Vuln IDs
V-242445
Rule IDs
SV-242445r879887_rule
The Kubernetes etcd key-value store provides a way to store data to the Control Plane. If these files can be changed, data to API object and the Control Plane would be compromised. The scheduler will implement the changes immediately. Many of the security settings within the document are implemented through this file.
Fix: F-45678r712690_fix

Change the ownership of the manifest files to etcd:etcd by executing the command: chown etcd:etcd /var/lib/etcd/*

b
The Kubernetes conf files must be owned by root.
RMF Control
CM-6
Severity
Medium
CCI
CCI-000366
Version
CNTR-K8-003130
Vuln IDs
V-242446
Rule IDs
SV-242446r879887_rule
The Kubernetes conf files contain the arguments and settings for the Control Plane services. These services are controller and scheduler. If these files can be changed, the scheduler will be implementing the changes immediately. Many of the security settings within the document are implemented through this file.
Fix: F-45679r712693_fix

Change the ownership of the conf files to root: root by executing the command: chown root:root /etc/kubernetes/admin.conf chown root:root /etc/kubernetes/scheduler.conf chown root:root /etc/kubernetes/controller-manager.conf

b
The Kubernetes Kubelet certificate authority file must have file permissions set to 644 or more restrictive.
RMF Control
CM-6
Severity
Medium
CCI
CCI-000366
Version
CNTR-K8-003160
Vuln IDs
V-242449
Rule IDs
SV-242449r919324_rule
The Kubernetes kubelet certificate authority file contains settings for the Kubernetes Node TLS certificate authority. Any request presenting a client certificate signed by one of the authorities in the client-ca-file is authenticated with an identity corresponding to the CommonName of the client certificate. If this file can be changed, the Kubernetes architecture could be compromised. The scheduler will implement the changes immediately. Many of the security settings within the document are implemented through this file.
Fix: F-45682r919324_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: chmod 644 <path_to_client_ca_file>

b
The Kubernetes Kubelet certificate authority must be owned by root.
RMF Control
CM-6
Severity
Medium
CCI
CCI-000366
Version
CNTR-K8-003170
Vuln IDs
V-242450
Rule IDs
SV-242450r918196_rule
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.
Fix: F-45683r918195_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>

b
The Kubernetes component PKI must be owned by root.
RMF Control
CM-6
Severity
Medium
CCI
CCI-000366
Version
CNTR-K8-003180
Vuln IDs
V-242451
Rule IDs
SV-242451r879887_rule
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. Many of the security settings within the document are implemented through this file.
Fix: F-45684r712708_fix

Change the ownership of the PKI to root: root by executing the command: chown -R root:root /etc/kubernetes/pki/

b
The Kubernetes kubelet KubeConfig must have file permissions set to 644 or more restrictive.
RMF Control
CM-6
Severity
Medium
CCI
CCI-000366
Version
CNTR-K8-003190
Vuln IDs
V-242452
Rule IDs
SV-242452r918197_rule
The Kubernetes kubelet agent registers nodes with the API Server, mounts volume storage for pods, and performs health checks to containers within pods. If these files can be modified, the information system would be unaware of pod or container degradation. Many of the security settings within the document are implemented through this file.
Fix: F-45685r821615_fix

Change the permissions of the Kubelet to "644" by executing the command: chmod 644 /etc/kubernetes/kubelet.conf

b
The Kubernetes kubelet KubeConfig file must be owned by root.
RMF Control
CM-6
Severity
Medium
CCI
CCI-000366
Version
CNTR-K8-003200
Vuln IDs
V-242453
Rule IDs
SV-242453r918204_rule
The Kubernetes kubelet agent registers nodes with the API server and performs health checks to containers within pods. If these files can be modified, the information system would be unaware of pod or container degradation. Many of the security settings within the document are implemented through this file.
Fix: F-45686r712714_fix

Change the ownership of the kubelet.conf to root: root by executing the command: chown root:root /etc/kubernetes/kubelet.conf

b
The Kubernetes kubelet config must have file permissions set to 644 or more restrictive.
RMF Control
CM-6
Severity
Medium
CCI
CCI-000366
Version
CNTR-K8-003230
Vuln IDs
V-242456
Rule IDs
SV-242456r879887_rule
The Kubernetes kubelet agent registers nodes with the API server and performs health checks to containers within pods. If this file can be modified, the information system would be unaware of pod or container degradation.
Fix: F-45689r821617_fix

Change the permissions of the config.yaml to "644" by executing the command: chmod 644 /var/lib/kubelet/config.yaml

b
The Kubernetes kubelet config must be owned by root.
RMF Control
CM-6
Severity
Medium
CCI
CCI-000366
Version
CNTR-K8-003240
Vuln IDs
V-242457
Rule IDs
SV-242457r879887_rule
The Kubernetes kubelet agent registers nodes with the API Server and performs health checks to containers within pods. If this file can be modified, the information system would be unaware of pod or container degradation.
Fix: F-45690r712726_fix

Change the ownership of the kubelet config to "root: root" by executing the command: chown root:root /var/lib/kubelet/config.yaml

b
The Kubernetes etcd must have file permissions set to 644 or more restrictive.
RMF Control
CM-6
Severity
Medium
CCI
CCI-000366
Version
CNTR-K8-003260
Vuln IDs
V-242459
Rule IDs
SV-242459r918200_rule
The Kubernetes etcd key-value store provides a way to store data to the Control Plane. If these files can be changed, data to API object and Control Plane would be compromised.
Fix: F-45692r918199_fix

Change the permissions of the manifest files to "644" by executing the command: chmod -R 644 /var/lib/etcd/*

b
The Kubernetes admin kubeconfig must have file permissions set to 644 or more restrictive.
RMF Control
CM-6
Severity
Medium
CCI
CCI-000366
Version
CNTR-K8-003270
Vuln IDs
V-242460
Rule IDs
SV-242460r927262_rule
The Kubernetes admin kubeconfig files contain the arguments and settings for the Control Plane services. These services are controller and scheduler. If these files can be changed, the scheduler will be implementing the changes immediately.
Fix: F-45693r712735_fix

Change the permissions of the conf files to "644" by executing the command: chmod 644 /etc/kubernetes/admin.conf chmod 644 /etc/kubernetes/scheduler.conf chmod 644 /etc/kubernetes/controller-manager.conf

b
Kubernetes API Server audit logs must be enabled.
RMF Control
CM-6
Severity
Medium
CCI
CCI-000366
Version
CNTR-K8-003280
Vuln IDs
V-242461
Rule IDs
SV-242461r879887_rule
Kubernetes API Server validates and configures pods and services for the API object. The REST operation provides frontend functionality to the cluster share state. Enabling audit logs provides a way to monitor and identify security risk events or misuse of information. Audit logs are necessary to provide evidence in the case the Kubernetes API Server is compromised requiring a Cyber Security Investigation.
Fix: F-45694r863923_fix

Edit the Kubernetes API Server manifest file in the /etc/kubernetes/manifests directory on the Kubernetes Control Plane. Set the argument "--audit-policy-file" to "log file directory".

b
The Kubernetes API Server must be set to audit log max size.
RMF Control
CM-6
Severity
Medium
CCI
CCI-000366
Version
CNTR-K8-003290
Vuln IDs
V-242462
Rule IDs
SV-242462r927263_rule
The Kubernetes API Server must be set for enough storage to retain log information over the period required. When audit logs are large in size, the monitoring service for events becomes degraded. The function of the maximum log file size is to set these limits.
Fix: F-45695r927136_fix

Edit the Kubernetes API Server manifest file in the /etc/kubernetes/manifests directory on the Kubernetes Control Plane. Set the value of "--audit-log-maxsize" to a minimum of "100".

b
The Kubernetes API Server must be set to audit log maximum backup.
RMF Control
CM-6
Severity
Medium
CCI
CCI-000366
Version
CNTR-K8-003300
Vuln IDs
V-242463
Rule IDs
SV-242463r879887_rule
The Kubernetes API Server must set enough storage to retain logs for monitoring suspicious activity and system misconfiguration, and provide evidence for Cyber Security Investigations.
Fix: F-45696r863929_fix

Edit the Kubernetes API Server manifest file in the /etc/kubernetes/manifests directory on the Kubernetes Control Plane. Set the value of "--audit-log-maxbackup" to a minimum of "10".

b
The Kubernetes API Server audit log retention must be set.
RMF Control
CM-6
Severity
Medium
CCI
CCI-000366
Version
CNTR-K8-003310
Vuln IDs
V-242464
Rule IDs
SV-242464r879887_rule
The Kubernetes API Server must set enough storage to retain logs for monitoring suspicious activity and system misconfiguration, and provide evidence for Cyber Security Investigations.
Fix: F-45697r863932_fix

Edit the Kubernetes API Server manifest file in the /etc/kubernetes/manifests directory on the Kubernetes Control Plane. Set the value of "--audit-log-maxage" to a minimum of "30".

b
The Kubernetes API Server audit log path must be set.
RMF Control
CM-6
Severity
Medium
CCI
CCI-000366
Version
CNTR-K8-003320
Vuln IDs
V-242465
Rule IDs
SV-242465r879887_rule
Kubernetes API Server validates and configures pods and services for the API object. The REST operation provides frontend functionality to the cluster share state. Audit logs are necessary to provide evidence in the case the Kubernetes API Server is compromised requiring Cyber Security Investigation. To record events in the audit log the log path value must be set.
Fix: F-45698r863935_fix

Edit the Kubernetes API Server manifest file in the /etc/kubernetes/manifests directory on the Kubernetes Control Plane. Set the value of "--audit-log-path" to valid location.

b
The Kubernetes PKI CRT must have file permissions set to 644 or more restrictive.
RMF Control
CM-6
Severity
Medium
CCI
CCI-000366
Version
CNTR-K8-003330
Vuln IDs
V-242466
Rule IDs
SV-242466r927264_rule
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.
Fix: F-45699r918202_fix

Change the ownership of the cert files to "644" by executing the command: find /etc/kubernetes/pki -name "*.crt" | xargs chmod 644

b
Kubernetes Kubelet must not disable timeouts.
RMF Control
SC-10
Severity
Medium
CCI
CCI-001133
Version
CNTR-K8-001300
Vuln IDs
V-245541
Rule IDs
SV-245541r918210_rule
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).
Fix: F-48771r918209_fix

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

c
Kubernetes API Server must disable basic authentication to protect information in transit.
RMF Control
SC-12
Severity
High
CCI
CCI-002448
Version
CNTR-K8-002620
Vuln IDs
V-245542
Rule IDs
SV-245542r918141_rule
Kubernetes basic authentication sends and receives request containing username, uid, groups, and other fields over a clear text HTTP communication. Basic authentication does not provide any security mechanisms using encryption standards. PKI certificate-based authentication must be set over a secure channel to ensure confidentiality and integrity. Basic authentication must not be set in the manifest file.
Fix: F-48772r863944_fix

Edit the Kubernetes API Server manifest file in the /etc/kubernetes/manifests directory on the Kubernetes Control Plane. Remove the setting "--basic-auth-file".

c
Kubernetes API Server must disable token authentication to protect information in transit.
RMF Control
SC-12
Severity
High
CCI
CCI-002448
Version
CNTR-K8-002630
Vuln IDs
V-245543
Rule IDs
SV-245543r927259_rule
Kubernetes token authentication uses password known as secrets in a plaintext file. This file contains sensitive information such as token, username and user uid. This token is used by service accounts within pods to authenticate with the API Server. This information is very valuable for attackers with malicious intent if the service account is privileged having access to the token. With this token a threat actor can impersonate the service account gaining access to the Rest API service.
Fix: F-48773r927130_fix

Edit the Kubernetes API Server manifest file in the /etc/kubernetes/manifests directory on the Kubernetes Control Plane. Remove the setting "--token-auth-file".

c
Kubernetes endpoints must use approved organizational certificate and key pair to protect information in transit.
RMF Control
SC-12
Severity
High
CCI
CCI-002448
Version
CNTR-K8-002640
Vuln IDs
V-245544
Rule IDs
SV-245544r918217_rule
Kubernetes control plane and external communication is managed by API Server. The main implementation of the API Server is to manage hardware resources for pods and container using horizontal or vertical scaling. Anyone who can gain access to the API Server can effectively control your Kubernetes architecture. Using authenticity protection, the communication can be protected against man-in-the-middle attacks/session hijacking and the insertion of false information into sessions. The communication session is protected by utilizing transport encryption protocols, such as TLS. TLS provides the Kubernetes API Server with a means to be able to authenticate sessions and encrypt traffic. By default, the API Server does not authenticate to the kubelet HTTPs endpoint. To enable secure communication for API Server, the parameter -kubelet-client-certificate and kubelet-client-key must be set. This parameter gives the location of the certificate and key pair used to secure API Server communication.
Fix: F-48774r863950_fix

Edit the Kubernetes API Server manifest file in the /etc/kubernetes/manifests directory on the Kubernetes Control Plane. Set the value of "--kubelet-client-certificate" and "--kubelet-client-key" to an Approved Organizational Certificate and key pair.