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

sign: init #310

Merged
merged 13 commits into from Dec 21, 2023
Merged

sign: init #310

merged 13 commits into from Dec 21, 2023

Conversation

jleightcap
Copy link
Contributor

@jleightcap jleightcap commented Nov 15, 2023

Summary

Add ability to sign artifacts à la sigstore-python, towards Bundle signing and verification.
Follow-up from #305, and the prerequisite motivation to #311.

Release Note

Expose added bundle and sign modules. No breaking changes to existing modules.

Documentation

@jleightcap jleightcap marked this pull request as ready for review November 16, 2023 18:38
src/bundle/mod.rs Outdated Show resolved Hide resolved
src/bundle/mod.rs Outdated Show resolved Hide resolved
src/sign.rs Outdated Show resolved Hide resolved
Comment on lines +268 to +274
// TODO(tnytown): Implement SCT extraction.
// see: https://github.com/RustCrypto/formats/pull/1134
if sct_embedded {
debug!("PrecertificateSignedCertificateTimestamps isn't implemented yet in x509_cert.");
} else {
// No embedded SCT, Fulcio instance that provides detached SCT:
if let SigningCertificate::SignedCertificateDetachedSct(_sct) = response {}
};
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Detached SCT verification is currently blocked by the linked issue. @tnytown mentioned having the availability to push that issue forward (CC @woodruffw)

Copy link
Member

Choose a reason for hiding this comment

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

Assume you meant embedded SCT verification, since that's the missing branch here 🙂

But yeah, we should get that in; xref RustCrypto/formats#1134

Copy link

@SantiagoTorres SantiagoTorres left a comment

Choose a reason for hiding this comment

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

Mostly questions/discussion. looking good!

src/fulcio/mod.rs Show resolved Hide resolved
src/fulcio/mod.rs Outdated Show resolved Hide resolved
src/fulcio/mod.rs Show resolved Hide resolved
src/oauth/mod.rs Show resolved Hide resolved
src/oauth/token.rs Outdated Show resolved Hide resolved
src/oauth/token.rs Outdated Show resolved Hide resolved
src/sign.rs Outdated Show resolved Hide resolved
src/fulcio/mod.rs Outdated Show resolved Hide resolved
@tnytown tnytown force-pushed the jl/sign branch 2 times, most recently from 04ed874 to 207b1c6 Compare November 16, 2023 23:21
src/oauth/token.rs Outdated Show resolved Hide resolved
src/fulcio/models.rs Show resolved Hide resolved
src/sign.rs Outdated Show resolved Hide resolved
src/sign.rs Outdated Show resolved Hide resolved
src/sign.rs Show resolved Hide resolved
src/sign.rs Outdated Show resolved Hide resolved
src/tuf/repository_helper.rs Outdated Show resolved Hide resolved
src/sign.rs Outdated Show resolved Hide resolved
@tnytown tnytown force-pushed the jl/sign branch 2 times, most recently from 4d4c060 to ac2a88a Compare November 29, 2023 00:56
Copy link
Contributor

@tnytown tnytown left a comment

Choose a reason for hiding this comment

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

I sketched out a fully async SigningSession. Although it's a bit ugly, it should make the sign crate fully async-safe.

src/sign.rs Outdated Show resolved Hide resolved
src/sign.rs Show resolved Hide resolved
src/sign.rs Show resolved Hide resolved
@woodruffw
Copy link
Member

I've done a quick pass on this, and it LGTM overall -- thanks @jleightcap and @tnytown!

@flavio Is there anything else we can or should do here? I see #310 (comment) as one (small) outstanding thing, but there might be others I've missed 🙂

