Skip to main content

More Info:

Encrypt Kubernetes secrets at rest in etcd using a master encryption key from the OCI Vault (KMS) service. Cross-tenancy access requires policies allowing the cluster to use the key.

Risk Level

High

Address

Security

Compliance Standards

  • CIS OKE

Triage and Remediation

Remediation

Manual Steps

  1. Confirm cluster KMS key configuration (ClusterTenancy)
    • On any machine with oci configured for the ClusterTenancy, run:
    • For each relevant cluster, check whether kms-key-id is set. If it is empty, secrets are not encrypted with OCI Vault.
  2. If kms-key-id is unset, identify / create a Vault key (KeyTenancy)
    • In the KeyTenancy (or same tenancy if not cross‑tenancy), list candidate keys:
    • Choose an id of a suitable, enabled key (ocid1.key.oc1...) to use as the master encryption key.
  3. Review / create cross‑tenancy policies in KeyTenancy (if using a key from another tenancy)
    • In KeyTenancy, collect OCIDs for: ClusterTenancy, OKEAdminGroup, OKEAdminDynGroup, and any dynamic group representing clusters:
    • In the KeyTenancy root compartment, create or review a policy with statements adapted to your OCIDs, e.g.:
    • Apply via Console or, from KeyTenancy, with something like:
  4. Review / create cross‑tenancy policies in ClusterTenancy
    • In ClusterTenancy, gather OCIDs for: KeyTenancy, OKEAdminGroup, OKEAdminDynGroup:
    • In the ClusterTenancy root compartment, create or review a policy with statements adapted to your OCIDs, e.g.:
    • Apply via Console or, from ClusterTenancy, with:
  5. Create a new cluster with the KMS key (required if existing cluster lacks kms-key-id)
    • Encryption at rest for etcd secrets must be specified at cluster creation; you cannot retroactively attach a KMS key to an existing OKE cluster.
    • From any machine with oci configured for ClusterTenancy, run:
    • Plan for migration of workloads from the old cluster to this new, encrypted cluster.
  6. Verify encryption configuration (ClusterTenancy)
    • After the cluster is ACTIVE, confirm that the KMS key is associated:
    • The kms-key-id field must show the expected ocid1.key.oc1... from Vault; document this as evidence that Kubernetes secrets are configured to be encrypted at rest in etcd.
kubectl cannot configure encryption of Kubernetes secrets at rest in etcd on OCI; this is controlled entirely by the managed control plane and OCI KMS/Vault configuration via the OCI Console, CLI, or IaC. To address this finding, follow the guidance in the Manual Steps section for setting up Vault keys, cross-tenancy policies (if needed), and creating or updating the cluster with a kms-key-id.