Nike-Inc/cerberus-ruby-client

DefaultCredentialsProviderChain broken unless "MD service" URL is passed in

Opened this issue · 0 comments

Basically, the default credentials provider doesn't work within an EC2 instance when it needs to rely on the AwsRoleCredentialsProvider
This call fails:
vaultClient = CerberusClient::getDefaultVaultClient

There is a work around - this works with the current code:
vaultUrlResolver = Cerberus::DefaultUrlResolver.new

vaultClient = CerberusClient::getVaultClient(vaultUrlResolver,
Cerberus::DefaultCredentialsProviderChain.new(vaultUrlResolver, "http://169.254.169.254/latest/meta-data"))

The fix is to properly handle passing in the metadata service URL for the "default Client".