Skip to main content

More Info:

Setting streamingConnectionIdleTimeout to 0 disables idle connection timeout for kubectl exec, attach and port-forward sessions, which can be abused for long-lived covert channels. A non-zero value (default 4h) limits exposure.

Risk Level

Medium

Address

Compliance, Security

Compliance Standards

  • CIS OKE

Triage and Remediation

Remediation

Using Console

Below are the console-based steps to remediate this in Oracle Container Engine for Kubernetes (OKE) by setting a non‑zero streamingConnectionIdleTimeout on the kubelet.Goal: Ensure kubelet’s streaming-connection-idle-timeout is not 0 on worker nodes by updating node pool kubelet configuration and then rolling nodes.

1. Confirm which node pool(s) are affected

  1. Sign in to the OCI Console.
  2. Open the navigation menu → Developer ServicesKubernetes Clusters (OKE).
  3. Select your Compartment.
  4. Click the Cluster you’re auditing.
  5. Go to the Node Pools tab and identify the node pool(s) that correspond to the failing nodes.

2. Check if kubelet config is editable for the node pool

  1. Click on the Node Pool name.
  2. Click Edit (top-right).
  3. Scroll to Advanced OptionsKubelet configuration (or similar “Kubelet config / Worker node configuration” area).
    • If you see fields for kubelet parameters, proceed.
    • If not editable (e.g., older pool type), you must create a new node pool with the correct settings (see step 3B).

3A. Edit kubelet config on an existing node pool (if allowed)

  1. In the Edit Node Pool page, under kubelet settings, locate:
    • Streaming Connection Idle Timeout or a similar field (may be expressed as 4h, 1h, etc.).
  2. Set a non-zero value (example: 4h is commonly used):
    • Example value: 4h
    • Any non-zero duration that meets your org’s security baseline is acceptable.
  3. Save the changes (Update Node Pool).
OKE will apply this config to new nodes in the node pool. Existing nodes need to be rotated.

3B. If kubelet config is not editable → create a new node pool

  1. In the cluster’s Node Pools tab, click Create node pool.
  2. Configure:
    • Kubernetes version, shape, subnets, etc., matching the existing node pool as appropriate.
  3. Under Advanced OptionsKubelet configuration:
    • Set Streaming Connection Idle Timeout to a non-zero duration (e.g., 4h).
  4. Click Create.
  5. Wait for the new node pool status to become Active.

4. Rotate/replace nodes so they inherit the new kubelet config

If you edited the existing node pool:
  1. From the Node Pool details page:
    • Either Scale down and back up the node pool, or
    • Terminate nodes one-by-one; new nodes will launch with the updated kubelet settings.
  2. Use kubectl drain (from your workstation) before terminating nodes to avoid workload disruption:
  3. After the new node joins:
If you created a new node pool:
  1. Add the new node pool to the cluster and ensure auto-scaling / replicas are correct.
  2. Cordon and drain nodes in the old node pool and then terminate them.
  3. When workloads are stable on the new pool, you can delete the old node pool.

5. Validate the change

  1. Once new nodes are up, list nodes and pick one:
  2. SSH to the node (if allowed) or use logs/agent, then confirm kubelet arguments include a non-zero timeout, e.g.:
    You should see something like:
  3. Re-run your compliance scan to ensure the check “Kubelet streamingConnectionIdleTimeout Should Not Be 0” now passes.

If you share your OKE version and whether the node pools are managed/virtual nodes, I can give you the exact field names as they appear in your console screen.
For Oracle Container Engine for Kubernetes (OKE), this specific kubelet setting:--streaming-connection-idle-timeoutis not exposed as a configurable parameter via OKE APIs, Terraform, or the OCI CLI on managed node pools as of my latest knowledge (mid‑2024). OKE manages kubelet flags internally, and there is no supported knob in:
  • oci ce cluster ...
  • oci ce node-pool ...
  • Node pool kubeletConfigDetails (which only covers a limited set of kubelet options like maxPodsPerNode, podsPerCore, etc.)
So:
  • You cannot remediate “Kubelet streamingConnectionIdleTimeout should not be 0” via OCI CLI on standard OKE managed node pools.
  • Any workaround would require unsupported modifications inside the node (e.g., editing the kubelet systemd unit or bootstrap scripts via cloud-init/user data), which can be overwritten on upgrade/repair and may be out of support with Oracle.
If you must satisfy this check:
  1. Confirm with OCI/OKE documentation or an Oracle SR whether support for this kubelet flag has been added.
  2. If not supported:
    • Mark this finding as not remediable / accepted risk for OKE managed nodes in your compliance tooling, or
    • Use self-managed Kubernetes on OCI Compute (where you control kubelet flags) instead of OKE for workloads that require strict control over this setting.
There is currently no valid OCI CLI sequence I can provide that will change streamingConnectionIdleTimeout for OKE-managed kubelets.
To remediate this in OCI OKE, you must update your node pool(s) so the kubelet streamingConnectionIdleTimeout is set to a non-zero value (e.g., "4h"). In OKE this is done via the node pool’s kubelet configuration.Below is a concise step‑by‑step guide using the OCI Python SDK.

1. Prerequisites

  • OCI Python SDK installed:
  • OCI config file (~/.oci/config) with a profile that has permissions to manage OKE node pools.
  • Your:
    • compartment_id
    • cluster_id
    • OCI profile name (e.g., DEFAULT)

2. Decide on a non-zero timeout

Pick a valid Kubernetes duration string, e.g.:
  • "1h"
  • "2h"
  • "4h" (commonly used)
  • "30m"
OCI expects it as a string in that format.

3. Python script to update all node pools in a cluster

This script:
  1. Lists all node pools in a cluster.
  2. Updates each node pool’s kubelet config so streaming_connection_idle_timeout is non-zero.

4. Notes

  • After updating, OKE will roll the node pool according to its upgrade/rolling rules; pods may be rescheduled.
  • If you only want to update specific node pools, filter by np.name or np.id instead of iterating over all.