This list works backwards from the service account for valero
- verify the role-granting annotation on the valero serviceAccount
eks-amazonaws.com/role-arn: arn:aws:iam::[account]:role/[role name]
- verify the trust document attached to that IAM role
- the Principal.Federated value is the OIDC connector ID from your EKS cluster
- every EKS cluster that needs access to this role needs to have its connector ID included
- each namespace/serviceAccount must be included in the conditional
- the Principal.Federated value is the OIDC connector ID from your EKS cluster
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "dev01",
"Effect": "Allow",
"Principal": {
"Federated": "arn:aws:iam::[account]:oidc-provider/oidc.eks.[az].amazonaws.com/id/..."
},
"Action": "sts:AssumeRoleWithWebIdentity",
"Condition": {
"StringEquals": {
"oidc.eks.[az].amazonaws.com/id/...:sub": "system:serviceaccount:[kube namespace]:[kube service-account-name]",
"oidc.eks.[az].amazonaws.com/id/...:aud": "sts.amazonaws.com"
}
}
}
]
}
- verify the eks cluster is wired into a properly configured IAM/Identity Provider