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

fulcio: remove detached SCT support #1236

Merged
merged 3 commits into from
Dec 3, 2024
Merged

fulcio: remove detached SCT support #1236

merged 3 commits into from
Dec 3, 2024

Conversation

woodruffw
Copy link
Member

This fully removes detached SCT support, meaning
that any Fulcio instance must use embedded SCTs.

CC @haydentherapper for sanity-checking here, since this follows your original RFC on Fulcio.

Closes #850.

xref: sigstore/fulcio#1499

This fully removes detached SCT support, meaning
that any Fulcio instance must use embedded SCTs.

Closes #850.

Signed-off-by: William Woodruff <[email protected]>
@woodruffw woodruffw added component:signing Core signing functionality component:api Public APIs labels Dec 2, 2024
@woodruffw woodruffw self-assigned this Dec 2, 2024
Signed-off-by: William Woodruff <[email protected]>
except KeyError:
raise FulcioClientError("Fulcio response missing certificate chain")
else:
sct_embedded = False
Copy link
Contributor

Choose a reason for hiding this comment

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

For instances that don’t use a CT log, the certificate chain is written to signedCertificateDetachedSct. To continue to support these local deployments, you’d need to still read the chain from either field, but only check the SCT if embedded.

Cc @codysoyland who added that for Sigstore-go

Copy link
Member

Choose a reason for hiding this comment

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

Is it not a problem if the server can just "downgrade" to detached sct like that?

Or are we supposed to always require embedded SCT if the trust root contains at least one CT log, but otherwise be ok with detached SCT?

Copy link
Member Author

Choose a reason for hiding this comment

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

Right now sigstore-python doesn't allow non-CT BYO uses at all, so allowing signedCertificateDetachedSct while removing detached SCT support would mean a larger refactor 😅

Given that, I think we're OK to remove this outright, since signedCertificateDetachedSct-without-CT is a use case we already didn't support. But I'm curious if this matches @jku's understanding 🙂

Copy link
Contributor

Choose a reason for hiding this comment

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

Is it not a problem if the server can just "downgrade" to detached sct like that?

Or are we supposed to always require embedded SCT if the trust root contains at least one CT log, but otherwise be ok with detached SCT?

For Sigstore-go, it’s a threshold configured by the user. For cosign, SCTs are required unless opted out explicitly by the user.

If you require CT now, then agreed this would not be a breaking change.

Copy link
Member

Choose a reason for hiding this comment

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

@woodruffw sure, that sounds good.

@woodruffw woodruffw requested a review from jku December 3, 2024 17:07
Copy link
Member

@jku jku left a comment

Choose a reason for hiding this comment

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

Looks correct to me

Comment on lines +151 to +156
try:
# The SignedCertificateTimestamp should be accessed by the index 0
sct = _get_precertificate_signed_certificate_timestamps(cert)[0]

except UnexpectedSctCountException as ex:
raise FulcioClientError(ex)
Copy link
Member

Choose a reason for hiding this comment

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

itching to refactor these methods a bit, using them is overly complicated and it's still incomplete (you could get ValueError in addition to this unnecessary internal error)... but that's not really related to this PR

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, I'd love to have these cleaned up. Let's do a follow-up for that 🙂

@woodruffw woodruffw merged commit dad57a2 into main Dec 3, 2024
25 checks passed
@woodruffw woodruffw deleted the ww/rm-detached-scts branch December 3, 2024 17:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:api Public APIs component:signing Core signing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Removed support for detached SCTs
3 participants