Skip to content

Docs: recommend adding ClusterSecret resources to EncryptionConfiguration #128

Open
@applejag

Description

@applejag

Common Kubernetes hardening trick: encrypting secrets! :) Sorry for bigger issue, it just kind of grew.


Contrast to popular belief, Kubernetes Secrets are not protected by only basic base64 encoding. Kubernetes also has a encryption-at-rest feature.

From the Kubernetes API perspective (i.e when accessing kube-apiserver, such as via kubectl), you always get the decrypted version. Changing encryption-at-rest only changes how the objects are stored in etcd. The encryption and decryption is done by kube-apiserver only, so etcd has no knowledge by itself on how to access the encrypted resources. This does not help if an attacker gets kubectl access to your cluster, but it does help if an attacker gets access to etcd, or perhaps your etcd backups. This is solved by giving kube-apiserver a private key to encrypt and decrypt the data, either from a file or by using a KMS service to not store the sensitive encryption keys on the control-plane nodes.

Most common setups of Kubernetes either comes without encryption-at-rest, or it only encrypts a small subset of resources. Commonly only Secrets. As ClusterSecret resources store sensitive data, then they should also be included in that list.

Would be nice with a chapter in the installation docs to add ClusterSecret resources to the list of encrypted resources, if the user has encryption-at-rest enabled. Doesn't need to be super in-depth, but at least hinting to the Platform/DevOps engineers that there are some more recommended steps they might want to look into.

Docs:


On managed Kubernetes is kind of has less of an impact anyway, as the user of them don't even have access to etcd to begin with. It's more important if you are responsible of the etcd data storage and kube-apiserver hosting. This argument might be worth pointing out to the user as well, so they don't get freaked out that their secrets aren't encrypted at rest.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions