mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-12-04 19:15:30 +00:00
Don't require AWS_ROLE_SESSION_NAME to sts:AssumeRoleWithWebIdentity (#9416)
Fixes #9415 Co-authored-by: Theron Voran <tvoran@users.noreply.github.com>
This commit is contained in:
@@ -62,7 +62,7 @@ func (c *CredentialsConfig) GenerateCredentialChain() (*credentials.Credentials,
|
|||||||
roleARN := os.Getenv("AWS_ROLE_ARN")
|
roleARN := os.Getenv("AWS_ROLE_ARN")
|
||||||
tokenPath := os.Getenv("AWS_WEB_IDENTITY_TOKEN_FILE")
|
tokenPath := os.Getenv("AWS_WEB_IDENTITY_TOKEN_FILE")
|
||||||
sessionName := os.Getenv("AWS_ROLE_SESSION_NAME")
|
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 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
|
// this automatically assumes the role, but the provider needs to be added to the chain
|
||||||
sess, err := session.NewSession()
|
sess, err := session.NewSession()
|
||||||
|
|||||||
Reference in New Issue
Block a user