You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the swarm root CA certificate can never be changed. This may cause issues in the following cases:
A manager is compromised - managers have access to all the data in the cluster. While the secret data in that cluster should be rotated, it’d be helpful to maintain existing data such as service specs, networks, etc. after auditing, without having to replicate all that work. The root CA key material is the last piece of secure information that cannot be rotated.
Related to a manager getting compromised - if the raft logs and/or snapshots which contain the root key material is ever leaked.
Getting the root CA cert into the swarm cluster to use with an external CA requires that the CA cert be put in the correct directory before docker swarm init is run. Not being able to change the root CA means that one can never convert from an internal CA to an external CA or back.
Providing a way to rotate the root CA material would allow users to mitigate a manager or raft data compromise, and would allow users to be able to switch over to an external CA or back from an external CA.
Root rotation should not be a common occurrence.
Basic design
A common way to introduce a new root of trust is to use cross-signed certs (for example, https://letsencrypt.org/certificates/), whereby you have two certificates, each signed by a different entity, and each having the same public key and subject.
If we provide a cross-signed intermediate as part of our root rotation process, then we can distribute the new root bundle and renew the TLS certificates at the same time, so there are only 2 phases of root rotation:
All nodes get new TLS certificates signed with the new root and also including the cross-signed root with the TLS certificates. We may also distribute root bundles containing both the old and new root cert.
Once ALL the nodes have TLS certificates signed by the new root key, we can finish the rotation and trust only the new root cert on all nodes.
Logic
User updates the Root CA material, providing a new public certificate, a new private key or external CA, or both of those.
Swarm generates a cross-signed root that has the same public key and subject as the new root certificate, and will provide this as an intermediate certificate when generating new TLS certificates until the root rotation is complete.
Swarm starts propagating the old+new root CA as trusted roots, and all the nodes get new TLS certificates
User (or swarm) notices that all nodes have new TLS certificates, and tells all nodes to stop trusting the old certificate.
The more detailed design document is here: https://docs.google.com/document/d/1ccKB78d0vZbRnN6odZs_VocSDZQtOcU9JmJUzCV1f1I/ was
Background
Currently, the swarm root CA certificate can never be changed. This may cause issues in the following cases:
Providing a way to rotate the root CA material would allow users to mitigate a manager or raft data compromise, and would allow users to be able to switch over to an external CA or back from an external CA.
Root rotation should not be a common occurrence.
Basic design
A common way to introduce a new root of trust is to use cross-signed certs (for example, https://letsencrypt.org/certificates/), whereby you have two certificates, each signed by a different entity, and each having the same public key and subject.
If we provide a cross-signed intermediate as part of our root rotation process, then we can distribute the new root bundle and renew the TLS certificates at the same time, so there are only 2 phases of root rotation:
Logic
TODO items:
(WIP: [cli] Interactive root rotation #2104)in docker (Add theCACert
parameter to theExternalCA
object moby#32828) (Propagate TLS Info in swarm info and node info REST endpoints moby#32875) (API changes to rotate swarm root CA moby#32993)Other bugfixes: (#2134) (#2163)(#2210) (#2212) (#2218).
The text was updated successfully, but these errors were encountered: