All-Things-Docker-and-Kubernetes

Securing Control Plane Communications with Ciphers

Ciphers

TLS works by use of Public Key Encryption, and the encryption is performed by cryptographic mathematical algorithms known as ciphers. Mathematicians discover new ciphers from time to time that are more secure than their predecessors.

Each time a new cipher is discovered, it has to work its way into general usage, that is, that the software libraries that implement encryption need to be updated with the new cipher, whilst remaining compatible with the existing well-known ciphers.

These updates have to find their way into all software that makes use of HTTPS (TLS) protocols including, but not limited to:

When a TLS connection is established, the cipher to use is negotiated between the two ends, and usually the strongest possible cipher that both ends know is selected. The ciphers available to each end of the connection depend on how old that software is, and thus which ciphers are known to it.

Most TLS aware software packages, and for the purpose of CKS, this includes all the control plane components and etcd, have the ability to limit which ciphers should be available for negotiation when a connection is being established. Limiting the available ciphers to the newer (stronger) ones prevents older clients that do not have the newer ciphers from establishing a connection which may be able to be compromised due to use of an older (weaker) cipher for which a known exploit is available.

Kubernetes Control Plane

All the control plane components (API server, controller manager, kubelet, scheduler) have the following two optional arguments:

etcd also has a command line argument to set cipher suites. Thus it is possible to secure api server → etcd communication to use only specific ciphers that they have in common. You would most likely want to select the newest/strongest.

Be aware that not all combinations of cipher suites and TLS versions are compatible with each other. If you set –tls-min-version to VersionTLS13, there will be certain ciphers that can’t be used so explicitly specifying an incompatible cipher with –tls-cipher-suites would cause API server to not come back up.

Sample Scenario

Restrict communication between etcd and api server. Use the following:

Solution:


Back to first page