-
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
Add refresh_events
to CertHandler
#108
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
michaeldmitry
force-pushed
the
add-refresh-event
branch
from
September 2, 2024 10:52
fc6e200
to
5e41e0a
Compare
michaeldmitry
force-pushed
the
add-refresh-event
branch
from
September 2, 2024 14:05
015184a
to
0b61315
Compare
PietroPasotti
requested changes
Sep 3, 2024
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.
overall looks good, missing a little bit of comments/docstrings and ideally a test that demonstrates how a new csr is requested when you receive a refresh event and, say, your privkey has changed, and a new csr is NOT requested when all of the input params are unchanged.
Abuelodelanada
previously requested changes
Sep 3, 2024
michaeldmitry
force-pushed
the
add-refresh-event
branch
from
September 3, 2024 12:47
e7c6b04
to
a94f2f0
Compare
PietroPasotti
approved these changes
Sep 3, 2024
sed-i
reviewed
Sep 3, 2024
PietroPasotti
approved these changes
Sep 4, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds a
refresh_events
option toCertHandler
which will be observed to check if there are any changes to the CSR (e.g: newly added SANs). And if there are changes from the existing CSR, it will be replaced by a new one generated with the newest request details and subsequently provide a new certificate.Context
In HA clusters, the coordinator currently requests a certificate with its own hostname given as a SAN. However, this certificate is passed on to the workers to be used by them. This leads to issues when services (e.g pebble check on the worker) tries to communicate with the worker server directly, they will get a certificate error saying that the certificate is valid for the coordinator not the worker.
This solution gives the option to the coordinator to specify the workers' hostnames as SANS whenever a worker is added or removed by, for example, giving
refresh_events=[self.cluster.on.changed]
to check if the certificate needs to be refreshed.