Skip to content
Skillv1.0.0

cis-ocp-v190-1.2.27

Ensure that the --client-ca-file argument is set as appropriate (Manual)

by CyberStrikeus(0) 0 installs
Free
Sign in to install

Free account. Installing gives you the manifest plus copy-paste snippets.

See reviews

About

Imported from CyberStrikeus/CyberStrike (.cyberstrike/skill/CIS_benchmarks/Server_Software/Kubernetes/cis-red-hat-openshift-container-52aa10/cis-ocp-v190-1.2.27/SKILL.md). Install upstream with npx skills add CyberStrikeus/CyberStrike --skill cis-ocp-v190-1.2.27. Copyright stays with the author.

CIS Red Hat OpenShift Container Platform Benchmark v1.9.0 - Control 1.2.27

Profile Applicability

  • Level: 1

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. If --client-ca-file argument is set, 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.

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 alerting framework has rules to help identify when a certificate issue is about to occur. These rules consist of the following checks:

  • API server client certificate expiration is less than five minutes.

Audit Procedure

OpenShift uses X.509 certificates to provide secure connections between API server and node/kubelet by default. OpenShift configures the client-ca-file value and does not use value assigned to the client-ca-file flag. OpenShift generates the necessary 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:

oc get configmap config -n openshift-kube-apiserver -ojson | \
  jq -r '.data["config.yaml"]' | \
  jq -r .servingInfo.clientCA

For version 4.10+:

oc get configmap config -n openshift-kube-apiserver -o json | jq -r '.data["config.yaml"]' | jq -r '.apiServerArguments."client-ca-file"'

Verify that the following file exists.

/etc/kubernetes/static-pod-certs/configmaps/client-ca/ca-bundle.crt

Remediation

None.

Default Value

By default, OpenShift configures the client-ca-file and automatically manages the certificate. It does not use the value assigned to the client-ca-file flag.

You may optionally 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.

Please follow the OpenShift documentation for providing certificates for OpenShift to use.

References

  1. https://docs.openshift.com/container-platform/latest/security/certificate_types_descriptions/user-provided-certificates-for-api-server.html
  2. https://kubernetes.io/docs/reference/command-line-tools-reference/kube-apiserver/
  3. https://rootsquash.com/2016/05/10/securing-the-kubernetes-api/
  4. https://github.com/kelseyhightower/docker-kubernetes-tls-guide

CIS Controls

Controls Version Control IG 1 IG 2 IG 3
v8 3.10 Encrypt Sensitive Data in Transit * *
v7 14.4 Encrypt All Sensitive Information in Transit * *

MITRE ATT&CK Mappings

Techniques / Sub-techniques Tactics Mitigations
T1552 TA0006 M1022

Profile

Level 1 (Manual)

Use it

Copy one of these into your project. Installing also returns the manifest and these snippets.

yaml
targets:
  - https://api.opensmartroute.ai/api/v1/registry/cyberstrikeus-cyberstrike-cis-ocp-v190-1-2-27/manifest   # or paste the manifest below

Manifest

An Open Capability Manifest: the router reads it to know what this does, what it costs and when to pick it.

cyberstrikeus-cyberstrike-cis-ocp-v190-1-2-27.ocm.jsonjson
{
  "ocm": "1",
  "id": "cyberstrikeus-cyberstrike-cis-ocp-v190-1-2-27",
  "kind": "skill",
  "name": "cis-ocp-v190-1.2.27",
  "description": "Ensure that the --client-ca-file argument is set as appropriate (Manual)",
  "publisher": "CyberStrikeus",
  "version": "1.0.0",
  "capabilities": {
    "domains": [
      "general"
    ],
    "tags": [
      "skill-md",
      "cis",
      "openshift",
      "kubernetes",
      "redhat",
      "control-plane",
      "api-server",
      "tls",
      "client-ca",
      "certificates"
    ],
    "languages": [
      "en"
    ]
  },
  "quality_prior": 0.6,
  "examples": [
    "Ensure that the --client-ca-file argument is set as appropriate (Manual)"
  ],
  "primary": false,
  "metadata": {
    "source": {
      "provider": "github",
      "repository": "https://github.com/CyberStrikeus/CyberStrike",
      "path": ".cyberstrike/skill/CIS_benchmarks/Server_Software/Kubernetes/cis-red-hat-openshift-container-52aa10/cis-ocp-v190-1.2.27/SKILL.md",
      "ref": "df28ccd3dc6d6c02391169121ee2dcdf4a6a132b",
      "url": "https://github.com/CyberStrikeus/CyberStrike/blob/df28ccd3dc6d6c02391169121ee2dcdf4a6a132b/.cyberstrike/skill/CIS_benchmarks/Server_Software/Kubernetes/cis-red-hat-openshift-container-52aa10/cis-ocp-v190-1.2.27/SKILL.md",
      "key": "CyberStrikeus/CyberStrike/.cyberstrike/skill/CIS_benchmarks/Server_Software/Kubernetes/cis-red-hat-openshift-container-52aa10/cis-ocp-v190-1.2.27/SKILL.md"
    }
  },
  "instructions": "# CIS Red Hat OpenShift Container Platform Benchmark v1.9.0 - Control 1.2.27\n\n## Profile Applicability\n\n- **Level:** 1\n\n## Description\n\nSetup TLS connection on the API server.\n\n## Rationale\n\nAPI server communication contains sensitive parameters that should remain encrypted in transit. Configure the API server to serve only HTTPS traffic. If `--client-ca-file` argument is set, 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.\n\n## Impact\n\nTLS and client",
  "cost": {
    "context_tokens": 980
  }
}

Fetch it by URL: GET /api/v1/registry/cyberstrikeus-cyberstrike-cis-ocp-v190-1-2-27/manifest?version=1.0.0

Reviews

Star ratings from people who tried it. One review per account; edit yours any time.

No reviews yet. Install it, try it, and be the first to rate it.

cis-ocp-v190-1.2.27 - Skill - OpenSmartRoute