Information Disclosure
Learn about information disclosure in Kubernetes.
We'll cover the following
Information disclosure is when sensitive data is leaked. There are lots of ways it can happen, from leaving an insecure USB drive on a plane, all the way to data stores being hacked and APIs that unintentionally expose sensitive data.
Protecting cluster data
In the Kubernetes world, the entire configuration of the cluster is stored in the cluster store (currently etcd
). This includes network and storage configuration as well as passwords and other sensitive data stored in Secrets. For obvious reasons, this makes the cluster store a prime target for information disclosure attacks.
As a minimum, you should limit and audit access to the nodes hosting the cluster store. As will be seen in the next paragraph, gaining access to a cluster node can allow the logged-on user to bypass some of the security layers.
Kubernetes 1.7 introduced encryption of Secrets but doesn’t enable it by default. Even when this becomes the default, the data encryption key (DEK) is stored on the same node as the Secret! This means that gaining access to a node allows you to bypass encryption. This is especially worrying on nodes that host the cluster store (etcd nodes).
Fortunately, Kubernetes 1.11 enabled a beta feature that lets you store key encryption keys (KEK) outside of the Kubernetes cluster. These types of keys are used to encrypt and decrypt data encryption keys and should be safely guarded. You should seriously consider Hardware Security Modules (HSM) or cloud-based Key Management Stores (KMS) for storing your key encryption keys.
Keep an eye on upcoming versions of Kubernetes for further improvements to the encryption of Secrets.
Get hands-on with 1200+ tech skills courses.