-
Notifications
You must be signed in to change notification settings - Fork 658
Add Rekor v2 support for trusted-root create #4242
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
Conversation
|
Can you run |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4242 +/- ##
==========================================
- Coverage 40.10% 34.37% -5.73%
==========================================
Files 155 211 +56
Lines 10044 14060 +4016
==========================================
+ Hits 4028 4833 +805
- Misses 5530 8614 +3084
- Partials 486 613 +127 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
I'm not seeing anything different with file creation, I wonder if the windows test is a flake. |
|
Looks like it's not a flake, I'd add additional logging to determine where it's failing. Windows paths are fun. |
|
|
||
| trustedrootCreate := CreateCmd{ | ||
| CertChain: []string{fulcioChainPath}, | ||
| RekorKeyPath: []string{rekorV1KeyPath, rekorV2KeyPath + ":rekor.server"}, |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
f174358 to
36d6da0
Compare
When deducing the Rekor log key ID, cosign universally assumes a Rekor v1 type checkpoint, which is not C2SP compliant. Rekor v2 is compliant for all different types of keys, which means the log ID must be calculated differently. This affects the `trusted-root create` tool which must generate the log ID from the public key. This change adds the ability for the trusted-root command to parse a ":" in the --rekor-key flag to indicate that the trusted material should be generated for a Rekor v2 log and that the origin string following the ":" should be used to calculate it. This is backwards compatible and will not affect Rekor v1 which needs no origin string. This addresses the issue strictly for this command so that trusted_root files can be created for Rekor v2 servers. A later change will make more general changes to the TUF client to ensure the trusted material is generated properly for the server it relates to. Signed-off-by: Colleen Murphy <[email protected]>
This MR contains the following updates: | Package | Update | Change | |---|---|---| | [cosign](https://github.com/sigstore/cosign) | patch | `2.5.0` -> `2.5.1` | MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot). **Proposed changes to behavior should be submitted there as MRs.** --- ### Release Notes <details> <summary>sigstore/cosign (cosign)</summary> ### [`v2.5.1`](https://github.com/sigstore/cosign/blob/HEAD/CHANGELOG.md#v251) [Compare Source](sigstore/cosign@v2.5.0...v2.5.1) #### Features - Add Rekor v2 support for trusted-root create ([#​4242](sigstore/cosign#4242)) - Add baseUrl and Uri to trusted-root create command - Upgrade to TUF v2 client with trusted root - Don't verify SCT for a private PKI cert ([#​4225](sigstore/cosign#4225)) - Bump TSA library to relax EKU chain validation rules ([#​4219](sigstore/cosign#4219)) #### Bug Fixes - Bump sigstore-go to pick up log index=0 fix ([#​4162](sigstore/cosign#4162)) - remove unused recursive flag on attest command ([#​4187](sigstore/cosign#4187)) #### Docs - Fix indentation in `verify-blob` cmd examples ([#​4160](sigstore/cosign#4160)) #### Releases - ensure we copy the latest tags on each release ([#​4157](sigstore/cosign#4157)) #### Contributors - arthurus-rex - Babak K. Shandiz - Bob Callaway - Carlos Tadeu Panato Junior - Colleen Murphy - Dmitry Savintsev - Emmanuel Ferdman - Hayden B - Ville Skyttä </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever MR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this MR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box --- This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MC41Ny4xIiwidXBkYXRlZEluVmVyIjoiNDAuNTcuMSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiUmVub3ZhdGUgQm90Il19-->
When deducing the Rekor log key ID, cosign universally assumes a Rekor v1 type checkpoint, which is not C2SP compliant. Rekor v2 is compliant for all different types of keys, which means the log ID must be calculated differently. This affects the
trusted-root createtool which must generate the log ID from the public key. This change adds the ability for the trusted-root command to parse a ":" in the --rekor-key flag to indicate that the trusted material should be generated for a Rekor v2 log and that the origin string following the ":" should be used to calculate it. This is backwards compatible and will not affect Rekor v1 which needs no origin string.This addresses the issue strictly for this command so that trusted_root files can be created for Rekor v2 servers. A later change will make more general changes to the TUF client to ensure the trusted material is generated properly for the server it relates to.
Summary
Release Note
Added support in
cosign trusted-root createfor generating a transparency log trusted root entry with a C2SP-conformant key ID, which is required for use with Rekor v2. Use--rekor-key=</path/to/key>,<server-name>to get key material for this kind of transparency log.Documentation