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 fsnotify-backed cache for reading TLS PKI material #1256

Merged
merged 1 commit into from Jul 8, 2023

Conversation

bobcallaway
Copy link
Member

Summary

If the PKI material used to expose a TLS endpoint changes while an instance is running, the instance must be restarted to read the new material. This change adds an fsnotify-based watcher for the certificate, and caches the value of the cert in process memory to save file I/O during the establishment of each TLS connection.

This scenario is likely in Kubernetes where PKI material may be refreshed by a renewal process and exposed to Fulcio through a volume mount.

Signed-off-by: Bob Callaway <bcallaway@google.com>
@codecov
Copy link

codecov bot commented Jul 2, 2023

Codecov Report

Merging #1256 (4454722) into main (a5b774d) will decrease coverage by 0.03%.
The diff coverage is 59.01%.

@@            Coverage Diff             @@
##             main    #1256      +/-   ##
==========================================
- Coverage   56.07%   56.05%   -0.03%     
==========================================
  Files          50       50              
  Lines        2921     2972      +51     
==========================================
+ Hits         1638     1666      +28     
- Misses       1138     1157      +19     
- Partials      145      149       +4     
Impacted Files Coverage Δ
cmd/app/grpc.go 48.76% <59.01%> (+2.81%) ⬆️

@bobcallaway bobcallaway merged commit 489d73a into sigstore:main Jul 8, 2023
13 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.

None yet

2 participants