Skip to content

Commit

Permalink
Don't require AWS_ROLE_SESSION_NAME to sts:AssumeRoleWithWebIdentity (#…
Browse files Browse the repository at this point in the history
…9416) (#9476)

Fixes #9415

Co-authored-by: Theron Voran <[email protected]>

Co-authored-by: Ori Rawlings <[email protected]>
  • Loading branch information
tvoran and orirawlings authored Jul 14, 2020
1 parent 022a563 commit 39f1a3e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sdk/helper/awsutil/generate_credentials.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ func (c *CredentialsConfig) GenerateCredentialChain() (*credentials.Credentials,
roleARN := os.Getenv("AWS_ROLE_ARN")
tokenPath := os.Getenv("AWS_WEB_IDENTITY_TOKEN_FILE")
sessionName := os.Getenv("AWS_ROLE_SESSION_NAME")
if roleARN != "" && tokenPath != "" && sessionName != "" {
if roleARN != "" && tokenPath != "" {
// this session is only created to create the WebIdentityRoleProvider, as the env variables are already there
// this automatically assumes the role, but the provider needs to be added to the chain
sess, err := session.NewSession()
Expand Down

0 comments on commit 39f1a3e

Please sign in to comment.