檢視次數:
設定檔適用性:等級 1 - 叢集 / 控制平面
在命名空間中創建 Pod 的能力可能提供多種權限升級的機會,例如將特權服務帳戶分配給這些 Pod 或掛載具有敏感資料存取權的 hostPath(除非實施 Pod 安全政策以限制此存取)。
因此,應將創建新 pod 的權限限制在最小範圍的使用者群組內。
在叢集中創建 pod 的能力可能會導致權限升級,因此應在可能的情況下加以限制。
注意
注意
預設情況下,下列主體對 pod 物件具有 create 權限:
CLUSTERROLEBINDING                                                  SUBJECT
TYPE                          SA-NAMESPACE
cluster-admin                                                                system:masters
Group
system:controller:clusterrole-aggregation-controller                         clusterroleaggregation-
controller ServiceAccount kube-system
system:controller:daemon-set-controller                                      daemon-set-controller
ServiceAccount kube-system
system:controller:job-controller                                             job-controller
ServiceAccount kube-system
system:controller:persistent-volume-binder                                   persistent-volumebinder
ServiceAccount kube-system
system:controller:replicaset-controller                                      replicaset-controller
ServiceAccount kube-system
system:controller:replication-controller                                     replication-controller
ServiceAccount kube-system
system:controller:statefulset-controller                                     statefulset-controller
ServiceAccount kube-system

影響

應注意不要移除系統元件運行所需的 pod 存取權限。

稽核

檢查在 Kubernetes API 中擁有建立 pod 物件權限的使用者。

補救

在可能的情況下,移除對叢集中pod物件的create存取權限。