More Info:
Advisory: EncryptionConfiguration with a KMS provider should be enabled for Secret resources so etcd does not store secrets in plaintext.Risk Level
HighAddress
SecurityCompliance Standards
- Cloudanix Best Practice
Triage and Remediation
- Remediation
Remediation
Manual Steps
Manual Steps
-
Identify the OKE cluster and its compartment
- In the OCI Console, go to: Developer Services → Kubernetes Clusters (OKE).
- Note the Compartment, Cluster name, and OCID of the cluster you are assessing.
-
Check if envelope encryption is enabled for the cluster (Console)
- In the OKE cluster details page, open the Settings or Cluster tab.
- Look for a field such as Encryption / Secrets encryption / KMS key.
- Determine whether:
- A KMS key is associated with the cluster for secrets encryption (envelope/KMS encryption enabled), or
- No key is set (secrets stored in etcd are not KMS‑encrypted at rest).
-
Check cluster encryption via OCI CLI (any machine with OCI CLI configured)
- Run:
- If the above key returns nothing or fails, retrieve all options and inspect for encryption/KMS fields:
- Review the output for any field indicating a KMS key or secrets/envelope encryption configuration and note whether it is set.
- Run:
-
Decide on the required KMS key and security posture (design decision)
- With your security team, decide:
- Which OCI Vault KMS key (OCID, key rotation policy, access policy) should be used for cluster secret encryption.
- Which teams/principals may manage or rotate this key.
- Confirm that the key’s IAM policy allows OKE to use it (Vault and Key policies granting the OKE service principal access).
- With your security team, decide:
-
Enable or update secrets encryption for the OKE cluster (Console/CLI/IaC)
- If the cluster does not have KMS encryption enabled, or you need to change the key, update the cluster configuration:
- Using the OCI Console: edit the cluster, set the KMS key for secrets/envelope encryption (exact UI labels may vary by OKE version), and save.
- Using OCI CLI (if supported for your cluster version), for example:
Adjust flags to match your existing cluster settings; the key part is setting
--kms-key-idto the chosen KMS key OCID. - If managing via IaC (e.g., Terraform), add or update the OKE cluster’s KMS/encryption arguments to reference the chosen Vault key, then apply the change.
- If the cluster does not have KMS encryption enabled, or you need to change the key, update the cluster configuration:
-
Verify that secrets encryption is now enabled (Console/CLI)
- Re-open the OKE cluster in the OCI Console and confirm that the KMS key / Secrets encryption field now shows the expected key.
- From the CLI, verify the encryption/KMS field is present and correctly set:
- Confirm the options reflect an active association with your intended KMS key for secret/envelope encryption.
Using kubectl
Using kubectl
kubectl cannot configure secret encryption at rest on Oracle OKE, because this setting is part of the managed control plane and must be enabled via OCI (console, CLI, or IaC such as Terraform). Refer to the Manual Steps section for how to review and configure KMS/envelope encryption for your OKE cluster.
Automation
Automation
- The script does not prove whether etcd is encrypting Secrets at rest; that setting is controlled in OKE at the cluster configuration level.
- It helps you:
- List all Secrets by namespace and type so you can assess sensitivity and volume.
- Highlight Secrets with likely credential fields (
password,token,apikey, etc.) so you can:- Confirm the cluster’s OKE configuration uses envelope/KMS encryption for Secrets.
- Prioritize enabling or tightening that setting on clusters with many sensitive secrets.

