-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Allow workers to pass an API key to flow runs that is different from their own #10717
Comments
Thanks for the issue @EmilRex! This is possible by setting |
That would work great if that's possible! I know we are doing some manipulation of env and wasn't 100% sure if we overwrite |
Discussing with the team and a few customers to get more details, I think this is a pretty strong / urgent requirement for them to be capable of delivering / executing this work in production, and would be a very hard stop / do not pass go situation if it was not available. Ideally, I think what should be possible is the ability to specify / pass a reference to a If there was an option / toggle on the prefect worker side to say "inherit the worker key" or alternatively "reference this k8s secret api key", I think that might be a solution? |
@EmilRex , @desertaxle - Just to confirm and verify - I tested adding an environment reference in the job template. |
Chiming in from the customer side, we have a critical need to not use plain text secrets (#10716) and so if we were able to say "If there was an option / toggle on the prefect worker side to say "inherit the worker key" or alternatively "reference this k8s secret api key"" instead of including the plain text worker api key, that would be a big win. Ideally I'd like to use a k8s secret, similar to what I am doing with the worker secret, rather than a secret block. |
@prefectcboyd I have a fix for the issue you're seeing in PrefectHQ/prefect-kubernetes#94. I believe merging and releasing that PR will allow us to resolve this issue. |
First check
Prefect Version
2.x
Describe the current behavior
When creating a new flow run, workers inject their own api key into the flow run's environment. This means that the flow run always has the same permissions as the worker.
Describe the proposed behavior
In cases where workers and flow runs should have different permissions, it would be great if you could specify an api key for the flow run to use that is different from the worker api key.
Example Use
No response
Additional context
I'm not sure how this would be implemented, but one consideration is how environment variables are handled - especially
PREFECT_
environment variables. If there was greater control over how environment variables are populated in infrastructures, this feature would likely be easier to support.The text was updated successfully, but these errors were encountered: