惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

MyScale Blog
MyScale Blog
Jina AI
Jina AI
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
阮一峰的网络日志
阮一峰的网络日志
P
Proofpoint News Feed
Last Week in AI
Last Week in AI
博客园 - 司徒正美
Martin Fowler
Martin Fowler
T
Tailwind CSS Blog
B
Blog RSS Feed
Vercel News
Vercel News
博客园 - 聂微东
I
InfoQ
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
M
MIT News - Artificial intelligence
Recent Announcements
Recent Announcements
GbyAI
GbyAI
L
LangChain Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Microsoft Security Blog
Microsoft Security Blog
C
Check Point Blog
MongoDB | Blog
MongoDB | Blog
B
Blog

Wiz Blog | RSS feed

Meet Wiz for M365: Bringing SaaS into the Security Graph Bringing Security Visibility to Vercel with Wiz Axios NPM Distribution Compromised in Supply Chain Attack Tracking TeamPCP: Investigating Post-Compromise Attacks Seen in the Wild The Wiz Blue Agent, now Generally Available Beyond the Badge: What Achieving Microsoft’s Certified Software Designation Means for Your Cloud Security Introducing the Green Agent: AI-Powered Remediation for the Cloud Three’s a Crowd: TeamPCP trojanizes LiteLLM in Continuation of Campaign KICS GitHub Action Compromised: TeamPCP Strikes Again in Supply Chain Attack Introducing the Wiz Red Agent- AI-Powered Attacker Introducing Wiz AI Application Protection Platform (AI-APP) Introducing Wiz Agents & Workflows: Security at the Speed of AI AI Runtime Threat Detection: From Input to Real-World Impact Trivy Compromised: Everything You Need to Know about the Latest Supply Chain Attack It’s Official: Wiz Joins Google Understanding and Reducing AI Risk in Modern Applications Introducing Wiz Tenant Manager: Multi-Tenant Management for Federated Organizations The Agile FedRAMP Playbook, Part 4: Reactive Risk Management through Enriched Incident Response Wiz Achieves CPSTIC Certification in Spain Seeing AI Clearly: Building Visibility Across Modern AI Applications The Agile FedRAMP Playbook, Part 3: Preventative Risk Management by building Secure by Design Wiz Leads the 2026 Latio Application Security Report with awards in 4 categories Building an Agentic Cloud Security Ecosystem: A Reference Architecture with Wiz MCP and Infosys Cyber Next The Agile FedRAMP Playbook, Part 2: Proactive Risk Management with Continuous Monitoring Cloud-native Security for your Windows environment: Announcing the Wiz Runtime Sensor for Windows Would You Click ‘Accept’? Automatically detecting malicious Azure OAuth applications using LLMs Wiz Named a Leader in The Forrester Wave™: Cloud Native Application Protection Solutions, Q1 2026 From Detection to Remediation: It’s Time to Rethink AppSec Around Exploitability and Root Cause Fixes The Agile FedRAMP Playbook, Part 1: Why Risk is Your Best Starting Point Introducing AI Cyber Model Arena: A Real-World Benchmark for AI Agents in Cybersecurity
New EKS Access Management and Pod Identity features: a se...
Shay Berkovich · 2024-02-07 · via Wiz Blog | RSS feed

TL;DR 

On November 26 Amazon introduced EKS Pod Identity feature — a new way for cluster workloads to interact with cloud resources. About three weeks later Amazon presented yet another related feature — EKS access management. The introduction of these two new features closes the Cloud-Cluster authentication and identity loop that used to be a pain point for cloud and K8s operators. In this blog post we inspect the changes from the security perspective and answer the questions such as:  

  • How do they affect existing security controls? 

  • Are there new security pain points the new features introduce?  

  • What are the security best practices when using the new features? 

Overview of the new features 

Introduction 

In the next two sections we dive deeper into the implementation. Here we introduce the features on a higher level. In the cloud-to-cluster direction, EKS cluster access management is a new way for IAM users and IAM roles to connect to and manage the EKS clusters and resources via EKS API. This includes two new entities — “access entries” and “access policies”, which control AWS principals' access and permissions inside the EKS cluster respectively. In the cluster-to-cloud direction, EKS pod identity adds an alternative to an existing but somewhat rigid IRSA (IAM Roles for Service Accounts) solution. 

Following is a high-level schema of the Cloud-to-Cluster-to-Cloud permissions and identity flow with changes to the flow highlighted in pink:  

