-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ClusterTriggerAuthentication does not work with namespaced authenticationRef #4893
Comments
seems related (but not duplicate of): edit |
Hi Could you share the object where you use the ClusterTriggerAuthentication? (ScaledObject|ScaledJob) I think that the problem here is a mismatch or expectations, ClusterTriggerAuthentication isn't something like a template that can be reused wherever, it's a unique resource shared across the whole cluster. Due to this, we have to read the secret from somewhere, and in this case is the namespace where KEDA is deployed. If you place your secrets in that namespace, can use the ClusterTriggerAutentication in the whole cluster, using the secret placed in the namespace where KEDA is deployed. |
I think there's some confusion as for the issue. I have a secret named edit |
I'll duplicate the secret in the keda namespace as a workaround, but if this could be implemented in any sort of way it would be great. @JorTurFer should I change this in to a feature request instead of a bug? |
I don't think that is something to do due to the security implications that it has as commented above. It can be used to ignore RBAC and discover secret information. but let's see other opinions |
I'm going to proceed and close this issue, but hopefully it can be reopened again once relevant. This PR was opened under the wrong premise that Kubernetes RBAC allowed to grant access to specific namespaced resources by name. Seeing now that this is currently not supported - the suggested solution does become a security risk as suggested by @JorTurFer. Since this limitation is unlikely to change, as described in this PR and this PR I see no reason to keep this open. Thank you for your help in reviewing this request :) |
Report
Background
I'm trying to implement Keda to scale a deployment that has multiple instances across multiple namespaces. In order to not duplicate the authentication trigger I want to create a cluster trigger authentication which uses a secret to set the auth header and value.
Manifest used
Expected Behavior
Keda will create a ClusterTriggerAuthentication resource which is usable in all namespaces
Actual Behavior
ClusterTriggerAuthentication looks for the secret in kube-system namespace and is unable to find the secret since it is created in a different namespace and no parameter is accepted in schema to pass namespace.
This causes the below err in scaledObject:
This behavior was verified by replacing
ClusterTriggerAuthentication
withTriggerAuthentication
as follows:Which does work.
Steps to Reproduce the Problem
Logs from KEDA operator
KEDA Version
2.11.2
Kubernetes Version
1.27
Platform
Amazon Web Services
Scaler Details
Prometheus scaler
Anything else?
No response
The text was updated successfully, but these errors were encountered: