Skip to main content

More Info:

Bootstrap tokens are meant for node bootstrapping, not user authentication, and are weak for that purpose. Use OIDC instead.

Risk Level

High

Address

Security

Compliance Standards

  • CIS Kubernetes

Triage and Remediation

Remediation

Manual Steps

  1. Identify any configured bootstrap tokens
    • On every control plane node, list all bootstrap tokens:
    • If this returns one or more tokens, note their TOKEN, TTL, and USAGES fields.
  2. Determine whether tokens are used for user authentication
    • On any machine with kubectl access, list known cluster users/contexts and look for bootstrap tokens in kubeconfigs (they appear as token: <id>.<secret> in user entries):
    • If any kubeconfig used by human users (e.g., developer/admin configs, CI systems) contains a bootstrap-style token ([a-z0-9]{6}\.[a-z0-9]{16}), record where it is used and by whom.
  3. Review RBAC bindings for bootstrap tokens
    • On any machine with kubectl access, check for ClusterRoleBindings/RoleBindings referencing bootstrap token groups (e.g. system:bootstrappers, system:node-bootstrapper):
    • If these bindings are used to grant access to human users (e.g., tied to accounts that are not nodes), note the bindings for remediation.
  4. Decide and implement preferred user authentication (e.g. OIDC)
    • On every control plane node, inspect the API server manifest for OIDC configuration:
    • If OIDC (or another strong auth method) is not configured for user access, design and configure it according to your organization’s identity provider, then add the appropriate --oidc-* flags under the kube-apiserver container command: section in /etc/kubernetes/manifests/kube-apiserver.yaml. Saving this file will restart the API server.
  5. Remove or restrict bootstrap token use to node bootstrapping only
    • On any machine with kubectl access, remove any kubeconfigs used by humans that contain bootstrap tokens or replace them with OIDC / appropriate credentials.
    • On any control plane node, revoke unneeded tokens so they cannot be reused:
    • Adjust or delete any RBAC bindings from step 3 that grant non-node access through bootstrap token groups.
  6. Verify that bootstrap tokens are not used for user authentication
    • Confirm remaining tokens (if any) are limited to node bootstrapping, with tightly scoped RBAC and short TTLs:
    • On any machine with kubectl access, re-scan kubeconfigs for bootstrap-style tokens and ensure none are in use by human users:
    • Verify users can authenticate via OIDC (or chosen mechanism) and that no operational workflows depend on bootstrap tokens.
kubectl cannot remediate this finding because bootstrap token authentication is configured in the kube-apiserver static pod manifest on each control plane node at /etc/kubernetes/manifests/kube-apiserver.yaml. To address it, review and update that file directly on the control plane nodes as described in the Manual Steps section.