-
Notifications
You must be signed in to change notification settings - Fork 1
Store CertificateResource as one unit #3
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
base: master
Are you sure you want to change the base?
Conversation
aadbadb to
85ab379
Compare
ErikBooijFR
left a comment
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.
I love it, I have very high hopes for this change. Some nits mostly
Co-authored-by: ErikBooijFR <[email protected]>
Co-authored-by: ErikBooijFR <[email protected]>
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.
Comment @cursor review or bugbot run to trigger another review on this PR
|
@cursor review |
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.
Comment @cursor review or bugbot run to trigger another review on this PR
|
@cursor review |
How certmagic currently stores certs
In certmagic, a certificate consists of three different entities:
These entities are stored and retrieved individually using the
.Load()and.Store()functions, when obtaining or renewing a cert.Problem
The current implementation has two important problems:
certmagic/storage.go
Lines 193 to 205 in 20b57b0
Solution
This change adresses the issue by storing all three entities as a single certificate bundle (.bundle).
As we're operating on a database with live certificates, this change also introduces the concept of a storage mode, that allows for seemless migration from the old to the new storage format:
REVIEW DISCLAIMER
I did not try to be smart about the alternate storage implementation:
Storagehave been duplicated and updated....Legacyfunctions after a full switch.This is pretty much the calling sequence for all functions that do storage things: