Skip to main content

More Info:

Advisory: EncryptionConfiguration with a KMS provider should be enabled for Secret resources so etcd does not store secrets in plaintext.

Risk Level

High

Address

Security

Compliance Standards

  • Cloudanix Best Practice

Triage and Remediation

Remediation

Manual Steps

  1. Identify how the cluster is managed and where to configure encryption
    • Determine provider and provisioning method (console only, or via Terraform/CloudFormation/ARM/Bicep/Deployment Manager, etc.).
    • On any machine with cloud CLI access, list cluster details, for example:
      • EKS:
      • GKE:
      • AKS:
  2. Review current at-rest encryption status for Secrets
    • In the provider console, open the cluster and locate the encryption / security / data protection section.
    • Confirm whether “envelope encryption”, “KMS provider”, “customer-managed keys”, or similar is enabled for Kubernetes Secrets / etcd.
    • If using IaC, inspect the config:
      • EKS (Terraform example): check encryption_config block on aws_eks_cluster.
      • GKE: check database_encryption / kms_key_name on the cluster resource.
      • AKS: check azure_key_vault_kms or equivalent encryption profile.
  3. Decide on an appropriate KMS key and scope
    • With your security team, choose or create a KMS key dedicated to Kubernetes Secrets, with restricted IAM/RBAC (only control plane and key admins can use it).
    • On any machine with cloud CLI access, gather candidate keys:
      • AWS KMS:
      • GCP KMS:
      • Azure Key Vault:
  4. Enable or update envelope/KMS encryption for Secrets in the cluster configuration
    • If using the cloud console:
      • Edit the cluster, locate the encryption/KMS settings, and enable encryption for Kubernetes Secrets using the selected KMS key.
      • Save/apply the change; be aware that some providers require cluster recreation or may briefly impact control-plane operations.
    • If using IaC:
      • Add or update the appropriate encryption/KMS blocks to include Secrets and reference the chosen KMS key.
      • Apply the changes with your IaC tool (e.g., terraform apply, az deployment group create, gcloud deployment-manager deployments update), following your change-management process.
  5. Verify encryption is enabled and active for Secrets
    • After the change completes, re-run the provider CLI describe commands from step 1 and confirm that:
      • A KMS/encryption configuration is present, and
      • It explicitly covers Kubernetes Secrets / etcd data.
    • For example, on EKS you should see non-empty encryptionConfig with resources including "secrets" and a KMS key ARN.
  6. Validate behavior with a test Secret and document the decision
    • On any machine with kubectl access:
    • Use cloud-provider guidance (if available) or support tools to confirm new etcd entries for Secrets are encrypted (direct etcd inspection usually isn’t possible on managed control planes; rely on provider guarantees once encryption is reported as enabled).
    • Record in your security documentation: the cluster, date of change, KMS key ID/ARN/URI used, and who is authorized to manage that key.
kubectl cannot configure at-rest encryption for Secrets because this setting is only available in the managed control-plane / cloud provider configuration (for example, via the provider console, CLI, or IaC). Refer to the Manual Steps section for how to enable KMS/envelope encryption for Secrets in your specific environment.