More Info:
Kubernetes provides the option to use client certificates for user authentication. However as there is no way to revoke these certificates when a user leaves an organization or loses their credential, they are not suitable for this purpose. It is not possible to fully disable client certificate use within a cluster as it is used for component to component authentication.Risk Level
LowAddress
SecurityCompliance Standards
- CIS Kubernetes
Triage and Remediation
- Remediation
Remediation
Manual Steps
Manual Steps
-
Identify all client-certificate-based user configs on admin machines (evidence gathering)
- On any machine with kubectl access, search typical kubeconfig locations for client-certificate auth (non-service-account):
- For each kubeconfig found, list users and auth methods:
- Decision: treat any context where
userhasclient-certificate/client-certificate-dataand is used by a human admin/script (not a core control-plane component) as non-compliant.
- On any machine with kubectl access, search typical kubeconfig locations for client-certificate auth (non-service-account):
-
Confirm which client-cert identities have cluster privileges
- On any machine with kubectl access, list ClusterRoleBindings/RoleBindings that reference
Usersubjects (these may be backed by client certs): - For each
Usersubject, note whether that identity corresponds to a client certificate user from kubeconfig. - Decision: if such users are humans or automation that could instead use OIDC or another revocable mechanism, mark them for migration.
- On any machine with kubectl access, list ClusterRoleBindings/RoleBindings that reference
-
Design and enable an alternative auth mechanism (e.g., OIDC) on every control plane node
- On every control plane node, review the current API server flags to see if OIDC (or another centralized identity provider) is already configured:
- If OIDC is not enabled, follow your organization’s identity design to add the appropriate
--oidc-*flags (issuer-url, client-id, etc.) to the kube-apiserver manifest, usually at:
/etc/kubernetes/manifests/kube-apiserver.yaml- Editing this static pod manifest will restart the API server on that node.
- Decision: only proceed once a revocable and centrally managed authentication method is configured and tested.
- On every control plane node, review the current API server flags to see if OIDC (or another centralized identity provider) is already configured:
-
Migrate human and automation users from client certs to OIDC (or chosen mechanism)
- On any machine with kubectl access, for each non-compliant user:
- Create or identify the corresponding OIDC identity (subject/claim) in your IdP.
- Create/update Kubernetes
RoleBinding/ClusterRoleBindingto grant the same roles to the newUser/Groupas identified by OIDC claims. Example (adapt to your IdP and roles):
- Update kubeconfig used by each human/automation to use OIDC auth (e.g., via an exec plugin or cloud CLI) instead of client certificate fields.
- On any machine with kubectl access, for each non-compliant user:
-
Remove or de-privilege client-certificate users once migration is confirmed
- On any machine with kubectl access, after verifying affected users can authenticate and operate via OIDC:
- Remove or adjust RBAC bindings that reference the old client-cert
Useridentities: - Optionally, revoke or delete the issuing CA or intermediate used solely for those user client certs in your PKI system (outside the cluster), ensuring it does not impact component-to-component certs.
- Remove or adjust RBAC bindings that reference the old client-cert
- On admin machines, clean up outdated kubeconfigs that still contain
client-certificatefor humans or automation:
- On any machine with kubectl access, after verifying affected users can authenticate and operate via OIDC:
-
Verify that client certificate authentication is no longer used for users (only components)
- On any machine with kubectl access, re-check kubeconfigs:
Ensure only control-plane/component configs (e.g.,
kube-apiserver,kube-controller-manager,kube-scheduler,kubelet) use client certs. - Confirm RBAC no longer grants roles to user identities that are only accessible via client certs by re-running:
and ensuring any remaining
Usersubjects correspond only to component identities or identities authenticated via your new mechanism.
- On any machine with kubectl access, re-check kubeconfigs:
Using kubectl
Using kubectl
kubectl cannot modify client certificate authentication for users because this is controlled by host-level configuration and API server flags on every control plane node. Make the necessary changes directly on those nodes as described in the Manual Steps section.
Automation
Automation

