7.2 Ensure that the minimum number of manager nodes have been created in a swarm

Information

You should ensure that the minimum number of required manager nodes is created in a swarm.

Rationale:

Manager nodes within a swarm have control over the swarm and can change its configuration, including modifying security parameters. Having excessive manager nodes could render the swarm more susceptible to compromise.

If fault tolerance is not required in the manager nodes, a single node should be elected as a manger. If fault tolerance is required then the smallest odd number to achieve the appropriate level of tolerance should be configured. This should always be an odd number in order to ensure that a quorum is reached.

Solution

If an excessive number of managers is configured, the excess nodes can be demoted to workers using the following command:

docker node demote <ID>

Where is the node ID value of the manager to be demoted.

Impact:

None

Default Value:

Only a single manager is required to start a given cluster.

See Also

https://workbench.cisecurity.org/files/2433

Item Details

Category: CONTINGENCY PLANNING

References: 800-53|CP-9, CSCv6|5

Plugin: Unix

Control ID: b68e552ec23429d8cbfee1c2e1690c89960eec302b591ae91af54155737c5cd1