| name | cis-ocp-v160-1.2.28 |
| description | Ensure that the --tls-cert-file and --tls-private-key-file arguments are set as appropriate (Manual) |
| category | cis-openshift |
| version | 1.6.0 |
| author | cyberstrike-official |
| tags | ["cis","openshift","kubernetes","redhat","control-plane","api-server","tls-cert"] |
| cis_id | 1.2.28 |
| cis_benchmark | CIS Red Hat OpenShift Container Platform Benchmark v1.6.0 |
| tech_stack | ["kubernetes","openshift","redhat"] |
| cwe_ids | [] |
| chains_with | [] |
| prerequisites | [] |
| severity_boost | {} |
CIS Red Hat OpenShift Container Platform Benchmark v1.6.0 - Control 1.2.28
Profile Applicability
Description
Setup TLS connection on the API server.
Rationale
API server communication contains sensitive parameters that should remain encrypted in transit. Configure the API server to serve only HTTPS traffic.
Impact
TLS and client certificate authentication must be configured for your Kubernetes cluster deployment. By default, OpenShift uses X.509 certificates to provide secure connections between the API server and node/kubelet. OpenShift Container Platform monitors certificates for proper validity, for the cluster certificates it issues and manages. The OpenShift Container Platform manages certificate rotation and the alerting framework has rules to help identify when a certificate issue is about to occur.
Audit Procedure
OpenShift uses X.509 certificates to provide secure connections between API server and node/kubelet by default. OpenShift does not use values assigned to the tls-cert-file or tls-private-key-file flags. OpenShift generates the certificate files and sets the arguments appropriately.
The API server is accessible by clients external to the cluster at api.<cluster_name>.<base_domain>. The administrator must set a custom default certificate to be used by the API server when serving content in order to enable clients to access the API server at a different host name or without the need to distribute the cluster-managed certificate authority (CA) certificates to the clients.
Run the following command to obtain the API server TLS certificate file:
oc get configmap config -n openshift-kube-apiserver -ojson | jq -r '.data["config.yaml"]' | jq -r '.apiServerArguments."tls-cert-file"[]'
Verify the output is /etc/kubernetes/static-pod-certs/secrets/service-network-serving-certkey/tls.crt.
Run the following command to obtain the API server TLS private key file:
oc get configmap config -n openshift-kube-apiserver -ojson | jq -r '.data["config.yaml"]' | jq -r '.apiServerArguments."tls-private-key-file"[]'
Verify the output is /etc/kubernetes/static-pod-certs/secrets/service-network-serving-certkey/tls.key.
Remediation
None.
Default Value
By default, OpenShift uses X.509 certificates to provide secure connections between the API server and node/kubelet. OpenShift does not use values assigned to or flags.