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

feat: Implementation of KMP CRL revocation factory with cache #1900

Merged
merged 3 commits into from
Dec 10, 2024

Conversation

junczhu
Copy link
Collaborator

@junczhu junczhu commented Oct 28, 2024

Description

What this PR does / why we need it:

Enabled load CRLs from all types of KMP provider, both inline KMP and akv KMP.
Optimized CRL core functions and the Implementation of CRL Handler, CRL Handler is now the only implementation of the CRL interface and being reused by notation verifier and KMP.
Added description to the interface definition and more comments to the codebase.

Which issue(s) this PR fixes (optional, using fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when the PR gets merged):

Fixes #1901

Optimize CRL interface and core functions:
image

Implementation of CRL Handler
image

Design Doc: https://github.com/ratify-project/ratify/blob/dev/docs/design/Certificate%20Revocation%20Lists.md

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Helm Chart Change (any edit/addition/update that is necessary for changes merged to the main branch)
  • This change requires a documentation update

How Has This Been Tested?

CI test

Checklist:

  • Does the affected code have corresponding tests?
  • [TBD] Are the changes documented, not just with inline documentation, but also with conceptual documentation such as an overview of a new feature, or task-based documentation like a tutorial? Consider if this change should be announced on your project blog.
  • Does this introduce breaking changes that would require an announcement or bumping the major version?
  • Do all new files have appropriate license header?

Post Merge Requirements

  • MAINTAINERS: manually trigger the "Publish Package" workflow after merging any PR that indicates Helm Chart Change

pkg/cache/file/file.go Outdated Show resolved Hide resolved
pkg/crlprovider/cacheprovider/cacheprovider.go Outdated Show resolved Hide resolved
@junczhu junczhu changed the title feat: CRL Cache feat: CRL Cache Provider Oct 31, 2024
pkg/verifier/notation/notation.go Outdated Show resolved Hide resolved
pkg/crlprovider/provider.go Outdated Show resolved Hide resolved
pkg/crlprovider/provider.go Outdated Show resolved Hide resolved
pkg/crlprovider/verifier_provider.go Outdated Show resolved Hide resolved
@binbin-li
Copy link
Collaborator

since the prev PR got merged, we can switch the target branch to dev.

@junczhu
Copy link
Collaborator Author

junczhu commented Nov 11, 2024

since the prev PR got merged, we can switch the target branch to dev.

As discussed, I can keep target as feature branch till we have e2e ready.
test cov and CI tests results would be checked in my fork.

@junczhu junczhu marked this pull request as ready for review November 19, 2024 00:03
@junczhu junczhu changed the title feat: CRL Cache Provider feat: Implementation of KMP CRL revocation factory with cache Nov 19, 2024
@junczhu
Copy link
Collaborator Author

junczhu commented Nov 19, 2024

As discussed, I would include the CacheCRL as part of the KMP function and use the current one as a basic implementation.

@junczhu
Copy link
Collaborator Author

junczhu commented Nov 19, 2024

As discussed, I would include the CacheCRL as part of the KMP interface for different provider can

As discussed, I would include the CacheCRL as part of the KMP function and use the current one as a basic implementation.

Done

@junczhu junczhu changed the base branch from crl to dev November 29, 2024 02:55
Copy link

codecov bot commented Nov 29, 2024

Codecov Report

Attention: Patch coverage is 91.66667% with 6 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
pkg/verifier/notation/revocationfactory.go 85.00% 4 Missing and 2 partials ⚠️
Files with missing lines Coverage Δ
pkg/keymanagementprovider/refresh/kubeRefresh.go 100.00% <100.00%> (ø)
pkg/verifier/notation/notation.go 98.06% <100.00%> (+0.01%) ⬆️
pkg/verifier/notation/notationrevocationfactory.go 86.95% <100.00%> (+13.04%) ⬆️
pkg/verifier/notation/revocationfactory.go 85.00% <85.00%> (ø)

... and 3 files with indirect coverage changes

pkg/verifier/notation/notationrevocationfactory.go Outdated Show resolved Hide resolved
pkg/verifier/notation/revocationfactory.go Show resolved Hide resolved
pkg/verifier/notation/notationrevocationfactory.go Outdated Show resolved Hide resolved
pkg/verifier/notation/notationrevocationfactory.go Outdated Show resolved Hide resolved
pkg/verifier/notation/revocationfactory.go Outdated Show resolved Hide resolved
pkg/keymanagementprovider/refresh/kubeRefresh.go Outdated Show resolved Hide resolved
pkg/keymanagementprovider/refresh/kubeRefresh.go Outdated Show resolved Hide resolved
pkg/verifier/notation/notation.go Outdated Show resolved Hide resolved
pkg/verifier/notation/notationrevocationfactory.go Outdated Show resolved Hide resolved
pkg/verifier/notation/truststore.go Outdated Show resolved Hide resolved
pkg/verifier/notation/revocationfactory.go Outdated Show resolved Hide resolved
pkg/verifier/notation/revocationfactory.go Outdated Show resolved Hide resolved
pkg/verifier/notation/revocationfactory.go Outdated Show resolved Hide resolved
pkg/verifier/notation/truststore.go Outdated Show resolved Hide resolved
pkg/verifier/notation/truststore.go Outdated Show resolved Hide resolved
pkg/verifier/notation/revocationfactory.go Outdated Show resolved Hide resolved
pkg/verifier/notation/truststore.go Outdated Show resolved Hide resolved
pkg/verifier/notation/revocationfactory.go Show resolved Hide resolved
binbin-li
binbin-li previously approved these changes Dec 6, 2024
binbin-li
binbin-li previously approved these changes Dec 9, 2024
@junczhu junczhu force-pushed the crl-2-cacheP branch 2 times, most recently from ec10822 to b617d59 Compare December 10, 2024 00:59
Signed-off-by: Juncheng Zhu <[email protected]>
Signed-off-by: Juncheng Zhu <[email protected]>
@junczhu junczhu merged commit 59240ad into ratify-project:dev Dec 10, 2024
20 checks passed
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.

feat: CRL Cache
2 participants