tnytown and others added 4 commits December 6, 2023 10:44
Signed-off-by: Jack Leightcap <jack.leightcap@trailofbits.com>
Signed-off-by: Andrew Pan <andrew.pan@trailofbits.com>
Co-authored-by: Jack Leightcap <jack.leightcap@trailofbits.com>
Signed-off-by: Jack Leightcap <jack.leightcap@trailofbits.com>
Signed-off-by: Andrew Pan <3821575+tnytown@users.noreply.github.com>
Signed-off-by: Andrew Pan <andrew.pan@trailofbits.com>
tnytown and others added 7 commits December 6, 2023 10:51
Co-authored-by: Flavio Castelli <flavio@castelli.me>
Signed-off-by: Andrew Pan <3821575+tnytown@users.noreply.github.com>
Signed-off-by: Andrew Pan <andrew.pan@trailofbits.com>
Signed-off-by: Andrew Pan <andrew.pan@trailofbits.com>
Signed-off-by: Andrew Pan <andrew.pan@trailofbits.com>
Signed-off-by: Andrew Pan <andrew.pan@trailofbits.com>
Signed-off-by: Andrew Pan <andrew.pan@trailofbits.com>
Signed-off-by: Andrew Pan <andrew.pan@trailofbits.com>
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.

This looks good to me, I've left one last minor comment. Once this is addressed we can merge it

src/oauth/token.rs Outdated Show resolved Hide resolved
src/sign.rs Show resolved Hide resolved
Signed-off-by: Jack Leightcap <jack.leightcap@trailofbits.com>
Co-authored-by: Andrew Pan <3821575+tnytown@users.noreply.github.com>
Signed-off-by: Jack Leightcap <30168080+jleightcap@users.noreply.github.com>
Copy link
Member

@woodruffw woodruffw left a comment

Choose a reason for hiding this comment

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

LGTM! @flavio anything else we can do here?

@flavio flavio merged commit ea5d69b into sigstore:main Dec 21, 2023
6 checks passed
@flavio
Copy link
Member

flavio commented Dec 21, 2023

@woodruffw merged! thanks to all the people involved ❤️

flavio added a commit to flavio/sigstore-rs that referenced this pull request Mar 27, 2024
== What's Changed
* sign: init by @jleightcap in sigstore#310
* cargo audit: ignore RUSTSEC-2023-0071 by @jleightcap in sigstore#321
* chore(deps): Update json-syntax requirement from 0.9.6 to 0.10.0 by @dependabot in sigstore#319
* chore(deps): Update cached requirement from 0.46.0 to 0.47.0 by @dependabot in sigstore#323
* chore(deps): Update serial_test requirement from 2.0.0 to 3.0.0 by @dependabot in sigstore#322
* dep: update rustls-webpki, fold in pki_types by @jleightcap in sigstore#324
* chore(deps): Update cached requirement from 0.47.0 to 0.48.0 by @dependabot in sigstore#325
* chore(deps): Update json-syntax requirement from 0.10.0 to 0.11.1 by @dependabot in sigstore#327
* chore(deps): Update cached requirement from 0.48.0 to 0.49.2 by @dependabot in sigstore#329
* chore(deps): Update json-syntax requirement from 0.11.1 to 0.12.2 by @dependabot in sigstore#330
* lint: fix lint error of chrono and tokio by @Xynnn007 in sigstore#334
* chore(deps): Update base64 requirement from 0.21.0 to 0.22.0 by @dependabot in sigstore#332
* The `Repository` trait and `ManualRepository` struct no longer require a feature flag by @tannaurus in sigstore#331
* chore(deps): Bump actions/checkout from 4.1.1 to 4.1.2 by @dependabot in sigstore#336
* chore(deps): Update reqwest requirement from 0.11 to 0.12 by @dependabot in sigstore#341
* update tough dep by @astoycos in sigstore#340

== New Contributors
* @tannaurus made their first contribution in sigstore#331
* @astoycos made their first contribution in sigstore#340

**Full Changelog**: sigstore/sigstore-rs@v0.8.0...v0.9.0

Signed-off-by: Flavio Castelli <fcastelli@suse.com>
@flavio flavio mentioned this pull request Mar 27, 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.

None yet

5 participants