Propagate the provided external CA certificate to the external CA object in swarm#1178
Merged
thaJeztah merged 1 commit intodocker:masterfrom Jul 9, 2018
cyli:fix-swarm-ca-command
Merged
Propagate the provided external CA certificate to the external CA object in swarm#1178thaJeztah merged 1 commit intodocker:masterfrom cyli:fix-swarm-ca-command
thaJeztah merged 1 commit intodocker:masterfrom
cyli:fix-swarm-ca-command
Conversation
in swarm. Also, fix some CLI command confusions: 1. If the --external-ca flag is provided, require a --ca-cert flag as well, otherwise the external CA is set but the CA certificate is actually rotated to an internal cert 2. If a --ca-cert flag is provided, require a --ca-key or --external-ca flag be provided as well, otherwise either the server will say that the request is invalid, or if there was previously an external CA corresponding to the cert, it will succeed. While that works, it's better to require the user to explicitly set all the parameters of the new desired root CA. This also changes the `swarm update` function to set the external CA's CACert field, which while not strictly necessary, makes the CA list more explicit. Signed-off-by: Ying Li <ying.li@docker.com>
Member
|
ping @vdemeester @silvin-lubecki @justincormack PTAL! |
This was referenced Jul 12, 2018
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.
Also, fix some CLI command confusions:
--external-caflag is provided, require a--ca-certflag as well, otherwisethe external CA is set but the CA certificate is actually rotated to an internal
cert
--ca-certflag is provided, require a--ca-keyor--external-caflag beprovided as well, otherwise either the server will say that the request is
invalid, or if there was previously an external CA corresponding to the cert, it
will succeed. While that works, it's better to require the user to explicitly
set all the parameters of the new desired root CA.
This also changes the
swarm updatefunction to set the external CA's CACert field,which while not strictly necessary, makes the CA list more explicit.
As pointed out in moby/swarmkit#2680, the CA cert is not propagated correctly making it impossible to rotate the CA certificate to an external CA using the CLI.
This also fixes some other confusing ways the CLI worked previously.