In addition, AWS has revamped the cluster Access tab to include all the new features in one place, which is very handy. In the same tab, you can perform CRUD operations on cluster access entries/policies and on the pod identities: 

Before stopping on security implications, we will briefly outline the main implementation points of both features.  

Cloud to Cluster 

After a user creates a cluster, they automatically become the owner and are added to the group of cluster administrators (system:masters). From that point on, adding other cluster users was tedious, and not an IAM-native process of modifying aws-config ConfigMap — which maps IAM principals onto pre-existing K8s RBAC groups. With the addition of the cluster access management feature, cluster access can be controlled through EKS API without the need for K8s API access. aws-config becomes a secondary way of new user authentication. The new and preferred way is through the usage of access entries and access policies. 

Authentication mode. To manage these two authentication mechanisms Amazon has introduced “Authentication Mode”. There are three possible values:  

  • CONFIG_MAP — the old way and the only way for the clusters pre-v1.23 

  • API_AND_CONFIG_MAP — both ways working together 

  • API — API authentication only  

Access entries. With the new authentication modes, access entry is a manifestation of AWS identity and in effect represents an “entry” to the cluster, similar to a record in aws-config. It is impossible to create an entry without a principal reference or to switch principals post-entry creation.  

Access policies. Access policies essentially duplicate a big part of Kubernetes RBAC. A principal with access entry but without any associated access policy is equivalent to anonymous user in level of access. There is a built-in set of predefined access policies that includes the following four policies based on the existing user-facing roles

We will explore these policies in the future blog. A nice feature to note: amazon ensures that deletion of access entry also deletes any associated access policies. In addition, for the more granular permissions, operators can map IAM principals to the existing K8s groups, similar to the mappings in aws-config. For now, AWS leaves the decision whether to use access entries / policies or aws-config to the operator. Nevertheless, we expect a gradual deprecation of the CONFIG_MAP mode — as supported by the advice in EKS best practices guide

Cluster to Cloud 

Before the EKS pod identity, there were several ways to provision permissions to a pod service account, each with its own disadvantages: 

  • Via worker node identity, with its lack of granularity and overprovisioning as a result. 

  • Using IRSA with its complex management. 

  • By distributing AWS credentials across the application workloads and risking secret exposure.  

EKS pod identity is here to solve the shortcomings of the above approaches. It enables a granular per-workload permission management (as opposite to over-provisioning the worker node identities); and it simplifies the IAM on the cloud side by making the SA-role association more flexible.  

The visualized implementation appears as follows:  

It is based on the eks-pod-identity-agent running on every worker node (as a DaemonSet) and serving as an intermediary for retrieving the necessary credentials from EKS Auth (by using a worker node identity) and returning them to the requesting container. In addition, pod-identity-webhook is responsible for augmenting the pod spec with the necessary environment variables and token mount.  

Security implications and recommendations 

While both EKS cluster access management and EKS pod identity are welcome new features, they represent a substantial change to the existing mechanisms. It is important to understand security implications. Amazon did an excellent job updating EKS security best practices guide with the relevant recommendations, but we want to take a step further and dig deeper into some of the topics. 

Effective permission matrix calculation 

The introduction of authentication modes introduces additional complexity when auditing the resulting permissions. API_AND_CONFIG_MAP authentication mode is probably the most notable of authentication modes, since most of the clusters fall in this category (see version distribution numbers from our 2023 Kubernetes security report).  

When assessing the number of principals with cluster access and the magnitude of this access, both aws-config and EKS API should be taken into account. The final access matrix will be the union of the two methods for each IAM principal. Next, the audit should account for multiple access policies per access entry. The effective permission matrix, again, is a union of associated access policies. Note that associating the access policy with an already-associated access entry does not update it but rather adds an additional policy. Finally, in terms of in-cluster authorization, it is vital to understand the changed flow of K8s authorizers: 

There are no DENY rules in K8s authorization flow, therefore, for the principal with access provisioned from aws-config and access entries, the resulting permissions set is again a union of authorization rules from the bound RBAC roles and associated access policies. 

As we can see, the auditor (be it a tool or a person) needs to consider the authentication mode of the cluster and calculate permissions accordingly. Moreover, K8s-level API access is not enough for the auditor and EKS API access permissions are necessary. Here is our suggested flow of effective permission matrix calculation for the specific IAM principal on a cluster:  

We also recommend periodic audits of policy semantics to detect associated policies that don’t make sense. For example, the same IAM principal is associated with multiple redundant access policies (i.e. AmazonEKSViewPolicy and AmazonEKSEditPolicy) might be a sign of policy update attempt signaling misunderstanding of effective permission calculation.   

