Description
As discussed in #721, the Fog::AWS::CredentialFetcher
continues to lag support for IAM access since AWS continues to add functionality.
The latest issue we ran into is that while the AWS SDK allows full configuration of the STS endpoint via the AWS_ENDPOINT_URL_STS
(https://docs.aws.amazon.com/sdkref/latest/guide/feature-ss-endpoints.html, https://docs.aws.amazon.com/sdkref/latest/guide/ss-endpoints-table.html) environment variable, Fog::AWS::CredentialFetcher
only supports regional endpoints:
fog-aws/lib/fog/aws/credential_fetcher.rb
Lines 47 to 52 in 95b1503
Now obviously we can add support for this environment variable, but this seems pretty inefficient as we have always been behind the curve.
I'd like to propose one of two avenues:
- If
:use_iam_profile
is enabled, useAws::InstanceProfileCredentials
to fetch the access key ID, secret access key, and session token. - Provide a
:credential_fetcher
option that allows the client to delegate the fetching of credentials to another class that implements the same signature.
@geemus What do you think?