Skip to content

Adding trusted-root subcommand to attestation - #9178

Closed
steiza wants to merge 6 commits into
trunkfrom
attestation-get-trust-root
Closed

steiza wants to merge 6 commits into
trunkfrom
attestation-get-trust-root

Conversation

@steiza

@steiza steiza commented Jun 6, 2024

Copy link
Copy Markdown
Contributor

For use in upcoming docs on how to do offline verification with artifact attestations.

When you use gh attestation verify, it contacts GitHub services to get the keys needed to perform the verification (often called the trusted root). But if you're doing offline verification, you need to provide the trusted root manually. This subcommand makes it much easier for artifact attestation users to get the trusted root file they need for offline verification.

For use in upcoming docs on how to do offline verification with artifact
attestations.

Signed-off-by: Zach Steindler <[email protected]>
@steiza
steiza requested a review from a team as a code owner June 6, 2024 13:18
@cliAutomation cliAutomation added the external pull request originating outside of the CLI core team label Jun 6, 2024
@cliAutomation

Copy link
Copy Markdown
Contributor

Hi! Thanks for the pull request. Please ensure that this change is linked to an issue by mentioning an issue number in the description of the pull request. If this pull request would close the issue, please put the word 'Fixes' before the issue number somewhere in the pull request body. If this is a tiny change like fixing a typo, feel free to ignore this message.

Comment thread pkg/cmd/attestation/trustedroot/trustedroot.go Outdated
Signed-off-by: Zach Steindler <[email protected]>
Comment thread pkg/cmd/attestation/trustedroot/trustedroot.go Outdated

@malancas malancas left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good to me. The private and public flags are simply named but the included command documentation makes sense.

So supplying a custom trusted root works with Sigstore public good
instance and GitHub's instance

Signed-off-by: Zach Steindler <[email protected]>
Comment thread pkg/cmd/attestation/verification/sigstore.go
Comment thread pkg/cmd/attestation/verification/sigstore.go
Signed-off-by: Zach Steindler <[email protected]>
@williammartin
williammartin self-requested a review June 7, 2024 13:53
Long: heredoc.Docf(`
### NOTE: This feature is currently in beta, and subject to change.

Get a trusted_root.json file, likely for offline verification.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

One thing that I don't think is clear with this command versus the (now removed) tuf-root-verify command is the intent. The tuf-root-verify command is about ensuring that the published tuf repository is not compromised, i.e by providing the root.json oob any client can verify this. While that is still possible with this command, I don't think it's obvious, and if if fails, would it be clear why? I think this can be solved with added documentation to this comand.

This comment was marked as spam.

@williammartin

Copy link
Copy Markdown
Member

Sorry for the delay on this, it's top of my backlog for tomorrow.

@steiza

steiza commented Jun 11, 2024

Copy link
Copy Markdown
Contributor Author

@williammartin no worries - I might be making some slight tweaks to this pull request later today

@steiza

steiza commented Jun 12, 2024

Copy link
Copy Markdown
Contributor Author

We're going to attempt to modify this pull request so that users don't have to specify --public or --private when calling gh attestation trusted-root.

steiza added a commit that referenced this pull request Jun 13, 2024
This implementation doesn't require the user to specify if they are
working with a public or private repository, and then modifies
`gh attestation verify` to make an educated guess as to what trusted
root to use.

See #9178 for the original
implementation.
@steiza

steiza commented Jun 24, 2024

Copy link
Copy Markdown
Contributor Author

Closing in favor of #9206

@steiza steiza closed this Jun 24, 2024
@myazdanyy

Copy link
Copy Markdown

For use in upcoming docs on how to do offline verification with artifact attestations.

When you use gh attestation verify, it contacts GitHub services to get the keys needed to perform the verification (often called the trusted root). But if you're doing offline verification, you need to provide the trusted root manually. This subcommand makes it much easier for artifact attestation users to get the trusted root file they need for offline verification.

@khannanto08

Copy link
Copy Markdown

Nathing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

external pull request originating outside of the CLI core team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants