Skip to content

Commit

Permalink
Fix AWS session token support
Browse files Browse the repository at this point in the history
AWS session token authentication was inadvertently broken in a refactor
of AWS auth handling.

Signed-off-by: Jacob Henner <code@ventricle.us>
  • Loading branch information
JacobHenner committed Nov 2, 2023
1 parent faf8c9a commit 4577dd5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ Here is an overview of all new **experimental** features:

- **General**: Fix CVE-2023-39325 in golang.org/x/net ([#5122](https://github.com/kedacore/keda/issues/5122))
- **General**: Prevented stuck status due to timeouts during scalers generation ([#5083](https://github.com/kedacore/keda/issues/5083))
- **AWS Scalers**: Ensure session tokens are included when instantiating AWS credentials ([#5156](https://github.com/kedacore/keda/issues/5156))
- **Azure Pipelines**: No more HTTP 400 errors produced by poolName with spaces ([#5107](https://github.com/kedacore/keda/issues/5107))
- **ScaledJobs**: Copy ScaledJob annotations to child Jobs ([#4594](https://github.com/kedacore/keda/issues/4594))

Expand Down
2 changes: 1 addition & 1 deletion pkg/scalers/aws_common.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func getAwsConfig(ctx context.Context, awsRegion string, awsAuthorization awsAut
return &cfg, nil
}
if metadata.awsAuthorization.awsAccessKeyID != "" && metadata.awsAuthorization.awsSecretAccessKey != "" {
staticCredentialsProvider := aws.NewCredentialsCache(credentials.NewStaticCredentialsProvider(metadata.awsAuthorization.awsAccessKeyID, metadata.awsAuthorization.awsSecretAccessKey, ""))
staticCredentialsProvider := aws.NewCredentialsCache(credentials.NewStaticCredentialsProvider(metadata.awsAuthorization.awsAccessKeyID, metadata.awsAuthorization.awsSecretAccessKey, metadata.awsAuthorization.awsSessionToken))
cfg.Credentials = staticCredentialsProvider
}

Expand Down

0 comments on commit 4577dd5

Please sign in to comment.