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

Examples: Add a minimal example of bundle sign/verify #410

Merged
merged 3 commits into from
Oct 22, 2024

Conversation

jku
Copy link
Member

@jku jku commented Oct 17, 2024

Summary

Add example of sigstore::bundle use to make it more visible that sigstore-rs does make it easy to use the new bundle format (as well as to automatically update the trust root). More specifically the example uses

  • sigstore::bundle to sign and verify
  • sigstore::oauth to get a signing token

Fixes #406

Release Note

  • examples: Added example of sigstore::bundle use

-->

Documentation

See included README.md and --help output

Comment on lines 95 to 97
println!(
"Created signature bundle {} with identity {}",
&bundle_path, email
Copy link
Member Author

@jku jku Oct 17, 2024

Choose a reason for hiding this comment

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

I'd love to print something that would contain the correct verification command:

Signed README.md. To verify use
    $ cargo run --example bundle verify --identity [email protected] --issuer https://github.com/login/oauth README.md

But that's not currently possible since the issuer does not seem to be exposed (#409).

This uses
* sigstore::bundle to sign and verify
* sigstore::oauth to get a signing token

Signed-off-by: Jussi Kukkonen <[email protected]>
examples/bundle/main.rs Outdated Show resolved Hide resolved
Don't use display() when creating a new path, instead use
PathBuf.set_file_name()

Signed-off-by: Jussi Kukkonen <[email protected]>
Copy link
Collaborator

@viccuad viccuad left a comment

Choose a reason for hiding this comment

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

Thanks!

Copy link
Member

@flavio flavio left a comment

Choose a reason for hiding this comment

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

thanks!

@flavio flavio merged commit 8e84be6 into sigstore:main Oct 22, 2024
7 checks passed
@jku jku mentioned this pull request Oct 22, 2024
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.

examples/docs for sigstore::bundle
3 participants