Protecting the identity token 

The traditional vectors of lateral movement in a cluster are still relevant in EKS pod identity scenarios. Consider an escaped pod with filesystem access or even a pod with a sensitive hostPath mount and a read-only filesystem access to /var/lib/kubelet/pods. In this classic scenario, the malicious actor can easily read the eks-pod-identity-token and abuse it by calling for the pod-identity-agent endpoint directly to gain STS identity like so:  

Cluster operators should review the existing RBAC permissions in light of potential token stealing. Consider namespace separation for workload with different risk profile if not employed yet. Review your Admission Controller rules to disallow access to /var/lib/kubelet. Better yet, consider splitting the nodes while considering risk profile and permission impact of the workloads (check out this guide). This can prevent neighbor token stealing. 

Detection considerations 

Association of Kubernetes principal with a high-privilege role is a significant security event that should typically be monitored. In the old order of things, the events such as creation of a new powerful ClusterRole or binding of new principal to cluster-admin with (Cluster)RoleBinding could have been detected/prevented via traditional cluster detection sources — Admission Controller and kube-audit log. With the introduction of EKS access management these detection sources are not sufficient because they are blind to the access entry event creation or access policy association. In this landscape, prevention with Admission Controller is not possible, and a proper detection solution should incorporate cloud AWS CloudTrail log for the full coverage (see, for example, Datadog examples of cloud log-based detections). Wiz has introduced several new detections in this area: 

  • AWS principal granted cluster-admin role across an entire EKS cluster 

  • AWS principal granted admin role across an entire EKS cluster 

  • AWS principal granted cluster-admin role across multiple EKS clusters in a short period of time 

  • AWS principal granted admin role across multiple EKS clusters in a short period of time  

On a system level, we can imagine several potential privilege escalation scenarios. These scenarios are quite similar to K8s token stealing, but they do require detection adjustments. One such vector is for an attacker to steal the eks-pod-identity token by accessing the file. Another vector is the internal network connection to the local node pod identity server. The Wiz sensor team has introduced several new sensor detection rules: 

  • Process used AWS EKS CLI to discover pod identities 

  • Process used AWS EKS CLI to create or modify pod identities 

  • Unrecognized access to AWS EKS pod identity token 

  • Process used AWS EKS pod identity to assume role 

  • Unrecognized connection to EKS pod identity agent credentials 

Usage of default service account 

Using default service account (SA) for application workloads is a security anti-pattern. Consider the scenario where different pods have different access level to an S3 bucket. The appropriate service accounts are default (read access) and full-access-sa (read/write access). When another unrelated pod without specific service account is created, it is automatically given default SA and with it, a read access to an S3 bucket: 

Here we can see that ubuntu pod has eks-pod-identity-token mounted. This flow compromises the principle of least privileges. We recommend not to use EKS pod identities on default SAs and / or to opt out of automounting service account feature by using the automountServiceAccountToken: false flag in the pod specs. 

Increased attack surface 

Cluster attack surface is a function of exposed functionality. Publicly exposed data plane workload adds to attack surface, but so do the various cluster plugins/addons, albeit in an indirect way. As we showed in our “Cluster Grey Zone” research, middleware components can be a handy way for attacker to move laterally or to elevate privileges given the initial foothold. Pod-identity-webhook is a new webhook in a cluster control plane. Amazon EKS pod identity agent is based on eks-pod-identity-agent DaemonSet. The DaemonSet deploys pods that have several problematic configurations, such as shared hostNetwork with open ports and privileged initial container. 

We will show how we can exploit this setup in our follow-up blog. 

Conclusions 

The recent features by Amazon represent a significant step forward in a cohesive management of cloud/cluster access and permissions. The security impact cannot be overstated, and will probably yield new attack avenues as time goes by. In this blog we hope to contribute to secure Kubernetes usage in the cloud by calling out the problematic points and providing clear recommendations. Let’s summarize: 

  • Monitor security posture: New features will not protect from bad security design and misconfigurations — traditional best practices and recommendations still apply. 

  • Audit: Review your audit practices and adjust them to consider the cluster authentication mode and pod identity mappings. 

  • Privilege escalation: Treat new access entry and policy management permissions as high-privileged permissions. New features and complexities add various escalation avenues that were previously impossible. We will expand on that in a follow-up blog. 

  • Detection: There are multiple opportunities for abusing the new features. Extend the current detection coverage to cover those opportunities. Both EKS and K8s APIs need to be covered.