-
Notifications
You must be signed in to change notification settings - Fork 9
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
kds-cache: add fallback cache for CRLs on request failure #1050
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a great test coverage!
c391d3d
to
c26a603
Compare
c26a603
to
5a0bba9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you verify the CRL expiration date is checked? Could you link the code that does this?
The expiration date is checked right here https://github.com/google/go-sev-guest/blob/main/verify/verify.go#L303-L305 . As well the usage of CachedHTTPSGetter by the CRL request was re-examined: it is ensured by handing in the shared CachedHTTPSGetter as verify.Options (see https://github.com/google/go-sev-guest/blob/main/verify/verify.go#L308). In summary we keep sharing one cache across all of the certificates and revocation list, using the same kds-Getter in the verify.Options (https://github.com/edgelesssys/contrast/blob/main/coordinator/internal/authority/credentials.go#L82). |
5a0bba9
to
bd242ac
Compare
bd242ac
to
cd2a7d5
Compare
This PR adds logic to the cached_client.go to allow caching Certificate Revocation Lists (CRLs). Still the CRLs are always queried from the AMD's certification server (KDS) first.
Only in case of an request failure, the cache is used as fallback to allow continuing. When the cache of the CRL is expired, the HTTPs request failure is returned as an error.
In addition the test cases where adapted to cover the different branches of VCEK and CRL caching.