Skip to content

fulcio: remove detached SCT support#1236

Merged
woodruffw merged 3 commits intomainfrom
ww/rm-detached-scts
Dec 3, 2024
Merged

fulcio: remove detached SCT support#1236
woodruffw merged 3 commits intomainfrom
ww/rm-detached-scts

Conversation

@woodruffw
Copy link
Copy Markdown
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 <william@trailofbits.com>
@woodruffw woodruffw added component:signing Core signing functionality component:api Public APIs labels Dec 2, 2024
@woodruffw woodruffw requested a review from Hayden-IO December 2, 2024 16:47
@woodruffw woodruffw self-assigned this Dec 2, 2024
Signed-off-by: William Woodruff <william@trailofbits.com>
except KeyError:
raise FulcioClientError("Fulcio response missing certificate chain")
else:
sct_embedded = False
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
@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