You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
I have tried vault with multiple credential retrieval methods that the AWS SDK natively supports, namely:
~/.aws/config with source_profile + using the AWS_PROFILE environment variable -> doesn't work
using ~/.aws/config with 'credential_process' -> doesn't work
looking at the code ECS container credentials would also not work
The first two I'm using in testing my aws roles, the last one is for using vault client in ECS.
Describe the solution you'd like
Instead of vault client using it's own credential chain, use to the AWS SDK default credential chain.
If the user specifies their access keys explicitly (eg. through args), only then use custom credential chain.
Describe alternatives you've considered
I wrote a python script to wrap vault, so that I can utilize the default credential chain.
It looks like this (calling it vault-aws-fix:
I'm wondering if there's been any movement on this. We're trying to set up AWS auth as well for CLI usage and running into issues with our setup. We currently use method 2 outline above for talking to AWS (credential_process) and running vault login -method=aws role=<role> region=<region> just gives us the following output with no additional information.
Error authenticating: failed to retrieve credentials from credential chain: NoCredentialProviders: no valid providers in chain. Deprecated.
For verbose messaging see aws.Config.CredentialsChainVerboseErrors
Worth noting that I can use the AWS CLI with no issues using the same setup
Vault is using an ancient version of the aws-sdk. There are numerous bug fixes in recent versions, including this config parsing issue aws/aws-sdk-go#4989 which is fixed by v1.45.15.
Is your feature request related to a problem? Please describe.
I have tried vault with multiple credential retrieval methods that the AWS SDK natively supports, namely:
The first two I'm using in testing my aws roles, the last one is for using vault client in ECS.
Describe the solution you'd like
Instead of vault client using it's own credential chain, use to the AWS SDK default credential chain.
If the user specifies their access keys explicitly (eg. through args), only then use custom credential chain.
See https://docs.aws.amazon.com/sdk-for-go/v1/developer-guide/configuring-sdk.html#specifying-credentials on what the recommended way of using the AWS SDK is.
Describe alternatives you've considered
I wrote a python script to wrap vault, so that I can utilize the default credential chain.
It looks like this (calling it
vault-aws-fix
:and using it like this:
The text was updated successfully, but these errors were encountered: