-
Notifications
You must be signed in to change notification settings - Fork 547
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
Support fetching a Fulcio certificate with a managed key #2398
Comments
Hi, I'm new to sigstore and I recently submitted the first PR #2500. I was wondering if this bug is available to work? I have a question too. Fulcio as a CA takes in a certificate and an OIDC token and returns a signed certificate. So I'm not sure what |
I would recommend reading the attached blogpost for context. This change is to support using a provided key when certifying it with Fulcio, rather than Cosign generating an ephemeral key. You won’t add additional flags for passing the key, we have existing ones, and you won’t add flags for passing the certificate because it would be generated by fulcio. You only need a flag to signal that you want to fetch a certificate when providing a key. |
Thanks. I had read the blogspot already. But had some confusion about about Fulcio. Based on my investigation, it looks like We can leverage these flags and also we have a helper function to fetch code signing certificate - https://github.com/sigstore/cosign/blob/main/cmd/cosign/cli/fulcio/fulcio.go#L95. Does this sound good ? |
The existing flags all serve other purposes, for example the one you linked is for fetching the OIDC token. This request is for changing the behavior of this function, called from sign CLIs like this. You shouldn't need to call I would recommend the following changes:
Does that sound good? Feel free to make any changes if you see a cleaner way to do the refactor! |
Description
Currently, if you provide a key, this implies that you don't want to use Fulcio. Even if you specify
COSIGN_EXPERIMENTAL
, the presence of the key flag will take priority.As per https://blog.sigstore.dev/adopting-sigstore-incrementally-1b56a69b8c15, one of the incremental options was to provide a key, but still get a code signing certificate and upload to the transparency log. This is currently not supported. The simplest way I can think of to implement this is to simply add another flag, something like
issue-certificate
, that will fetch a certificate and include it when uploading to the log and creating the OCI annotations.In combination with #2397, the incremental approaches would then look like:
cosign import-key-pair --key key.pem
, andcosign sign --key cosign.key artifact-path
cosign sign --key cosign.key --tlog-upload artifact-path
cosign sign --key cosign.key --tlog-upload --issue-certificate artifact-path
cc @asraa @priyawadhwa
The text was updated successfully, but these errors were encountered: