Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow security_token to be set by AssumeRoleWebIdentityAdapter #28

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ Similarly, it is possible to use a web identity token to perform the assume role
config :ex_aws,
secret_access_key: [{:awscli, "profile_name", 30}],
access_key_id: [{:awscli, "profile_name", 30}],
security_token: [{:awscli, "profile_name", 30}],
awscli_auth_adapter: ExAws.STS.AuthCache.AssumeRoleWebIdentityAdapter
```

Expand Down
7 changes: 4 additions & 3 deletions lib/ex_aws/sts/auth_cache/assume_role_web_identity_adapter.ex
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,11 @@ defmodule ExAws.STS.AuthCache.AssumeRoleWebIdentityAdapter do
role_arn: env_role_arn(config),
role_session_name: role_session_name(config),
web_identity_token: web_identity_token(config),
# necessary for now due to how ExAws.request() works
# Prevent recursive callback from ExAws.request()
# by overriding configs that use :awscli
access_key_id: "dummy",
# necessary for now due to how ExAws.request() works
secret_access_key: "dummy"
secret_access_key: "dummy",
security_token: "dummy"
}
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ defmodule ExAws.STS.AuthCache.AssumeRoleWebIdentityAdapterTest do
role_session_name: "test",
access_key_id: "dummy",
secret_access_key: "dummy",
security_token: "dummy",
http_client: ExAws.Request.HttpMock
}

Expand Down