What is the swarm mode public key infrastructure?

0 votes
Can somebody explain what is swarm mode public key infrastructure in docker?
Aug 23 in Docker by Karan
• 1,980 points
70 views

1 answer to this question.

0 votes

Built-in Public Key Infrastructure System helps to secure the deployment of container orchestration systems. Transport Layer Security (TLS) is used in Public Key Infrastructure to communicate with other nodes in a swarm.

When a swarm is initialized with “docker swarm init” command in a docker host, root Certificate Authority (CA) with a key pair is created. This is for securing nodes that join the particular swarm.

“--external-ca”  flag is used with docker swarm init command to use external root CA.

Manager node generates worker token and manager token. Each token has the digest of the root CA certificate and a randomly generated secret. When a new node joins the docker swarm with the worker token the node uses the digesting part to verify the root CA from the manager node. 

While the leader node uses the secret to approve the new joining node. Manager node issues a certificate to the joining node with a randomly generated node ID

By default, swarm performs the renewal of the certificate every three months but it can be modified with the command

docker swarm update --cert-expiry <TIME PERIOD> 

In case if the leader-manager node is down we can rotate the root CA within the swarm so that no nodes trust the certificate signed by old root CA. This can be done by the command 

docker swarm ca --rotate

This command thus creates a cross signed certificate telling the nodes that still trusted  old CA to start verification against new root CA.

answered Aug 23 by Sirajul
• 25,700 points

Related Questions In Docker

0 votes
1 answer

What is the difference between “expose” and “publish” in Docker?

Basically, you have three options: Neither specify EXPOSE nor -p -> ...READ MORE

answered Jul 18, 2018 in Docker by Nilesh
• 6,880 points
322 views
0 votes
1 answer

What is the difference between a Docker image and a container?

Here is very basic explanation for image ...READ MORE

answered Sep 4, 2018 in Docker by Damon Salvatore
• 5,510 points
665 views
0 votes
1 answer
+1 vote
1 answer

What is the default amount of memory provided for Windows Docker containers?

Docker for Windows containers by default get: On ...READ MORE

answered Oct 25, 2018 in Docker by Sophie may
• 9,530 points
37 views
0 votes
1 answer
+5 votes
7 answers

Docker swarm vs kubernetes

Swarm is easy handling while kn8 is ...READ MORE

answered Aug 27, 2018 in Docker by Mahesh Ajmeria
1,003 views
0 votes
1 answer

what is routing mesh under docker swarm mode?

Routing Mesh is a feature which make ...READ MORE

answered Jul 8 in Docker by Sirajul
• 25,700 points
66 views
0 votes
1 answer