Skip to content
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

Extracting CLI signing functionality to be more configurable as a library function #657

Closed
DennyHoang opened this issue Sep 13, 2021 · 4 comments

Comments

@DennyHoang
Copy link
Contributor

Description
While using cosign as a library, I found that the cli.SignCmd does all the logic that I would require for signing myself, however, it is designed for CLI usage with particular assumptions. One such assumption is that it uses the default keychain. I would like to be able to change the keychain used without having to duplicate the whole function in my own codebase with that one line change and having to maintain it whenever the function changes in the upstream.

I was wondering if there was a design decision made regarding this current implementation or would it be valid to extract this logic out of the CLI portion to be more generic and/or configurable as a library function?

@mattmoor
Copy link
Member

It also pulls in a LOT of dependencies 😅

@imjasonh
Copy link
Member

imjasonh commented Oct 1, 2021

Is this a duplicate of #666? Now that #666 is closed (after a bunch of work), is there anything else that needs to be done to close this one?

The specific issue of being able to specify a keychain should be resolved with ociremote.WithRemoteOptions(remote.WithAuthFromKeychain(myKeychain)).

@mattmoor
Copy link
Member

mattmoor commented Oct 1, 2021

I think the next level of stuff is going to be pushing some of the signing (and verification) stuff into different packages, which compose nicely with the pkg/oci stuff.

@DennyHoang
Copy link
Contributor Author

Stale/outdated issue, closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants