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

Add custom-certificate-validator example #351

Merged
merged 2 commits into from
Dec 20, 2024
Merged

Add custom-certificate-validator example #351

merged 2 commits into from
Dec 20, 2024

Conversation

codysoyland
Copy link
Member

This adds an example of how to use a custom TrustedMaterial to implement a Certificate Revocation List

Signed-off-by: Cody Soyland codysoyland@github.com

Summary

Release Note

Documentation

This adds an example of how to use a custom TrustedMaterial to implement a Certificate Revocation List

Signed-off-by: Cody Soyland <codysoyland@github.com>
steiza
steiza previously approved these changes Dec 12, 2024
Copy link
Member

@steiza steiza left a comment

Choose a reason for hiding this comment

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

LGTM!

}
}

func (tm *TrustedMaterialWithCertificateValidator) FulcioCertificateAuthorities() []root.CertificateAuthority {
Copy link
Member

Choose a reason for hiding this comment

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

Minor: what if there is a signed timestamp provider that has issued erroneous certificates with known serial numbers??

Maybe that can be left as an exercise to the reader.

@haydentherapper
Copy link
Contributor

Can I ask why this example is needed? CRLs are a pain to maintain and distribute, and part of the motivation behind short-lived certs is so that CRLs are not needed. This example also isn't using a CRL format, so it's an exercise left to the implementer on how to get the revoked serial numbers.

If this is more to demonstrate how to use a custom validator, could we change the example to that?

@kommendorkapten
Copy link
Member

I think the code looks good, but as @haydentherapper mention, I think we can update the wording. Clarify that this is an example of how to hook in custom certificate verification, for people using their own PKI, where long lived certificates could be used, or intermediates are shipped in the bundle instead via the TUF trust root.

@codysoyland
Copy link
Member Author

Can I ask why this example is needed?

This is in response to @kommendorkapten's proposal in #298.

If this is more to demonstrate how to use a custom validator, could we change the example to that?

Exactly, this is not a full CRL implementation, just an example of how to utilize the hooks in TrustedMaterial to accomplish custom certificate validation.

I can update the wording to be more explicit about this.

Signed-off-by: Cody Soyland <codysoyland@github.com>
@codysoyland codysoyland changed the title Add certificate-revocation example Add certificate-validator example Dec 20, 2024
@codysoyland codysoyland changed the title Add certificate-validator example Add custom-certificate-validator example Dec 20, 2024
@codysoyland codysoyland requested a review from a team December 20, 2024 17:06
Copy link
Contributor

@haydentherapper haydentherapper left a comment

Choose a reason for hiding this comment

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

Thanks for the wording change

@codysoyland codysoyland merged commit 14721fa into main Dec 20, 2024
12 checks passed
@codysoyland codysoyland deleted the crl-example branch December 20, 2024 19:31
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.

4 participants