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

[WIP] Sigstore bundle support #1

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft

Conversation

tnytown
Copy link

@tnytown tnytown commented Oct 19, 2023

Sigstore Bundle generation and associated machinery, following sigstore-python API design where practical.

New functionality by crate:

  • tuf: SigstoreRepository: Trusted Root based TUF client.
  • verify: VerificationMaterials, Verifier: Sigstore bundle deserializer and verifier.
  • sign: SigningSession, SigningContext, SigningArtifact: Bundle signing machinery patterned off of sigstore-python.
  • fulcio: Support for the v2 signingCert API in FulcioClient, which now takes an X.509 CSR.
  • oauth: IdentityToken convenience type for OIDC tokens.

Changed:

  • crypto: CertificatePool overhaul for chain building based on rustls_webpki.
  • cosign, examples: Various adaptations to get things building with the changed API surfaces.
  • The sigstore-conformance client now plumbs into the bundle machinery :)

TODOs (not comprehensive, grep for TODO(tnytown), todo!, and unimplemented!):

  • SCT, SET, Root Hash Verification
  • PrecertificateSignedCertificateTimestamps is not in x509_cert
  • Implement verification policies
  • Investigate certificate validation in VerificationMaterials::from_bundle and manually implement what isn't covered by webpki
  • Clean up error handling: Figure out where best to propagate and chain errors to aid debugging.
    • Examine use of unwrap and expect, replace where appropriate
    • Errors for VerificationMaterials::from_bundle: do we want to set up error types?
  • Async safety: change FulcioClient's new endpoint to async, look into making async variants of SigstoreRepository, Verifier, SigningSession, and SigningArtifact.
  • Investigate better sigstore_protobuf_specs generation?
  • sig/crt flow?

Low priority TODOs (not necessary for upstreaming this work):

  • Look into cleaning CosignVerificationKey up
  • clean up Fulcio client see if we can use OpenAPI to generate those

Signed-off-by: Andrew Pan <[email protected]>
Signed-off-by: Jack Leightcap <[email protected]>
Signed-off-by: Andrew Pan <[email protected]>
@jleightcap jleightcap mentioned this pull request Oct 20, 2023
2 tasks
@tnytown tnytown marked this pull request as draft October 20, 2023 20:44
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.

1 participant