-
Notifications
You must be signed in to change notification settings - Fork 29
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
doc: outline design for OCSP revocation #132
Comments
Thanks @kody-kimberl for the design. I have some open discussions below:
|
Thank @kody-kimberl for sharing the design. Will the revocation implementation in |
Thank you for all the great comments!
I 100% agree. I was planning on having a helper function for generating this request as you mentioned, and I like your name for it. Having this logic separated will allow the requests to be done in parallel for each certificate in the chain.
The reason I included this is to be forward thinking. The specification states that there should be a different timeout for OCSP and CRL. Once we incorporate CRL revocation, we will need an additional timeout option. Thus, I figured it is best to decouple the OCSP timeout from the client initially in order to minimize the changes that will be necessary to add CRL revocation in the future.
I agree, I'll add this when implementing it.
Primarily, yes. As Patrick mentioned, there will be an additional need for the https://pkg.go.dev/golang.org/x/crypto (which we already use elsewhere) in order to create the OCSP requests (and the mock responses for testing). No other libraries should be necessary based on how I've planned to implement it. |
Was thinking more about it and from end user perspective it wouldn't matter if its OSCP or CRL or any other revocation mechanism, they would want revocation to complete in x seconds. Also, we can add ocspTimeoutThreshold in future if some user needs it. |
That’s great! |
Awesome, all my questions so far have been answered. This design looks good to me. I guess I'll have further implementation questions once the PR is created. Thanks. /cc: @kody-kimberl, @priteshbandi, @shizhMSFT |
This PR adds a new package that will perform OCSP revocation checking for a certificate chain and addresses part of issue #124. Implementation is based on the design from #132 and the specification [here](https://github.com/notaryproject/notaryproject/blob/main/specs/trust-store-trust-policy.md#certificate-revocation-evaluation). Signed-off-by: Kody Kimberl <[email protected]>
This issue is stale because it has been opened for 60 days with no activity. Remove stale label or comment. Otherwise, it will be closed in 30 days. |
Issue closed due to no activity in the past 30 days. |
This issue outlines how the core revocation functionality will be built into notation-core-go, and how it will be integrated with notation-go. This additional functionality will provide a mechanism to check the revocation status of certificates in a way that can be easily integrated into other projects, and to conduct revocation checks as part of the Verify process.
These changes will address the following issue:
CRL Support will not be implemented until later.
The outlined mechanisms are based upon previously defined specifications (https://github.com/notaryproject/notaryproject/blob/main/specs/trust-store-trust-policy.md#certificate-revocation-evaluation) as well as some ideas from existing solutions (https://pkg.go.dev/github.com/cloudflare/cfssl/revoke and https://github.com/grpc/grpc-go/blob/52ca9571068d/security/advancedtls/crl.go) that don’t fully match our use case.
Implementation is planned to be completed in two PRs. The first will introduce the revocation package in notation-core-go. The second PR will follow, which will incorporate the revocation package into notation-go. These sections are separated by a horizontal line.
Notation-core-go
The following will be added as a new package within the x509 package via a new file, revocation.go:
Since testing this will require validating against OCSP server responses, a mock client needs to be created to mock these responses. This will be added to the testhelper package in a new file named httptest.go:
In addition to the mocked client, we will also need a new test certificate that specifies an OCSPServer in the certificate template. This value will be necessary to confirm revocation status with the mocked client. The following will be added to the testhelper package in the existing certificatetest.go file:
Notation-go
The following will be added/modified in the verifier package within the existing verifier.go file:
TypeRevocation has already been added to the ValidationTypes in the trustpolicy, so no change is needed there.
The text was updated successfully, but these errors were encountered: