sigstore / scaffolding

Stuff to make standing up sigstore (esp. for testing) easier for e2e/integration testing.
Apache License 2.0
57 stars 54 forks source link

Support trusted root TUF target #1001

Open haydentherapper opened 4 months ago

haydentherapper commented 4 months ago

Description

Copied from https://sigstore.slack.com/archives/C049ALX6Q83/p1709072587850229

tl;dr - Sigstore TUF metadata has evolved, but Cosign and Scaffolding are lagging behind. We need to start ingesting the new format so we can fully deprecate the old format.

For some context, a history of Sigstore TUF targets:

Note that Cosign used to be the only Sigstore client, but now we've got Sigstore clients, and now also TUF clients, in a bunch of languages. Each of these newer clients has carefully followed the spec. There is a rewrite of the Go TUF client which aims to fix any spec deviations and API issues. We now have a Go Sigstore TUF client that uses the new API that has support for the trusted root metadata - https://github.com/sigstore/sigstore-go/tree/main/pkg/tuf.

Also note that all other clients besides Cosign (namely sigstore-python, -js, and -java, and -rs soon) are reading the trusted root file already.

So what do we need to do to get Golang Sigstore repos, namely Cosign and Scaffolding, up to date?

cc @sabre1041 @lkatalin

haydentherapper commented 4 months ago

https://github.com/sigstore/cosign/issues/3548 tracks the change in Cosign

This issue can track what's needed in Scaffolding. https://github.com/kommendorkapten/trtool/blob/main/cmd/trtool/app/initroot.go might be a place to start for code to generate a trusted root. We need to update target generation to generate a trusted root in addition to the individual targets. Note that if we jump straight to only generating the trusted root file, we'll need to have Cosign updated first.