Skip to main content

More Info:

The Cluster Access Manager API streamlines management of authenticated IAM principals for EKS clusters. Choose the appropriate authentication mode to centralize and secure access control.

Risk Level

Medium

Address

Security

Compliance Standards

  • CIS EKS

Triage and Remediation

Remediation

Manual Steps

  1. On any machine with kubectl access, confirm cluster identity and context to avoid changing the wrong cluster:
  2. Still on the kubectl machine, check whether the legacy aws-auth ConfigMap is in use and inspect its contents:
    Review:
    • Whether mapRoles, mapUsers, or mapAccounts are present.
    • Who currently has access (IAM roles/users/accounts) and whether this matches your organization’s intended access model.
  3. In the AWS Management Console, navigate to Amazon EKS → your cluster → Access → Access configuration and review:
    • The “Cluster authentication mode” setting (EKS API vs ConfigMap).
    • Whether this matches your intended source of authenticated IAM principals (centralized via EKS Access Entries, or managed via aws-auth).
  4. If the cluster authentication mode does not align with your desired model and the cluster is newly created or being created via IaC, adjust it at creation time:
    • In the console: choose either EKS API or ConfigMap under “Cluster authentication mode” before provisioning.
    • In IaC (CloudFormation/Terraform/etc.): set the equivalent parameter for authentication mode so that future clusters are created with the correct setting.
  5. For existing clusters (where authentication mode cannot be changed), decide on your management model:
    • If using EKS API: ensure all required IAM principals are granted access via EKS Access Entries (console or IaC) and gradually phase out any reliance on aws-auth.
    • If using ConfigMap: keep aws-auth as the source of truth and maintain it via GitOps/IaC, ensuring its contents are regularly reviewed and audited.
  6. Re-verify configuration after any changes:
    • In the console: confirm the “Cluster authentication mode” under Access → Access configuration.
    • With kubectl: confirm aws-auth matches your intended mapping (or is empty/unused if you’ve fully moved to EKS API):
Review points:
  • If the ConfigMap does not exist or is empty but you expect to be using ConfigMap authentication mode, that’s a problem.
  • If mapRoles / mapUsers / mapAccounts contain IAM principals that should not have cluster access, or use overly broad roles (e.g., admin roles for many users), that indicates a problem with access control design.
  • If there is an eks.amazonaws.com/role-arn mapping you don’t recognize or that grants cluster-admin privileges widely, that is a red flag.
Review points:
  • Look for ClusterRoleBinding objects that bind cluster-admin (or other powerful roles) to subjects that correspond to IAM users/roles (often via system:masters group or mapped IAM entities in aws-auth) more broadly than intended.
  • Any binding that effectively grants admin rights to principals you did not intend to be administrators is a problem.
Review points:
  • Confirm that subjects match only the IAM-mapped Kubernetes users/groups that should have that level of access.
  • Mismatches between intended IAM principals and actual bound subjects indicate misaligned access control.
Review points:
  • Run this as different principals (e.g., assume different IAM roles and re-run kubectl auth can-i --list) to see what each IAM-mapped identity can do.
  • If non-admin IAM principals can perform cluster-admin-level actions (create clusterroles, clusterrolebindings, etc.) when they should not, that indicates a problem in your current combination of aws-auth mappings and RBAC.
Explanation of what kubectl cannot show:
  • kubectl cannot display or change the EKS Cluster Authentication Mode itself (EKS API vs ConfigMap); that setting is only visible and configurable via the AWS console/CLI/IaC at cluster creation time. Use the above commands to understand the effective access model and then review the cluster’s Authentication Mode manually in the AWS console as described in the remediation.
Explanation of output and what indicates a problem (for review):
  • AUTH_MODE:
    • API_AND_CONFIG_MAP (or similar mixed modes) requires review: both EKS Access Entries and aws-auth are in play.
    • EKSAUTH/EKS_API-only or CONFIG_MAP-only are consistent with a single source, but must match your intended design.
  • ACCESS_ENTRY_COUNT:
    • If AUTH_MODE is EKS_API (or equivalent) and ACCESS_ENTRY_COUNT is 0, access via IAM/EKS API may be misconfigured or overly restrictive.
  • HAS_CM / CM_MODE:
    • If AUTH_MODE is EKS_API but HAS_CM=YES and CM_MODE=ACTIVE, there are legacy aws-auth mappings that should be reviewed and possibly removed.
    • If AUTH_MODE is CONFIG_MAP and HAS_CM=NO or CM_MODE=EMPTY, the cluster may not have any IAM principal mappings configured.
This script does not change any configuration; it only surfaces current state so you can manually decide whether the Cluster Authentication Mode and aws-auth usage match your security requirements.