You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Getting "api error UnrecognizedClientException: The security token included in the request is invalid." when I try to use AWS Secret Manager TriggerAuthentication with credentials accessKey and accessSecretKey.
I am trying cross account, AWS secrets manager is in different account and keda operator is in different AWS account
Expected Behavior
TriggerAuthentication awsSecretManager should be able to create valid TriggerAuthentication object and should be able to pass required parameters to Scaledobject using valid accessKey and accessSecretKey
Actual Behavior
TriggerAuthentication awsSecretManager is not able to get secrets from AWS secret manager .Keda operator is throwing below error.
ERROR scale_handler error trying to read secret from Aws Secret Manager {"type": "ScaledObject", "namespace": "", "name": "keda-postgresql", "triggerAuthRef.Name": "sample-aws-sm-int", "secret.Name": "keda-int", "secret.Version": "", "secret.VersionStage": "", "error": "operation error Secrets Manager: GetSecretValue, https response error StatusCode: 400, RequestID: , api error UnrecognizedClientException: The security token included in the request is invalid."}
Steps to Reproduce the Problem
1.Create k8s secret. All data values are base64 encoded before creating k8s secret.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.
stalebot
added
the
stale
All issues that are marked as stale due to inactivity
label
Aug 31, 2024
Report
Getting "api error UnrecognizedClientException: The security token included in the request is invalid." when I try to use AWS Secret Manager TriggerAuthentication with credentials accessKey and accessSecretKey.
I am trying cross account, AWS secrets manager is in different account and keda operator is in different AWS account
Expected Behavior
TriggerAuthentication awsSecretManager should be able to create valid TriggerAuthentication object and should be able to pass required parameters to Scaledobject using valid accessKey and accessSecretKey
Actual Behavior
TriggerAuthentication awsSecretManager is not able to get secrets from AWS secret manager .Keda operator is throwing below error.
ERROR scale_handler error trying to read secret from Aws Secret Manager {"type": "ScaledObject", "namespace": "", "name": "keda-postgresql", "triggerAuthRef.Name": "sample-aws-sm-int", "secret.Name": "keda-int", "secret.Version": "", "secret.VersionStage": "", "error": "operation error Secrets Manager: GetSecretValue, https response error StatusCode: 400, RequestID: , api error UnrecognizedClientException: The security token included in the request is invalid."}
Steps to Reproduce the Problem
1.Create k8s secret. All data values are base64 encoded before creating k8s secret.
2.Create TriggerAuthentication
3.Create ScaledObject
Logs from KEDA operator
2024-07-02T09:26:52Z INFO Creating a new HPA {"controller": "scaledobject", "controllerGroup": "keda.sh", "controllerKind": "ScaledObject", "ScaledObject": {"name":"keda-postgresql","namespace":""}, "namespace": "", "name": "keda-postgresql", "reconcileID": "", "HPA.Namespace": "", "HPA.Name": ""}
2024-07-02T09:26:52Z ERROR scale_handler Error getting credentials {"type": "ScaledObject", "namespace": "", "name": "keda-postgresql", "error": "operation error Secrets Manager: GetSecretValue, https response error StatusCode: 400, RequestID: , api error UnrecognizedClientException: The security token included in the request is invalid."}
github.com/kedacore/keda/v2/pkg/scaling/resolver.(*AwsSecretManagerHandler).Read
/workspace/pkg/scaling/resolver/aws_secretmanager_handler.go:60
github.com/kedacore/keda/v2/pkg/scaling/resolver.resolveAuthRef
/workspace/pkg/scaling/resolver/scale_resolvers.go:344
github.com/kedacore/keda/v2/pkg/scaling/resolver.ResolveAuthRefAndPodIdentity
/workspace/pkg/scaling/resolver/scale_resolvers.go:183
github.com/kedacore/keda/v2/pkg/scaling.(*scaleHandler).buildScalers.func1
/workspace/pkg/scaling/scalers_builder.go:72
github.com/kedacore/keda/v2/pkg/scaling.(*scaleHandler).buildScalers
/workspace/pkg/scaling/scalers_builder.go:96
github.com/kedacore/keda/v2/pkg/scaling.(*scaleHandler).performGetScalersCache
/workspace/pkg/scaling/scale_handler.go:357
github.com/kedacore/keda/v2/pkg/scaling.(*scaleHandler).GetScalersCache
/workspace/pkg/scaling/scale_handler.go:282
github.com/kedacore/keda/v2/controllers/keda.(*ScaledObjectReconciler).getScaledObjectMetricSpecs
/workspace/controllers/keda/hpa.go:217
github.com/kedacore/keda/v2/controllers/keda.(*ScaledObjectReconciler).newHPAForScaledObject
/workspace/controllers/keda/hpa.go:72
github.com/kedacore/keda/v2/controllers/keda.(*ScaledObjectReconciler).createAndDeployNewHPA
/workspace/controllers/keda/hpa.go:45
github.com/kedacore/keda/v2/controllers/keda.(*ScaledObjectReconciler).ensureHPAForScaledObjectExists
/workspace/controllers/keda/scaledobject_controller.go:441
github.com/kedacore/keda/v2/controllers/keda.(*ScaledObjectReconciler).reconcileScaledObject
/workspace/controllers/keda/scaledobject_controller.go:280
github.com/kedacore/keda/v2/controllers/keda.(*ScaledObjectReconciler).Reconcile
/workspace/controllers/keda/scaledobject_controller.go:191
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Reconcile
/workspace/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:119
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler
/workspace/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:316
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem
/workspace/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:266
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2
/workspace/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:227
2024-07-02T09:26:52Z ERROR scale_handler error trying to read secret from Aws Secret Manager {"type": "ScaledObject", "namespace": "", "name": "keda-postgresql", "triggerAuthRef.Name": "sample-aws-sm-int", "secret.Name": "keda-int", "secret.Version": "", "secret.VersionStage": "", "error": "operation error Secrets Manager: GetSecretValue, https response error StatusCode: 400, RequestID: , api error UnrecognizedClientException: The security token included in the request is invalid."}
github.com/kedacore/keda/v2/pkg/scaling/resolver.resolveAuthRef
/workspace/pkg/scaling/resolver/scale_resolvers.go:346
github.com/kedacore/keda/v2/pkg/scaling/resolver.ResolveAuthRefAndPodIdentity
/workspace/pkg/scaling/resolver/scale_resolvers.go:183
github.com/kedacore/keda/v2/pkg/scaling.(*scaleHandler).buildScalers.func1
/workspace/pkg/scaling/scalers_builder.go:72
github.com/kedacore/keda/v2/pkg/scaling.(*scaleHandler).buildScalers
/workspace/pkg/scaling/scalers_builder.go:96
github.com/kedacore/keda/v2/pkg/scaling.(*scaleHandler).performGetScalersCache
/workspace/pkg/scaling/scale_handler.go:357
github.com/kedacore/keda/v2/pkg/scaling.(*scaleHandler).GetScalersCache
/workspace/pkg/scaling/scale_handler.go:282
github.com/kedacore/keda/v2/controllers/keda.(*ScaledObjectReconciler).getScaledObjectMetricSpecs
/workspace/controllers/keda/hpa.go:217
github.com/kedacore/keda/v2/controllers/keda.(*ScaledObjectReconciler).newHPAForScaledObject
/workspace/controllers/keda/hpa.go:72
github.com/kedacore/keda/v2/controllers/keda.(*ScaledObjectReconciler).createAndDeployNewHPA
/workspace/controllers/keda/hpa.go:45
github.com/kedacore/keda/v2/controllers/keda.(*ScaledObjectReconciler).ensureHPAForScaledObjectExists
/workspace/controllers/keda/scaledobject_controller.go:441
github.com/kedacore/keda/v2/controllers/keda.(*ScaledObjectReconciler).reconcileScaledObject
/workspace/controllers/keda/scaledobject_controller.go:280
github.com/kedacore/keda/v2/controllers/keda.(*ScaledObjectReconciler).Reconcile
/workspace/controllers/keda/scaledobject_controller.go:191
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Reconcile
/workspace/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:119
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler
/workspace/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:316
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem
/workspace/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:266
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2
/workspace/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:227
2024-07-02T09:26:52Z ERROR scale_handler Error getting credentials {"type": "ScaledObject", "namespace": "", "name": "keda-postgresql", "error": "operation error Secrets Manager: GetSecretValue, https response error StatusCode: 400, RequestID: , api error UnrecognizedClientException: The security token included in the request is invalid."}
github.com/kedacore/keda/v2/pkg/scaling/resolver.(*AwsSecretManagerHandler).Read
/workspace/pkg/scaling/resolver/aws_secretmanager_handler.go:60
github.com/kedacore/keda/v2/pkg/scaling/resolver.resolveAuthRef
/workspace/pkg/scaling/resolver/scale_resolvers.go:344
github.com/kedacore/keda/v2/pkg/scaling/resolver.ResolveAuthRefAndPodIdentity
/workspace/pkg/scaling/resolver/scale_resolvers.go:183
github.com/kedacore/keda/v2/pkg/scaling.(*scaleHandler).buildScalers.func1
/workspace/pkg/scaling/scalers_builder.go:72
github.com/kedacore/keda/v2/pkg/scaling.(*scaleHandler).buildScalers
/workspace/pkg/scaling/scalers_builder.go:96
github.com/kedacore/keda/v2/pkg/scaling.(*scaleHandler).performGetScalersCache
/workspace/pkg/scaling/scale_handler.go:357
github.com/kedacore/keda/v2/pkg/scaling.(*scaleHandler).GetScalersCache
/workspace/pkg/scaling/scale_handler.go:282
github.com/kedacore/keda/v2/controllers/keda.(*ScaledObjectReconciler).getScaledObjectMetricSpecs
/workspace/controllers/keda/hpa.go:217
github.com/kedacore/keda/v2/controllers/keda.(*ScaledObjectReconciler).newHPAForScaledObject
/workspace/controllers/keda/hpa.go:72
github.com/kedacore/keda/v2/controllers/keda.(*ScaledObjectReconciler).createAndDeployNewHPA
/workspace/controllers/keda/hpa.go:45
github.com/kedacore/keda/v2/controllers/keda.(*ScaledObjectReconciler).ensureHPAForScaledObjectExists
/workspace/controllers/keda/scaledobject_controller.go:441
github.com/kedacore/keda/v2/controllers/keda.(*ScaledObjectReconciler).reconcileScaledObject
/workspace/controllers/keda/scaledobject_controller.go:280
github.com/kedacore/keda/v2/controllers/keda.(*ScaledObjectReconciler).Reconcile
/workspace/controllers/keda/scaledobject_controller.go:191
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Reconcile
/workspace/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:119
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler
/workspace/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:316
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem
/workspace/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:266
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2
/workspace/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:227
KEDA Version
2.13.0
Kubernetes Version
1.28
Platform
Amazon Web Services
Scaler Details
postgresql
Anything else?
No response
The text was updated successfully, but these errors were encountered: