4.22 合規營運商基準
請檢視 Red Hat OpenShift on IBM Cloud 版本 4.22 的合規性運算子基準測試結果。
1 控制平面組件
1.1 主節點配置檔案
主節點的配置並非以一組檔案的形式儲存;因此,1.1 節中的規則不屬於合規操作員自動檢查的範圍。
1.2 API 伺服器
| 章節 | 建議 | 手動/自動 | 等級 | 結果 |
|---|---|---|---|---|
| 1.2.1 | Ensure 確認匿名請求已獲授權。 | Automated | 1 | Not 已勾選 |
| 1.2.2 | Use kubelet 連線使用 HTTPS。 | Automated | 1 | Pass |
| 1.2.3 | Ensure kubelet 會使用憑證進行驗證。 | Automated | 1 | Pass |
| 1.2.4 | Verify 請確保 kubelet 的憑證授權單位已設定正確。 | Automated | 1 | Pass |
| 1.2.5 | Ensure --authorization-mode 參數未設定為。AlwaysAllow |
Automated | 1 | Pass |
| 1.2.6 | Verify 已啟用 RBAC。 | Automated | 1 | Pass |
| 1.2.7 | Ensure 請確認 APIPriorityAndFairness 功能閘已啟用。 |
Manual | 1 | INHERENTLY MET |
| 1.2.8 | Ensure 表示存取控制外掛程式 AlwaysAdmit 尚未設定。 |
Automated | 1 | Pass |
| 1.2.9 | Ensure 表示存取控制外掛程式 AlwaysPullImages 尚未設定。 |
Automated | 1 | Pass |
| 1.2.10 | Ensure 請確保已設定存取控制外掛程式 ServiceAccount。 |
Automated | 1 | Pass |
| 1.2.11 | Ensure 請確保已設定存取控制外掛程式 NamespaceLifecycle。 |
Automated | 1 | Pass |
| 1.2.12 | Ensure 請確保已設定存取控制外掛程式 SecurityContextConstraint。 |
Automated | 1 | Pass |
| 1.2.13 | Ensure 請確保已設定存取控制外掛程式 NodeRestriction。 |
Automated | 1 | Pass |
| 1.2.14 | Ensure 表示 --insecure-bind-address 參數未設定。 |
Automated | 1 | Pass |
| 1.2.15 | Ensure --insecure-port 參數已設定為 0。MET |
Manual | 1 | |
| 1.2.16 | Ensure --secure-port 參數未設定為 0。 |
Automated | 1 | Pass |
| 1.2.17 | Ensure healthz 端點受 RBAC 保護。已勾選 |
Automated | 1 | |
| 1.2.18 | Ensure 表示已設定 --audit-log-path 參數。 |
Automated | 1 | Pass |
| 1.2.19 | Ensure 審計日誌會被轉發至叢集外部以供留存。[ | 自動化 | 1 | 未核對 |
| 1.2.20 | Ensure 請確保 maximumRetainedFiles 參數設定為 10 或適當的值。 [ |
自動化 | 1 | 未檢查 |
| 1.2.21 | Configure Kubernetes API 伺服器稽核日誌最大大小。已勾選「」 | Automated | 1 | |
| 1.2.22 | Ensure 表示已設定 --request-timeout 參數。 |
Automated | 1 | Pass |
| 1.2.23 | Ensure 請確保 --service-account-lookup 參數已設定為 true。 |
Automated | 1 | Pass |
| 1.2.24 | Ensure 請確保已適當設定 --service-account-key-file 參數。 |
Automated | 1 | Pass |
| 1.2.25 | Ensure 請確保 --etcd-certfile 和 --etcd-keyfile 參數已設定為適當的值。 |
Automated | 1 | Pass |
| 1.2.26 | Ensure 請確保已適當設定 --tls-cert-file 和 --tls-private-key-file 參數。 |
Automated | 1 | Pass |
| 1.2.27 | Ensure 請確保將 --client-ca-file 參數設定為適當的值。 |
Automated | 1 | Pass |
| 1.2.28 | Ensure 請確保已適當設定 --etcd-cafile 參數。 |
Automated | 1 | Pass |
| 1.2.29 | Ensure 加密服務供應商已進行適當的設定。[ | 自動化 | 1 | 未檢查 |
| 1.2.30 | Ensure 確保 API 伺服器僅使用強加密演算法。 | Automated | 1 | Not 已核對 |
| 1.2.31 | Ensure 不支援的設定覆寫將不予採用。 | Manual | 1 | Pass |
1.3 控制器經理
| 章節 | 建議 | 手動/自動 | 等級 | 結果 |
|---|---|---|---|---|
| 1.3.1 | Ensure 該控制器管理員 healthz 的端點受 RBAC 保護。 |
Automated | 1 | Not 已勾選 |
| 1.3.2 | Ensure 請確保 --use-service-account-credentials 參數設定為 true。 |
Automated | 1 | Pass |
| 1.3.3 | Ensure 請確保已適當設定 --service-account-private-key-file 參數。 |
Automated | 1 | Pass |
| 1.3.4 | Ensure 請確保已正確設定 --root-ca-file 參數。 |
Automated | 1 | Pass |
1.4 排程器
| 章節 | 建議 | 手動/自動 | 等級 | 結果 |
|---|---|---|---|---|
| 1.4.1 | Ensure 排程器的 healthz 端點受 RBAC 保護。 |
Automated | 1 | Not 已勾選 |
| 1.4.2 | Verify 排程器 API 服務受 RBAC 保護。 | Automated | 1 | Not 已勾選 |
2 Etcd
| 章節 | 建議 | 手動/自動 | 等級 | 結果 |
|---|---|---|---|---|
| 2.1 | Ensure 請確保已適當設定 --cert-file 和 --key-file 參數。 |
Automated | 1 | Pass |
| 2.2 | Ensure 請確保 --client-cert-auth 參數已設定為 true。 |
Automated | 1 | Pass |
| 2.3 | Ensure --auto-tls 參數未設定為 true。 |
Automated | 1 | Pass |
| 2.4 | Ensure 請確保 --peer-cert-file 及 --peer-key-file 參數已設定為適當值。 |
Automated | 1 | Pass |
| 2.5 | Ensure 請確保 --peer-client-cert-auth 參數已設定為 true。 |
Automated | 1 | Pass |
| 2.6 | Ensure --peer-auto-tls 參數未設定為 true。 |
Automated | 1 | Pass |
| 2.7 | Ensure etcd 採用了唯一的憑證授權機構。[ | 自動化 | 2 | 未檢查 |
3 控制平面設定
3.2 登錄
| 章節 | 建議 | 手動/自動 | 等級 | 結果 |
|---|---|---|---|---|
| 3.2.1 | Ensure 已建立最低限度稽核政策。 | Automated | 1 | Not 已勾選 |
| 3.2.2 | Ensure 審計政策涵蓋了關鍵的安全考量。 | Automated | 2 | Not 已核對 |
4 個工作節點
4.1 工作節點配置檔案
| 章節 | 建議 | 手動/自動 | 等級 | 結果 |
|---|---|---|---|---|
| 4.1.1 | Ensure kubelet 服務檔案的權限設定須為「644」或更嚴格的權限。 |
Automated | 1 | Pass |
| 4.1.2 | Ensure kubelet 服務檔案的所有權已設定為 root:root。 |
Automated | 1 | Pass |
| 4.1.3 | If 若存在 proxy kube 代理設定檔,請確保權限設定為「644」或更嚴格的權限。 |
Automated | 1 | Not 已檢查 |
| 4.1.4 | If 若代理伺服器 kubeconfig 檔案存在,請確保其擁有權已設定為 root:root。 |
Automated | 1 | Not 已檢查 |
| 4.1.5 | Ensure 請確認 --中的 kubeconfig 檔案`` kubelet.conf file permissions are set to 644 or more restrictive. |
Automated | 1 | Pass |
| 4.1.6 | Ensure that the --kubeconfig`` kubelet.conf 的所有權已設定為 root:root。 |
Automated | 1 | Pass |
| 4.1.7 | Ensure 請確保憑證授權單位的檔案權限設定為「644」或更嚴格的權限。 |
Automated | 1 | Pass |
| 4.1.8 | Ensure 客戶端憑證授權單位檔案的所有權已設定為 root:root。 |
Automated | 1 | Pass |
| 4.1.9 | Ensure kubelet 的 --config 設定檔權限須設定為 600 或更嚴格的權限。 |
Automated | 1 | Pass |
| 4.1.10 | Ensure kubelet 配置檔案的所有權已設定為 root:root。 |
Automated | 1 | Pass |
4.2 Kubelet
| 章節 | 建議 | 手動/自動 | 等級 | 結果 |
|---|---|---|---|---|
| 4.2.1 | Activate OpenShift Container Platform 4 中的垃圾回收機制,詳情請參閱相關說明。 | Automated | 1 | Pass |
| 4.2.2 | Ensure --anonymous-auth 參數已設定為 false。 |
Automated | 1 | Pass |
| 4.2.3 | Ensure --authorization-mode 參數未設定為。AlwaysAllow |
Automated | 1 | Pass |
| 4.2.4 | Ensure 請確保已適當設定 --client-ca-file 參數。 |
Automated | 1 | Pass |
| 4.2.5 | Verify 表示該唯讀埠未被使用,或已設定為 0。 | Automated | 1 | Pass |
| 4.2.6 | Ensure --streaming-connection-idle-timeout 參數未設定為 0。 |
Automated | 1 | Pass |
| 4.2.7 | Ensure 請確保 --make-iptables-util-chains 參數已設定為 true。 |
Automated | 1 | Pass |
| 4.2.8 | Ensure 確保將 kubeAPIQPS[--event-qps] 參數設定為能確保適當事件擷取的層級。 |
Automated | 2 | Pass |
| 4.2.9 | Ensure 請確保已適當設定 --tls-cert-file 和 --tls-private-key-file 參數。 |
Automated | 1 | Pass |
| 4.2.10 | Ensure 請確認 --rotate-certificates 參數未設定為 false。 |
Automated | 1 | Pass |
| 4.2.11 | Verify 請確保 RotateKubeletServerCertificate 參數已設定為 true。 |
Automated | 1 | Pass |
| 4.2.12 | Ensure Kubelet 僅使用強加密演算法。 | Automated | 1 | Pass |
5 項政策
5.1 基於角色的存取控制(RBAC)與服務帳戶
| 章節 | 建議 | 手動/自動 | 等級 | 結果 |
|---|---|---|---|---|
| 5.1.1 | Ensure 即「cluster-admin」角色僅在必要時使用。 | Manual | 1 | MANUAL |
| 5.1.2 | Minimize 接觸機密資訊。 | Manual | 1 | MANUAL |
| 5.1.3 | Minimize 在 Roles 和 ClusterRoles 中使用通配符。 |
Manual | 1 | MANUAL |
| 5.1.4 | Minimize 建立 Pod 的權限。 | Manual | 1 | MANUAL |
| 5.1.5 | Ensure 預設服務帳戶並未被積極使用。 | Manual | 1 | MANUAL |
| 5.1.6 | Ensure 服務帳戶憑證僅在必要時才會被掛載。 | Manual | 1 | MANUAL |
5.2 安全性上下文限制
| 章節 | 建議 | 手動/自動 | 等級 | 結果 |
|---|---|---|---|---|
| 5.2.1 | Minimize 允許使用特權容器。 | Manual | 1 | MANUAL |
| 5.2.2 | Minimize 允許容器共用主進程的 ID 名稱空間。 | Manual | 1 | MANUAL |
| 5.2.3 | Minimize 允許希望共用主機 IPC 命名空間的容器加入。 | Manual | 1 | MANUAL |
| 5.2.4 | Minimize 允許容器加入並共用主機網路命名空間。 | Manual | 1 | MANUAL |
| 5.2.5 | Minimize 允許使用 allowPrivilegeEscalation 傳入的容器。 |
Manual | 1 | MANUAL |
| 5.2.6 | Minimize 允許使用根容器。 | Manual | 2 | MANUAL |
| 5.2.7 | Minimize 允許具備 NET_RAW 功能的容器進入。 | Manual | 1 | MANUAL |
| 5.2.8 | Minimize 允許進口具備附加功能的貨櫃。[ | 自動化 | 1 | 未核對 |
| 5.2.9 | Minimize 接納已分配容量的貨櫃。 | Manual | 2 | MANUAL |
| 5.2.10 | Minimize 存取具有特權的安全上下文限制。 | Manual | 2 | MANUAL |
5.3 網路政策與 CNI
| 章節 | 建議 | 手動/自動 | 等級 | 結果 |
|---|---|---|---|---|
| 5.3.1 | Ensure 確保正在使用的 CNI 支援網路政策。 | Automated | 1 | Not 已勾選 |
| 5.3.2 | Ensure 所有命名空間均已定義網路原則。[ | 手動 | 2 | MANUAL |
5.4 機密管理
| 章節 | 建議 | 手動/自動 | 等級 | 結果 |
|---|---|---|---|---|
| 5.4.1 | Prefer 優先使用以檔案形式儲存的機密,而非以環境變數形式儲存的機密。 | Manual | 1 | MANUAL |
| 5.4.2 | Consider 外部機密儲存裝置。 | Manual | 2 | MANUAL |
5.5 可擴展的存取控制
| 章節 | 建議 | 手動/自動 | 等級 | 結果 |
|---|---|---|---|---|
| 5.5.1 | Configure 使用影像控制器設定參數來追蹤影像來源。 | Automated | 2 | Not 已勾選 |
5.7 一般政策
| 章節 | 建議 | 手動/自動 | 等級 | 結果 |
|---|---|---|---|---|
| 5.7.1 | Create 利用命名空間在資源之間劃定行政邊界。 | Manual | 1 | MANUAL |
| 5.7.2 | Ensure 請確保在您的 Pod 定義中,seccomp 設定為 docker/default。 |
Manual | 2 | MANUAL |
| 5.7.3 | Apply Pod 和容器的安全上下文。 | Manual | 2 | MANUAL |
| 5.7.4 | The 不應使用預設命名空間。 | Manual | 2 | MANUAL |
IBM 補救措施與說明
| 章節 | 建議/說明 |
|---|---|
| 1.2.19 | Red 根據 OpenShift 上的說明,IBM Cloud 可選擇性地啟用 Kubernetes API 伺服器稽核功能。 |
| 1.2.20 | Red 在 IBM Cloud 上,OpenShift 會將 maximumRetainedFiles 參數設定為 1。 |
| 1.2.29 | Red OpenShift 在 Cloud 上的功能可選擇啟用 金鑰管理服務 (KMS) 供應商。 |
| 2.7 | Red Hat OpenShift 在 IBM Cloud 上為 etcd 設定了一個專屬的憑證授權機構。 |
| 5.2.8 | Red Hat OpenShift 在 IBM Cloud 上安裝了自訂的 SCCs。 |
| 5.3.2 | Red 請參閱 OpenShift 中的 IBM Cloud 已預設定義了一組 Calico 網路政策,並可選擇性地新增其他網路政策。 |