Kubernetes Secrets: Threat Models, Risks, and Protection Options

· Original article ↗

Summary

An explainer of Kubernetes secrets risks and protections covers storage in etcd and on worker nodes, exposure through APIs and workloads, and tradeoffs among Secret objects, mounted files, encryption, RBAC, and external providers.

Key points

  • Kubernetes Secret data is stored in etcd and can also reside on worker nodes; base64 encoding is not encryption.
  • Mounted secret files may reduce exposure compared with environment variables, which can be captured during debugging.
  • Users or service accounts with list or watch rights can access secret contents; anyone able to create pods in a namespace can access its secrets.
  • Arbitrary hostPath mounts can expose secret volumes belonging to other containers on the same node.
  • At-rest encryption can help protect etcd data and backups, but may offer less protection when the API server and etcd share a node.
  • The article describes a 2023 critical CVE in the RKE distribution involving sensitive data stored in a ConfigMap, without specifying its identifier.
  • External secret providers may add granular access controls, auditing, or hardware-backed encryption, but require additional management and may incur costs.

Article Details

Topic
Kubernetes secrets management: threat models, access controls, and protection of secrets at rest and in transit

MITRE ATT&CK

Products

Related Articles