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

Cosign / rpm integrations meta-issue #3523

Open
lkatalin opened this issue Feb 5, 2024 · 3 comments
Open

Cosign / rpm integrations meta-issue #3523

lkatalin opened this issue Feb 5, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@lkatalin
Copy link
Contributor

lkatalin commented Feb 5, 2024

This issue is meant to capture what integrations between cosign/keyless signatures/rekor and RPMs are desired by the community. Some of these may eventually become enhancement requests either in this repo or others, but having a central place to discuss first seems beneficial as they are interrelated.

The unmet use cases I'm aware of so far are:

  • I have an RPM with an embedded GPG signature and I would like to verify that signature with cosign verify
  • I would like to be able to use either cosign or rpm to sign an RPM keylessly and embed that signature into the RPM, then be able to verify this with both cosign verify and rpm/dnf tools
  • During my build process, I would like to create an embedded signature for an RPM and push the signing metadata to Rekor, without needing to send the entire RPM to Rekor and without needing to use custom tooling beyond Sigstore or rpm tools

Currently supported use cases:

  • I can use cosign sign to sign over an entire RPM as a blob and cosign will upload the signing metadata to Rekor as a hashedrekord type (this ignores the RPM's embedded signature). I can also verify the signature on this blob with cosign verify.
  • I can use rpm tools to sign an RPM with GPG, and then separately upload the signing metadata to Rekor either manually or using custom-built tooling. I cannot verify the embedded GPG signature with cosign verify, and I must separately validate the Rekor entry using the rekor-cli in addition to validating the embedded signature with rpm tools.
    • The signing metadata can use either Rekor's rpm type, which involves sending the entire RPM to Rekor. At signing time, Rekor is able to parse the RPM and validate and embedded RPM signature server-side.
    • Alternatively, the signing metadata can use Rekor's hashedrekord type, which avoids sending the entire RPM to Rekor but means that the signature and signed header must be parsed out with some custom tooling before being sent to Rekor.

Meanwhile, the gaps currently are:

  • There isn't support in rpm / dnf (the tools) or in the RPM spec for cosign's keyless signatures
  • There isn't support in rpm / dnf (the tools) for interacting with a transparency log
  • There isn't support in cosign for handling embedded RPM signatures (although there is in Rekor)
  • Rekor's logic for verifying embedded RPM signatures occurs server-side, which is suboptimal for performance
  • Cosign does not support GPG, which is the current format for embedded RPM signatures

cosign verify's ability to implement support for embedded RPM signatures depends on either RPM support for keyless signatures or cosign support for GPG. While the Sigstore community is generally moving away from GPG, it could be useful to offer support for GPG in order to facilitate a transition to Sigstore for ecosystems that are traditionally tightly tied to GPG, such as RPM.

Additionally, having the ability to create and/or verify an RPM signature client-side at the time of signing/upload, both in cosign and rekor-cli, would also enable signers to push signing metadata to Rekor during an RPM build without sending the whole RPM to the Rekor server, which would solve a significant blocker as sending this large amount of data is costly.

It would be great to gather more thoughts here on these options or any other related concerns.

cc @dmitris @zhaoyonghe

@lkatalin lkatalin added the enhancement New feature or request label Feb 5, 2024
@viveksahu26
Copy link
Contributor

Should we considered this issue as part of it.

@haydentherapper
Copy link
Contributor

From the Rekor side, there's a few open issues related to rpm support:

@pmatilai
Copy link

pmatilai commented Apr 5, 2024

Rpm supports V4 PGP just fine, see sigstore/rekor#286 (comment) for a longer reply on that.

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

No branches or pull requests

4 participants