cli: Support using other Sigstore instances#1548
Merged
woodruffw merged 14 commits intosigstore:mainfrom Oct 6, 2025
Merged
Conversation
8dcbda4 to
6be6ef7
Compare
example: $ sigstore --instance https://sigstore.github.io/root-signing \ init-instance ~/src/root-signing/metadata/root.json $ sigstore --instance https://sigstore.github.io/root-signing \ sign README.md Signed-off-by: Jussi Kukkonen <jkukkonen@google.com>
6be6ef7 to
f853732
Compare
The intent seems clearer with new name. Signed-off-by: Jussi Kukkonen <jkukkonen@google.com>
Signed-off-by: Jussi Kukkonen <jkukkonen@google.com>
7f66ddf to
2473f4e
Compare
This way issues with initial root will also lead to TUFError Signed-off-by: Jussi Kukkonen <jkukkonen@google.com>
2473f4e to
90e14c5
Compare
This case now leads to TUFError that is already handled upstream. The error is now a little less specific but still good. Signed-off-by: Jussi Kukkonen <jkukkonen@google.com>
Member
Author
|
A note on the security aspect here: the instances with embedded trust roots (currently sigstore.dev, sigstage.dev) are more secure than instances trusted with
|
Closed
48c9cd3 to
c658b73
Compare
Signed-off-by: Jussi Kukkonen <jkukkonen@google.com>
c658b73 to
8efbe66
Compare
Member
Author
|
Thanks for comments: I updated the help texts with "Mutually exclusive with other instance configuration arguments", and maybe finally got check-README to approve... |
woodruffw
approved these changes
Oct 6, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I started prototyping #1546 and I think this turned out quite nice (since all of the internals already support this).
Summary
We already support
--stagingto change the used sigstore instance (and--trust-configto completely manually define the instance) but supporting any sigstore instance would be nice (it would also be directly useful in the root-signing testing as that essentially uses other sigstore instances like https://sigstore.github.io/root-signing/).The complication is that there are two separate things that need to be supported:
This PR solves this by adding a top level subcommand
trust-instancefor 1 and a flag--instancefor 2. The former takes a TUF root metadata file and latter takes the URL as argment. I think this is the best compromise as--stagingis now basically a shortcut for--instance https://tuf-repo-cdn.sigstage.devand likewise you could say that the default is--instance https://tuf-repo-cdn.sigstore.devSimilar implementations
Other clients have similar functionality: cosign via
cosign initializeand sigstore-js withsigstore initializebut these have the unpleasant side effect of modifying the default that the client uses from that point on: I think this is a bad idea and requiring a--instance ...flag on every command is better. Users who want to always use a private instance should write a wrapper over sigstore-python to do that.example
Review items
trust.sigstore.devas the tuf url to make it clearer but 🤷.trust-instance:--verbosewill show a stack trace that looks useful. I think that's reasonable.sigstore plumbing trust-instancebut that does not feel quite rightsigstore trust-instance --list)