檢視次數:
配置檔適用性:級別 1
在命名空間中創建 Pod 的能力可能提供多種權限升級的機會,例如將特權服務帳戶分配給這些 Pod 或掛載具有訪問敏感資料的 hostPaths(除非實施 Pod 安全政策以限制此訪問)。
因此,建立新 pod 的權限應該限制在盡可能最小的使用者群組內。
在叢集中創建 Pod 的能力為權限升級提供了可能性,因此應在可能的情況下加以限制。
注意
注意
根據預設,以下列出的主體對 pod 物件擁有 create 權限。
CLUSTERROLEBINDING                                     SUBJECT
TYPE                     SA-NAMESPACE
cluster-admin                                                   system:masters
Group
system:controller:clusterrole-aggregation-controller            clusterrole-
aggregation-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-volume-
binder 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

影響

應注意不要移除系統組件所需的對 pods 的訪問權限。

審計

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

補救

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