zenml
zenml copied to clipboard
[FEATURE]: Allow secrets to be created by passing dicts or JSON values
Contact Details [Optional]
Describe the feature you'd like
We currently allow for the registration of secrets via an interactive CLI process, or by passing a single secret_key and secret_value pair as options.
We would like to enable users to pass in a dict or perhaps a JSON object containing multiple key-value pairs.
This issue might require some discussion prior to implementation.
This is the part of the codebase where this applies.
Is your feature request related to a problem?
No response
How do you solve your current problem with the current status-quo of ZenML?
Feature currently isn't possible.
Any other comments?
This applies to #ENG-725.
Hello @strickvl please i would like to work on this issue
Sounds good, @Tob-iee. Is everything clear in terms of how you think you'd go about implementing it? I assume you'll reference the local secrets manager when you work on this?
Also, please do make sure you add some tests to cover these changes if you do go ahead with this!
The rest of our processes etc for contributions is described here.
I was hoping to have a discussion about it prior to its implementation as stated in the description to help clarify things for me. Hope that will be possible.
Yes of course. Maybe we could start with your understanding of the problem / what needs doing? Or is the description unclear and you'd want me to explain more?
From what I can understand, we want to enable the function to take in a Dict/JSON datatype as its input parameter for the "secret_key" and "secret_value" as one rather than passing two separate str data types for each of them. But one question I have here is that would it still be an Interactive CLI after this implementation
I think there would be no need for the interactive part once you are passing in a dict or JSON. You can see the final clause of the condition here on line 137 only runs if no other values have been passed in.
I think, however, we should only allow one way of passing these in per function call. i.e. you shouldn't be able to pass in secret key and secret values to the CLI as well as passing in a JSON or dict. You basically have to choose one of them. (And we'd need some checks, error logging and tests as appropriate to guard against those cases/behaviours.)
Okay, I understand better now, if I face any blocker I'll be sure to reach out. but just to be clear on something, the secrets in question here will be used by zenML CLI for access right?
The secrets get used by our Secrets Manager stack component. You can read more about it here and also check out the practical example here.
Hello, @strickvl please can you check on the slack when you have time
Hi I don't see any messages from you. You're posting in the ZenML slack?
Yea, It's a DM on ZenML slack

@strickvl is this still open? looking for a good spot to start contributing
Thanks for asking, @testdepthanalytics! I'm unsure of the status of this on the side of @Tob-iee. (Are you still working on it, @Tob-iee?)
I'll also take a look to see if there are any other issues that we have available currently and add them to the issues board as appropriate.
@Tob-iee @testdepthanalytics , if you're still interested in this issue, we changed the problem statement a bit to reflect the fact that we're phasing out secrets managers in favor of the centralized secrets store. The feature described here hasn't changed, it just refers now to a different CLI command.