-
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
Keda TriggerAuthentication Vault service account token request #6153
Comments
Hello |
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. |
rm stale Still planning on implementing this when i get a chance |
This issue has been automatically closed due to inactivity. |
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. |
Proposal
Currently TriggerAuthentication/ClusterTriggerAuthentication supports authentication using the serviceAccount of keda containers;
ex
Proposal to use the service account (via token request) of the namespace that the TriggerAuthentication is deployed to instead so that permissions can be scoped on a per-namespace level;
ex:
Use-Case
Usually the way I've seen vault setup is where vault secrets are bound to the namespace of the service account that's logged into vault;
The current configuration leads to a design where users have to grant overly permissive permissions on keda service accounts to vault;
The
keda-operator
role needs to be configured in a way that grants permissions to read ALL secrets that keda uses; But this means thatkeda-operator
permissions are too permissive;for example lets say we have 10 projects that leverage kafka autoscaling (w/credentials) that are deployed in 10 different namespaces;
With the existing setup when the
keda-operator
service account token authenticates to vault, it needs to be configured so that it can access credentials for all the 10 projects; Meaning that credentials can be accessed across namespaces;If we were to leverage token requests across namespaces for vault authentication, then permissions can be granted on a per-namespace level;
ex;
default
service account innamespace1
can only read credentials forkafka1
Is this a feature you are interested in implementing yourself?
Yes
Anything else?
vault-secrets-webhook does something similar that we could implement; https://github.com/bank-vaults/vault-secrets-webhook/blob/783c8b96966bfeaf3dca9cf3de622ce5f0cffdc6/pkg/webhook/webhook.go#L231-L265
I'm proposing to change it from:

Before:
After:

The text was updated successfully, but these errors were encountered: