[ca] Propagate issuer info from TLS certificates to SecurityConfig#2079
Merged
Conversation
…s via IssueAndSaveCertificates and RequestAndSaveNewCertificates. Signed-off-by: cyli <ying.li@docker.com>
…rmation, rather than client and server TLS creds. Allow the issuer information to be accessible from the SecurityConfig. Signed-off-by: cyli <ying.li@docker.com>
Codecov Report
@@ Coverage Diff @@
## master #2079 +/- ##
=========================================
- Coverage 57.67% 54.7% -2.98%
=========================================
Files 58 114 +56
Lines 9611 19702 +10091
=========================================
+ Hits 5543 10777 +5234
- Misses 3474 7644 +4170
- Partials 594 1281 +687Continue to review full report at Codecov.
|
Contributor
Author
|
^ Not sure what's with codecov, but https://codecov.io/github/docker/swarmkit shows master at around 54.2%, not 57.67%. |
Collaborator
|
LGTM |
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.
The issuer info will allow us to determine if a TLS certificate needs rotation (because it is signed by the wrong issuer during a root rotation - if it is signed by a cert with the same subject + public key as our desired signing cert, it doesn't need to rotate its certificates).
This information will be generated from:
RootCA.IssueAndSaveNewCertificatesRootCA.RequestAndSaveNewCertificatesAs part of this change, I've also updated
SecurityConfigto accept this info plus the TLS certificate in order to update credentials, as opposed to accepting a newClientTLSCredsobject andServerTLSCredsobject.This means that creation of the mutable TLS credentials can be centralized to just within
SecurityConfig, and that the issuer information is accessible from aSecurityConfigand can be updated on every TLS certificate update.These are cherry-picked from #2077.