Skip to main content

More Info:

Do not use token based authentication.

Risk Level

High

Address

Security

Compliance Standards

  • CIS Kubernetes

Triage and Remediation

Remediation

Manual Steps

  1. On every control plane node, back up the API server manifest before editing:
  2. On every control plane node, inspect the current manifest for any --token-auth-file usage:
  3. On every control plane node, edit the manifest to remove the --token-auth-file=<filename> flag from the kube-apiserver container command or args list:
    In the editor, delete the entire line containing --token-auth-file= (or remove just that entry from the list), then save and exit.
    Note: Saving this file will trigger the kubelet to restart the API server static pod.
  4. Wait for the API server pod to restart and become Running on the local node:
    Ensure there is a recent kube-apiserver container in Running state.
  5. On every control plane node, verify the kube-apiserver process no longer has the --token-auth-file flag:
    Confirm that the command line for the kube-apiserver process does not contain --token-auth-file=.
kubectl cannot modify the kube-apiserver static pod manifest or its process flags, so it cannot be used to remove the --token-auth-file parameter. To address this finding, make the change directly on each control plane node in /etc/kubernetes/manifests/kube-apiserver.yaml as described in the Manual Steps section.

Additional Reading: