-
Notifications
You must be signed in to change notification settings - Fork 616
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
[ca/node] Maybe update the root CA when renewing the TLS cert #2238
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
40 tasks
This isn't compiling yet but the concept looks sound. |
cyli
force-pushed
the
download-ca-when-requesting
branch
2 times, most recently
from
June 12, 2017 21:38
520262f
to
ecf9b7f
Compare
Codecov Report
@@ Coverage Diff @@
## master #2238 +/- ##
==========================================
- Coverage 60.27% 60.22% -0.05%
==========================================
Files 124 124
Lines 20220 20212 -8
==========================================
- Hits 12187 12173 -14
- Misses 6675 6677 +2
- Partials 1358 1362 +4 |
cyli
changed the title
WIP: [ca/node] Maybe update the root CA when renewing the TLS cert
[ca/node] Maybe update the root CA when renewing the TLS cert
Jun 12, 2017
…Error, try to update the root CA such that it validates against the old TLS creds before renewing again. This can help with edge cases where a manager might have been demoted, and thus not be able to push the latest root certificate to its agent, but the node needs to renew the TLS cert to get one for the worker role (but root rotation has already finished, and hence any certificate it gets will no longer have the intermediate and won't validate). Signed-off-by: Ying Li <ying.li@docker.com>
cyli
force-pushed
the
download-ca-when-requesting
branch
from
June 12, 2017 22:01
ecf9b7f
to
7492f2a
Compare
Ok, test written and CI passing, ready for another look. |
diogomonica
approved these changes
Jun 12, 2017
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.
LGTM
LGTM |
silvin-lubecki
pushed a commit
to silvin-lubecki/docker-ce
that referenced
this pull request
Feb 3, 2020
To get the changes: * moby/swarmkit#2234 * moby/swarmkit#2237 * moby/swarmkit#2238 Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
silvin-lubecki
pushed a commit
to silvin-lubecki/engine-extract
that referenced
this pull request
Feb 3, 2020
To get the changes: * moby/swarmkit#2234 * moby/swarmkit#2237 * moby/swarmkit#2238 Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
silvin-lubecki
pushed a commit
to silvin-lubecki/engine-extract
that referenced
this pull request
Mar 10, 2020
To get the changes: * moby/swarmkit#2234 * moby/swarmkit#2237 * moby/swarmkit#2238 Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
silvin-lubecki
pushed a commit
to silvin-lubecki/engine-extract
that referenced
this pull request
Mar 23, 2020
To get the changes: * moby/swarmkit#2234 * moby/swarmkit#2237 * moby/swarmkit#2238 Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
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.
When renewing the TLS certificate, if we get an x509.UnknownAuthorityError,
try to update the root CA such that it validates against the old TLS creds
before renewing again.
This can help with edge cases where a manager might have been demoted, and
thus not be able to push the latest root certificate to its agent, but
the node needs to renew the TLS cert to get one for the worker role (but
root rotation has already finished, and hence any certificate it gets will
no longer have the intermediate and won't validate).
Signed-off-by: Ying Li ying.li@docker.com
Still needs test. The ideal scenario @aaronlehmann and I discussed was to separate the Root CA used to sign new certs from the root CA the node itself uses to validate incoming connections and external servers, but that may be a bigger change.
This functionality may still be useful, however, to account for edge cases.