zenml icon indicating copy to clipboard operation
zenml copied to clipboard

[FEATURE]: Allow secrets to be created by passing dicts or JSON values

Open strickvl opened this issue 3 years ago • 12 comments
trafficstars

Contact Details [Optional]

[email protected]

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.

strickvl avatar May 23 '22 12:05 strickvl

Hello @strickvl please i would like to work on this issue

Tob-iee avatar Jun 14 '22 11:06 Tob-iee

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.

strickvl avatar Jun 14 '22 11:06 strickvl

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.

Tob-iee avatar Jun 14 '22 11:06 Tob-iee

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?

strickvl avatar Jun 14 '22 11:06 strickvl

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

Tob-iee avatar Jun 14 '22 11:06 Tob-iee

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.)

strickvl avatar Jun 14 '22 11:06 strickvl

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?

Tob-iee avatar Jun 14 '22 12:06 Tob-iee

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.

strickvl avatar Jun 14 '22 13:06 strickvl

Hello, @strickvl please can you check on the slack when you have time

Tob-iee avatar Jun 17 '22 09:06 Tob-iee

Hi I don't see any messages from you. You're posting in the ZenML slack?

strickvl avatar Jun 17 '22 10:06 strickvl

Yea, It's a DM on ZenML slack

Tob-iee avatar Jun 17 '22 10:06 Tob-iee

ScreenShot 2022-06-17 at 12 35 07

strickvl avatar Jun 17 '22 10:06 strickvl

@strickvl is this still open? looking for a good spot to start contributing

testdepth avatar Oct 25 '22 01:10 testdepth

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.

strickvl avatar Oct 25 '22 10:10 strickvl

@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.

stefannica avatar Feb 22 '23 08:02 stefannica