`google-github-actions/auth` fails with `The given credential is rejected by the attribute condition`
IntermediateTroubleshootingCloud identity: IRSA, Workload Identity and CI OIDC
Answer
Likely causes → The Workload Identity Pool provider has an attribute-condition (as it should) that this workflow's claims do not satisfy, such as a different repository owner, a fork, or a non-main ref.
Diagnose →
gcloud iam workload-identity-pools providers describe github \
--location=global --workload-identity-pool=ci --format='value(attributeCondition,attributeMapping)'
Fix → If the run is legitimate, adjust the condition, for example assertion.repository_owner == 'acme' && assertion.ref == 'refs/heads/main'. Then grant roles/iam.workloadIdentityUser (or direct resource roles) to principalSet://.../attribute.repository/acme/api.
Prevent → Always keep an attribute condition, because a provider without one trusts every GitHub repo. Scope bindings to specific repositories.
More on Cloud identity: IRSA, Workload Identity and CI OIDC
A pod configured for IRSA runs `aws sts get-caller-identity` and gets the node role (`eks-node-group-role`) instead of its own roleBeginner`An error occurred (AccessDenied) when calling the AssumeRoleWithWebIdentity operation: Not authorized to perform sts:AssumeRoleWithWebIdentity` from an IRSA podIntermediate`InvalidIdentityToken: No OpenIDConnect provider found in your account for https://oidc.eks.ap-south-1.amazonaws.com/id/ABC123`BeginnerIRSA env vars are present in the pod, but one legacy service still uses the node roleIntermediatePods without IRSA can still call AWS with the node's permissions through `169.254.169.254`IntermediateWith EKS Pod Identity, the pod gets `Unable to locate credentials` even though a pod identity association existsIntermediate