[ca/node] Maybe update the root CA when renewing the TLS cert#2238
Merged
aaronlehmann merged 1 commit intomoby:masterfrom Jun 12, 2017
Merged
[ca/node] Maybe update the root CA when renewing the TLS cert#2238aaronlehmann merged 1 commit intomoby:masterfrom
aaronlehmann merged 1 commit intomoby:masterfrom
Conversation
40 tasks
Collaborator
|
This isn't compiling yet but the concept looks sound. |
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 |
…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>
ecf9b7f to
7492f2a
Compare
Contributor
Author
|
Ok, test written and CI passing, ready for another look. |
Collaborator
|
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>
This file contains hidden or 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
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.