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: crl cache #462

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

feat: crl cache #462

wants to merge 5 commits into from

Conversation

Two-Hearts
Copy link
Contributor

This PR adds an implementation of CRL cache along with {NOTATION_CACHE} directory for callers to initialize the cache.

Signed-off-by: Patrick Zheng <patrickzheng@microsoft.com>
Signed-off-by: Patrick Zheng <patrickzheng@microsoft.com>
Signed-off-by: Patrick Zheng <patrickzheng@microsoft.com>
Copy link

codecov bot commented Sep 20, 2024

Codecov Report

Attention: Patch coverage is 93.44262% with 4 lines in your changes missing coverage. Please review.

Project coverage is 81.31%. Comparing base (9faa6e2) to head (0d23fcd).

Files with missing lines Patch % Lines
verifier/crl/crl.go 92.15% 2 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #462      +/-   ##
==========================================
+ Coverage   81.01%   81.31%   +0.29%     
==========================================
  Files          33       34       +1     
  Lines        2492     2553      +61     
==========================================
+ Hits         2019     2076      +57     
- Misses        331      333       +2     
- Partials      142      144       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Comment on lines +62 to +65
// CacheFS is the cache SysFS
func CacheFS() SysFS {
return NewSysFS(userCacheDirPath())
}
Copy link
Contributor

Choose a reason for hiding this comment

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

It seems that it is not used anywhere.

Copy link
Contributor Author

@Two-Hearts Two-Hearts Sep 21, 2024

Choose a reason for hiding this comment

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

This is intended to be used by callers of notation-go. For example, Notation CLI.
When caller wants to use crl.NewFileCache(root string), they will need to pass dir.CacheFS().SysPath() as root.

verifier/verifier.go Outdated Show resolved Hide resolved
verifier/verifier.go Outdated Show resolved Hide resolved
verifier/crl/crl.go Outdated Show resolved Hide resolved
verifier/crl/crl.go Outdated Show resolved Hide resolved
Signed-off-by: Patrick Zheng <patrickzheng@microsoft.com>
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.

2 participants