Skip to main content

More Info:

Manage Kubernetes RBAC users through the AWS IAM Authenticator (or AWS CLI v1.16.156 or greater) so cluster access is tied to IAM identities.

Risk Level

Medium

Address

Security

Compliance Standards

  • CIS EKS

Triage and Remediation

Remediation

Manual Steps

  1. Confirm AWS CLI / authenticator usage (any machine with kubectl and AWS access)
    • If aws is older than 1.16.156 and you rely on it for cluster auth, plan to upgrade.
    • If you use aws-iam-authenticator, confirm it’s the configured auth method (e.g., in kubeconfig, see next step).
  2. Inspect how kubectl authenticates to the cluster (any machine with kubectl)
    • If the command is aws eks get-token (AWS CLI ≥ 1.16.156) or aws-iam-authenticator, you are using supported IAM-based auth.
    • If some other exec/plugin or static token/cert is used, plan to migrate to IAM-based auth with either AWS CLI or AWS IAM Authenticator.
  3. Verify aws-auth ConfigMap is used for RBAC mapping (any machine with kubectl)
    • Confirm mapRoles and/or mapUsers entries tie IAM roles/users to Kubernetes groups (e.g., system:masters, app-specific groups).
    • If access is granted via non-IAM credentials (e.g., bootstrap admin kubeconfig only), plan to define appropriate IAM identity mappings here.
  4. Inventory IAM principals that can access the cluster (any machine with AWS CLI)
    • List IAM roles/users referenced in aws-auth:
    • For each rolearn / userarn, inspect IAM policy and trust:
    • Decide whether these IAM identities are appropriate and least-privilege for their mapped Kubernetes groups.
  5. Adjust IAM–RBAC mappings if needed (any machine with kubectl)
    • Edit aws-auth to add/remove/update IAM roles/users and Kubernetes groups:
    • Ensure:
      • Only intended IAM roles/users are mapped.
      • Admin-level groups (e.g., system:masters) are granted only to tightly controlled IAM roles.
      • Application roles map to scoped Kubernetes groups/ClusterRoles defined in your manifests/IaC.
  6. Re-verify access behavior after changes (any machine with kubectl and AWS CLI)
    • For a given IAM role/user, assume it and attempt to get a token and call the cluster:
    • Confirm the resulting permissions match the intended RBAC for that IAM principal; iterate on aws-auth and RBAC as required.
kubectl cannot configure how Kubernetes RBAC users are mapped to AWS IAM identities or which AWS CLI/IAM Authenticator mechanism is used; this is controlled in the EKS/cluster IAM configuration via the AWS console, CLI, or IaC. To address this finding, make the required changes at the cloud provider / managed control plane level as described in the Manual Steps section.