Interview Prep/DevSecOps/Cloud identity: IRSA, Workload Identity and CI OIDC

IRSA env vars are present in the pod, but one legacy service still uses the node role

IntermediateTroubleshootingCloud identity: IRSA, Workload Identity and CI OIDC
Answer

Likely causes → The service uses an old AWS SDK that predates web-identity support in the default credential chain, or the code builds credentials explicitly (for example InstanceProfileCredentialsProvider), or it runs as a user that cannot read the token file.

Diagnose →

kubectl exec deploy/legacy -- ls -l /var/run/secrets/eks.amazonaws.com/serviceaccount/token
kubectl exec deploy/legacy -- id
# check the SDK version in the dependency manifest

Fix → Upgrade the SDK and use the default provider chain. If the container runs as non-root, set securityContext.fsGroup so the token file is readable.

Prevent → Keep a minimum SDK version in your base images, and turn on IMDS blocking so fallback becomes an error.

All DevSecOps questions Roadmap: Supply chain, secrets & identity

More on Cloud identity: IRSA, Workload Identity and CI OIDC