EKS - The aws-auth ConfigMap is deprecated. Any Website explain why?

The aws-auth ConfigMap is deprecated

AWS explain why the deprecated ConfigMap ?

And why they prefer EKS access entries

Probably because the entire community complained about it for the past 5 years or so

Because a non-zero and possibly including myself number of people have absolutely locked ourselves out a newly built cluster by messing it up.

The aws-auth Configmap is an in-cluster resource. You need to be authenticated towards the K8S cluster to edit it. I guess there were two things people complained about - there is a need to add a default IAM principal into the map in order to have access to the cluster upon creation. AWS does that by default when you create the cluster - it adds the principal you created the cluster with as a cluster administrator. The other thing was the fact that you can lock everyone out of the cluster if you just delete the config map. The only was to recover was to get through support (?) Never happend to me so I’m just guessing here.

The access entries is essentially the same thing with the difference that AWS has put the functionality into an API and hid the config map from what you see inside the EKS cluster. You can’t lock yourself out because you can always edit the access entries through AWS Console, SDK, API and you can also create the cluster with empty access entries and add as you go. The principal you create the cluster with does not have to be in the access entries at all. It essentially solves the two things people complained about.

TL;DR could be - EKS access entries is basically a managed aws-auth config map :smiley: it protects you from screwing up.

Locking out and not very easy to control with Terraform

You have to have access to the cluster to give access to the cluster. So it’s bad for automation and for the potential of locking yourself out. Access entries are nicer to use and can be modified without access to the cluster’s API

Good write up here:

Hope it helps

Add me to that list.

This is the way, and drop irsa for pod-identity. No longer will you need to intermix your k8s yaml and terraform

It should be free to make an account, but there is a CIS Benchmark specific to AWS EKS that gives a fairly detailed explanation:

https://workbench.cisecurity.org/

4.1.7 Cluster Access Manager API to streamline and enhance the
management of access controls within EKS clusters (Automated)
Profile Applicability:
* Level 1
Description:
Amazon EKS has introduced the Cluster Access Manager API to streamline and
enhance the management of access controls within EKS clusters. This new approach is
now the recommended method over the traditional aws-auth ConfigMap for managing
Role-Based Access Control (RBAC) and Service Accounts.
Key Advantages of Using the Cluster Access Manager API:

  1. Simplified Access Management: The Cluster Access Manager API allows
    administrators to manage access directly through the Amazon EKS API,
    eliminating the need to modify the aws-auth ConfigMap manually. This reduces
    operational overhead and minimizes the risk of misconfigurations.
  2. Enhanced Security Controls: With this API, administrators can assign
    predefined AWS-managed Kubernetes permissions, known as “access policies,”
    to IAM principals. This provides a more secure and auditable way to manage
    permissions compared to manual ConfigMap edits.
  3. Improved Visibility and Auditing: The API offers better visibility into cluster
    access configurations, facilitating easier auditing and compliance checks.
    Administrators can list and describe access entries and policies directly through
    the EKS API.

Rationale:
The compelling rationale for using the Cluster Access Manager API instead of the
traditional aws-auth ConfigMap in Amazon EKS revolves around security, scalability,
operational efficiency, and simplified management.

  1. Increased Security and Reduced Risk
    * Direct Management via API: The Cluster Access Manager API enables you to
    manage RBAC and IAM permissions directly through the EKS API rather than
    editing a ConfigMap. This eliminates the risk of inadvertent errors when manually
    modifying the aws-auth ConfigMap.
    * Immutable Access Entries: The API ensures that once access entries are
    defined, they are tightly controlled, reducing the risk of accidental overwrites or
    misconfigurations that can happen when editing YAML files.
    * Fine-Grained Access Control: By leveraging the new API, you can define access
    policies at a more granular level than the previous method. This ensures that
    only the necessary permissions are granted, minimizing the attack surface.
  2. Operational Efficiency and Scalability
    * Scalability: Managing access control through the aws-auth ConfigMap becomes
    increasingly challenging as the number of users and services grows. The new
    API scales better by allowing access management through standard AWS
    Identity and Access Management (IAM) tools.
    * Reduced Operational Overhead: The API simplifies the management of access
    controls by removing the need for manual updates to the ConfigMap, reducing
    the risk of human error, and automating access provisioning through
    Infrastructure as Code (IaC) tools like Terraform or CloudFormation.
  3. Improved Visibility, Auditing, and Compliance
    * Auditable and Traceable Changes: The Cluster Access Manager API integrates
    with AWS CloudTrail, allowing you to track who made changes to access
    configurations. This level of visibility is critical for organizations that need to
    adhere to compliance frameworks like SOC 2, GDPR, or HIPAA.
    * Centralized Management: Unlike the aws-auth ConfigMap, which is managed at
    the Kubernetes level, the new API leverages AWS IAM’s centralized
    management and auditing capabilities, providing a unified view of access
    controls across your AWS environment.
  1. Faster and Safer Access Provisioning
    * No More Cluster Downtime: Errors in the aws-auth ConfigMap can accidentally
    lock out users or admins from the cluster, requiring complex recovery processes.
    The API-based approach is more resilient, reducing the risk of misconfigurations
    causing downtime.
    * Immediate Effect: Changes made via the API take effect immediately, whereas
    updates to the aws-auth ConfigMap may require a delay or even restarting
    components in some cases.
  1. Future-Proofing and Alignment with AWS Best Practices
    * Native Support in Kubernetes Versions: Starting from Kubernetes 1.23, the
    Cluster Access Manager API is fully supported and designed to replace the aws-
    auth ConfigMap method. This aligns with AWS’s roadmap and best practices for
    EKS, ensuring your infrastructure remains compatible with future updates.
    * Modern Approach for Pod Identity: When combined with IAM Roles for Service
    Accounts (IRSA) or the new Pod Identity feature, the API supports a more
    dynamic and secure model for assigning permissions to pods, making it easier to
    implement least-privilege access.

If you misconfigured aws-auth config map you could lock yourself out of your cluster.

I got really tired of different things fighting over that damn configmap. Also got tired of some things putting everything in quotes in the yaml and other things wanting no quotes.

This blog post explains the reason: https://aws.amazon.com/blogs/containers/a-deep-dive-into-simplified-amazon-eks-access-management-controls/