From 9402686be1e6fd9debb1d022503189c154150891 Mon Sep 17 00:00:00 2001 From: xavier geerinck Date: Sat, 14 Nov 2020 12:04:00 +0100 Subject: [PATCH 1/3] Wrong aws_iam_authorization access key id setting When getting the ACCESS_KEY_ID for AWS from Environment variables (which is currently the only working option), the `aws_iam_authorization` scaler would check if metadata.awsAccessKeyIDFromEnv was set, but it would then utilize the metadata.awsAccessKeyId for the name... while in the secretAccessKey it would then use the `FromEnv` one. This fixes that Signed-off-by: Xavier Geerinck --- pkg/scalers/aws_iam_authorization.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/scalers/aws_iam_authorization.go b/pkg/scalers/aws_iam_authorization.go index bdd33d830d7..e542ad01cad 100644 --- a/pkg/scalers/aws_iam_authorization.go +++ b/pkg/scalers/aws_iam_authorization.go @@ -30,7 +30,7 @@ func getAwsAuthorization(authParams, metadata, resolvedEnv map[string]string) (a if metadata["awsAccessKeyID"] != "" { meta.awsAccessKeyID = metadata["awsAccessKeyID"] } else if metadata["awsAccessKeyIDFromEnv"] != "" { - meta.awsAccessKeyID = resolvedEnv[metadata["awsAccessKeyID"]] + meta.awsAccessKeyID = resolvedEnv[metadata["awsAccessKeyIDFromEnv"]] } if len(meta.awsAccessKeyID) == 0 { From 9a07fe52b1983ebfe353c05599e96d7f808b885d Mon Sep 17 00:00:00 2001 From: Xavier Geerinck Date: Mon, 16 Nov 2020 11:59:03 +0100 Subject: [PATCH 2/3] Add to changelog Signed-off-by: Xavier Geerinck --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5c58175825c..26181037298 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,8 @@ ## Unreleased +- Bug fix in aws_iam_authorization to utilize correct secret from env key name ([PR #1332](https://github.com/kedacore/keda/pull/1332)) + ### New ### Improvements From ea07e9e5d2c764867c59c6c44cf7ed8cdda4fe6b Mon Sep 17 00:00:00 2001 From: Xavier Geerinck Date: Mon, 16 Nov 2020 12:47:12 +0100 Subject: [PATCH 3/3] Move to correct section Signed-off-by: Xavier Geerinck --- CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 26181037298..6ce2f3f2991 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,12 +16,12 @@ ## Unreleased -- Bug fix in aws_iam_authorization to utilize correct secret from env key name ([PR #1332](https://github.com/kedacore/keda/pull/1332)) - ### New ### Improvements +- Bug fix in aws_iam_authorization to utilize correct secret from env key name ([PR #1332](https://github.com/kedacore/keda/pull/1332)) + ### Breaking Changes ### Other