99designs / aws-vault

A vault for securely storing and accessing AWS credentials in development environments
MIT License
8.52k stars 820 forks source link

Web identity + role fails to validate in the 7.0.0 release #1177

Closed lstoll closed 1 year ago

lstoll commented 1 year ago

After upgrading to 7.0.0, we're seeing errors:

aws-vault: error: exec: Error getting temporary credentials: profile 'XXXX' has more than one source of credentials

This appears to be related to some new validation code(https://github.com/99designs/aws-vault/blob/ec5e53c91b9990c39c0af69de45f21e436abaa23/vault/config.go#L684-L709), which counts both a role and a web_identity_token_process as two independent sources. However, the web identity provider requires both of these to be set: https://github.com/99designs/aws-vault/pull/587#issue-616928047

I'm not sure what the motivation with the new validation check was, but I'm guessing we need to only increment the count when a role exists when the web identity file/process is not set.