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

Adds support for new Rekor 'dsse' entry type #527

Merged
merged 7 commits into from
Jun 5, 2023

Conversation

bobcallaway
Copy link
Member

Summary

This add support for uploading Rekor entries about DSSE envelope-based attestations using the new dsse type added in sigstore/rekor#1487.

This PR builds on #525 (given the codegen changes can not be cleanly separated).

Release Note

  • Adds support for uploading entries to Rekor using dsse pluggable type

part of #526

Signed-off-by: Bob Callaway <bcallaway@google.com>
@bobcallaway bobcallaway requested a review from a team as a code owner May 29, 2023 00:22
@changeset-bot
Copy link

changeset-bot bot commented May 29, 2023

🦋 Changeset detected

Latest commit: 83a38ea

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@sigstore/rekor-types Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Signed-off-by: Bob Callaway <bobcallaway@users.noreply.github.com>
Copy link
Collaborator

@bdehamer bdehamer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bobcallaway I'd like to do try generating/verifying some bundles with the new DSSE Rekor type -- has the build with the DSSE type been deployed to production yet?

Before I merge this, I'm going to add some unit tests around the new verification code as well.

Comment on lines 146 to 150
// Collect all of the signatures from the tlog entry
// Remember that tlog signatures are double base64-encoded
const tlogSigs = tlogEntry.spec.signatures?.map((signature) =>
signature.signature ? enc.base64Decode(signature.signature) : ''
);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this comment about the double base64 encoding still true for the DSSE type?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did a test in staging and I don't think we need to decode the signature at all here. The sig value from the DSSE envelope above is b64 encoded which should then match the value we pull from the tlog entry here.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do you have docs somewhere on how to target staging with the client? I had to make several code changes when I was doing that.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a new CLI in the "packages/cli" directory which supports a flag for overriding the rekor URL. From the root of the project you can do:

./packages/cli/bin/dev attest --help

That should show you the various flags

bobcallaway and others added 4 commits June 1, 2023 13:33
Signed-off-by: Bob Callaway <bcallaway@google.com>
Signed-off-by: Bob Callaway <bcallaway@google.com>
Signed-off-by: Brian DeHamer <bdehamer@github.com>
Copy link
Collaborator

@bdehamer bdehamer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a unit test for verifying the dsse TLog type. Thanks again @bobcallaway for tackling this.

@bdehamer bdehamer merged commit 16de8c7 into sigstore:main Jun 5, 2023
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

Successfully merging this pull request may close these issues.

2 participants