Skip to content

feat: adding trust_config parameter for private sigstore instances #460

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

SequeI
Copy link

@SequeI SequeI commented May 9, 2025

Summary

This change introduces the --trust_config option to enable the use of private Sigstore instances with custom trust roots. Currently, the tooling assumes the use of the public Sigstore infrastructure, which limits flexibility for organizations running their own Rekor, Fulcio, and CTLog instances. This PR addresses that limitation by allowing users to provide a custom trust configuration for both signing and verification operations.

model_signing sign bert-base-uncased --trust_config signing_config.json
model_signing verify bert-base-uncased \ 
      --signature model.sig \
      --identity "<email>" \
      --identity_provider "https://oauth2.sigstore.dev/auth" \
      --trust_config signing_config.json

I tested using the public goods instance and it's trust config, and also our own redhat TAS instance's trust config. Signed and verified with no issues :)

resolves #208

Checklist
  • All commits are signed-off, using DCO
  • All new code has docstrings and type annotations
  • All new code is covered by tests. Aim for at least 90% coverage. CI is configured to highlight lines not covered by tests.
  • Public facing changes are paired with documentation changes
  • Release note has been added to CHANGELOG.md if needed

@SequeI SequeI requested review from a team as code owners May 9, 2025 12:48
@SequeI SequeI force-pushed the trust_configCLI branch from 64d81b6 to e67ddf8 Compare May 9, 2025 12:50
@@ -24,6 +24,7 @@
from sigstore import oidc as sigstore_oidc
from sigstore import sign as sigstore_signer
from sigstore import verify as sigstore_verifier
from sigstore._internal.trust import ClientTrustConfig
Copy link
Contributor

Choose a reason for hiding this comment

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

I guess we have no other choice than to take one of their _internal classes.
Rest LGTM.

Copy link
Author

@SequeI SequeI May 12, 2025

Choose a reason for hiding this comment

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

Looks like the type mismatch issue in sigstore-python that was blocking this earlier is now resolved, so we should be good to go on making these parts of the API public.

Also, there's an upstream fix in progress for pulling the OIDC URL from trustconfig. Once that's merged, I'll clean up the current workaround and refactor things properly to expose what we need in sigstore-python. That way, we wont have to rely on internals in model-transparency and have a cleaner setup overall.

Thanks for the review! (This does work in it's current form, just for stability purposes these changes will need to be introduced)

Copy link
Collaborator

Choose a reason for hiding this comment

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

Thank you for the PR! Yes, let's wait for the upstream trustconfig changes and then we can merge this.

Given the current changes, we could do a 1.1 release once the current PRs are merged.

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.

Add support for using a private Sigstore stack
3 participants