Files
floci/tools/aws
Priamo Germosen fb0e72c96a fix(iam): check iam:PassRole on an EKS Auto Mode cluster's node role (#9576)
CreateCluster and UpdateClusterConfig take EKS Auto Mode's node role in
computeConfig.nodeRoleArn. AWS's Service Reference lists iam:PassRole
for both operations, with iam:PassedToService ec2.amazonaws.com and
eks.amazonaws.com, but not which member's role goes to which service.
Floci never checked the node role: CreateCluster read only its cluster
role, by hand, and UpdateClusterConfig was left out of the table.

A new vendored source, tools/aws/sources/eks-roles.json, written by its
own script from the EKS API reference and user guide, gives each member's
role and the service its trust policy is for. CreateCluster's roleArn is
the cluster IAM role ("provides permissions for the Kubernetes control
plane"), whose page links from the member and whose trust policy names
eks.amazonaws.com. nodeRoleArn is "the IAM Role EKS will assign to EC2
Managed Instances", whose description names the EKS Auto Mode IAM
reference, whose node IAM role section links the guide's page of that
role, whose trust policy names ec2.amazonaws.com. The generator reads
the source (ROLE_SOURCES) to choose, among the services the Service
Reference names for an operation, the one each member's role is for. It
fails on a vendored role for a service the reference does not name, and
on one no operation reads. --verify checks the source against the live
pages.

So CreateCluster now needs iam:PassRole on roleArn for eks.amazonaws.com
and on computeConfig.nodeRoleArn for ec2.amazonaws.com, and
UpdateClusterConfig on its node role for ec2.amazonaws.com. Both move
into the generated table. So do CreateNodegroup, CreateFargateProfile,
CreateAddon and UpdateAddon, whose roles PassedRoles read by hand, the
same members to eks.amazonaws.com the generator gives from botocore and
the Service Reference. Their hand readers are gone, and Step Functions'
EKS tasks now check them as a direct request does.
2026-11-27 01:00:33 -04:00
..