Ensure that Kubernetes workloads do not use OKE cluster node service accounts to authenticate to OCI APIs, and provision a dedicated service account for every workload that requires OCI IAM access.
Avoid manual OKE authentication approaches. Storing service account keys in Kubernetes secrets requires difficult manual key rotation, while utilizing the underlying node's IAM service account is a Principle of Least Privilege (POLP) violation because every pod on that node gains access to services needed by only one, leading to excessive permissions..
Audit
To determine if dedicated service accounts are used for your OCI Kubernetes Engine (OKE) cluster, perform the following operations:
Remediation / Resolution
To ensure that dedicated service accounts are used for OCI Kubernetes Engine (OKE) clusters, perform the following actions:
References
- Oracle Cloud Infrastructure Documentation
- Overview of Kubernetes Engine (OKE)
- Managing Kubernetes Clusters
- Setting Up Cluster Access
- Accessing a Cluster Using Kubectl
- About Access Control and Kubernetes Engine (OKE)
- Oracle Cloud Infrastructure CLI Documentation
- compartment list
- cluster list
- cluster create-kubeconfig
- Kubernetes Documentation
- Configure Service Accounts for Pods