4.11 合规性操作程序基准
该版本已不再支持。 尽快将集群更新为 受支持的版本。
1 控制平面组件
1.1 主节点配置文件
主节点配置未存储为一组文件,因此 1.1 部分中的规则超出合规性操作程序自动检查的范围。
1.2 API 服务器
部分 | 建议 | 手动/自动 | 级别 | 结果 |
---|---|---|---|---|
1.2.1 | 确保匿名请求已获得授权。 | 手动 | 1 | 传递 |
1.2.2 | 确保未设置 --basic-auth-file 选项。 |
自动 | 1 | 传递 |
1.2.3 | 确保未设置 --token-auth-file 参数。 |
自动 | 1 | 传递 |
1.2.4 | 将 https 用于 kubelet 连接。 |
自动 | 1 | 失败 |
1.2.5 | 确保 kubelet 使用证书进行认证。 | 自动 | 1 | 传递 |
1.2.6 | 验证是否根据需要设置了 kubelet 认证中心。 | 自动 | 1 | 传递 |
1.2.7 | 确保 --authorization-mode 选项未设置为 AlwaysAllow 。 |
自动 | 1 | 传递 |
1.2.8 | 验证 Node 授权者是否已启用。 | 自动 | 1 | 传递 |
1.2.9 | 验证 RBAC 是否已启用。 | 自动 | 1 | 传递 |
1.2.10 | 确保已启用 APIPriorityAndFairness 功能部件门。 |
手动 | 1 | 传递 |
1.2.11 | 确保未设置许可控制插件 AlwaysAdmit 。 |
自动 | 1 | 传递 |
1.2.12 | 确保未设置许可控制插件 AlwaysPullImages 。 |
手动 | 1 | 传递 |
1.2.13 | 确保未设置许可控制插件 SecurityContextDeny 。 |
手动 | 1 | 传递 |
1.2.14 | 确保设置了许可控制插件 ServiceAccount 。 |
自动 | 1 | 传递 |
1.2.15 | 确保设置了许可控制插件 NamespaceLifecycle 。 |
自动 | 1 | 传递 |
1.2.16 | 确保设置了许可控制插件 SecurityContextConstraint 。 |
自动 | 1 | 传递 |
1.2.17 | 确保设置了许可控制插件 NodeRestriction 。 |
自动 | 1 | 传递 |
1.2.18 | 确保未设置 --insecure-bind-address 选项。 |
自动 | 1 | 传递 |
1.2.19 | 确保 --insecure-port option 设置为 0 。 |
自动 | 1 | 未检查 |
1.2.20 | 确保 --secure-port option 未设置为 0 。 |
自动 | 1 | 传递 |
1.2.21 | 确保 healthz 端点受 RBAC 保护。 |
自动 | 1 | 传递 |
1.2.22 | 确保设置了 --audit-log-path 选项。 |
自动 | 1 | 传递 |
1.2.23 | 确保将审计日志从集群中转发以进行保留。 | 自动 | 1 | 未检查 |
1.2.24 | 确保 maximumRetainedFiles 选项设置为 10 或适当的选项。 |
自动 | 1 | 传递 |
1.2.25 | 确保 maximumFileSizeMegabytes 选项设置为 100 或适当的选项。 |
自动 | 1 | 传递 |
1.2.26 | 确保根据需要设置 --request-timeout 选项。 |
自动 | 1 | 传递 |
1.2.27 | 确保 --service-account-lookup 选项设置为 true 。 |
自动 | 1 | 传递 |
1.2.28 | 确保根据需要设置 --service-account-key-file 选项。 |
自动 | 1 | 传递 |
1.2.29 | 确保根据需要设置 --etcd-certfile 和 --etcd-keyfile 选项。 |
自动 | 1 | 传递 |
1.2.30 | 确保根据需要设置 --tls-cert-file 和 --tls-private-key-file 选项。 |
自动 | 1 | 传递 |
1.2.31 | 确保根据需要设置 --client-ca-file 选项。 |
自动 | 1 | 传递 |
1.2.32 | 确保根据需要设置 --etcd-cafile 选项。 |
自动 | 1 | 传递 |
1.2.33 | 确保根据需要设置 --encryption-provider-config 选项。 |
手动 | 1 | 未检查 |
1.2.34 | 确保正确配置了加密提供程序。 | 手动 | 1 | 未检查 |
1.2.35 | 确保 API 服务器仅使用强加密密码。 | 手动 | 1 | 传递 |
1.3 控制器管理器
部分 | 建议 | 手动/自动 | 级别 | 结果 |
---|---|---|---|---|
1.3.1 | Ensure 已根据需要配置垃圾回收。 | Manual | 1 | Not |
1.3.2 | Ensure 控制器管理器 healthz 端点受 RBAC 保护。 |
Automated | 1 | Pass |
1.3.3 | Ensure --use-service-account-credentials 选项设置为 true 。 |
Automated | 1 | Pass |
1.3.4 | Ensure 已根据需要设置 --service-account-private-key-file 选项。 |
Automated | 1 | Pass |
1.3.5 | Ensure 已根据需要设置 --root-ca-file option 。 |
Automated | 1 | Pass |
1.3.6 | Ensure RotateKubeletServerCertificate 选项设置为 true 。 |
Automated | 2 | Pass |
1.3.7 | Ensure 将 --bind-address option 设置为 127.0.0.1 。 |
Automated | 1 | Pass |
1.4 调度程序
部分 | 建议 | 手动/自动 | 级别 | 结果 |
---|---|---|---|---|
1.4.1 | Ensure 调度程序的 healthz 端点受 RBAC 保护。 |
Automated | 1 | Pass |
1.4.2 | Verify 调度程序 API 服务是否受认证和授权保护。 | Automated | 1 | Pass |
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 option 设置为 true 。 |
Automated | 1 | Pass |
2.7 | Ensure 将唯一认证中心用于 etcd。 | 手动 | 2 | 未选中 |
3 控制平面配置
3.3.1验证和授权
部分 | 建议 | 手动/自动 | 级别 | 结果 |
---|---|---|---|---|
3.1.1 | 请勿对用户使用客户机证书认证。 | Manual | 2 | Pass |
3.2 日志记录
部分 | 建议 | 手动/自动 | 级别 | 结果 |
---|---|---|---|---|
3.2.1 | Ensure 创建最小审计策略。 | Automated | 1 | Pass |
3.2.2 | Ensure 审计策略涵盖关键安全问题。 | Manual | 2 | Pass |
4 个工作程序节点
遵循 使用合规性操作程序 中的指示信息对工作程序节点配置执行自动检查。
5 个策略
5.1 RBAC 和服务帐户
部分 | 建议 | 手动/自动 | 级别 | 结果 |
---|---|---|---|---|
5.1.1 | Ensure 仅在需要时使用 cluster-admin 角色。 | Manual | 1 | 传递 |
5.1.2 | Minimize 对私钥的访问。 | Manual | 1 | 未选中 |
5.1.3 | Minimize 在角色和 ClusterRoles 中使用通配符。 |
Manual | 1 | 未选中 |
5.1.4 | Minimize 访问权以创建 pod。 | Manual | 1 | 未选中 |
5.1.5 | Ensure 未主动使用缺省服务帐户 used. | Automated | 1 | 未选中 |
5.1.6 | Ensure 仅在必要时安装服务帐户令牌。 | Manual | 1 | 未选中 |
5.5.2吊舱安全政策
部分 | 建议 | 手动/自动 | 级别 | 结果 |
---|---|---|---|---|
5.2.1 | Minimize 特权容器的许可。 | Manual | 1 | 未选中 |
5.2.2 | Minimize 允许要共享主机进程标识名称空间的容器。 | Automated | 1 | 未选中 |
5.2.3 | Minimize 允许要共享主机 IPC 名称空间的容器。 | Automated | 1 | 未选中 |
5.2.4 | Minimize 允许要共享主机网络名称空间的容器。 | Automated | 1 | 未选中 |
5.2.5 | Minimize 允许使用 allowPrivilegeEscalation 的容器。 |
Automated | 1 | 未选中 |
5.2.6 | Minimize 根容器的许可。 | Manual | 2 | 未选中 |
5.2.7 | Minimize 允许具有 NET_RAW 功能的容器。 |
Manual | 1 | 未选中 |
5.2.8 | Minimize 允许具有已添加功能的容器。 | 手动 | 1 | 未选中 |
5.2.9 | Minimize 已分配功能的容器的许可。 | Manual | 2 | 未选中 |
5.3 网络策略和 CNI
部分 | 建议 | 手动/自动 | 级别 | 结果 |
---|---|---|---|---|
5.3.1 | Ensure 正在使用的 CNI 支持网络策略。 | Manual | 1 | 传递 |
5.3.2 | Ensure 所有名称空间都定义了网络策略。 | 自动 | 2 | 未选中 |
5.4 私钥管理
部分 | 建议 | 手动/自动 | 级别 | 结果 |
---|---|---|---|---|
5.4.1 | Prefer 将私钥用作基于私钥的文件作为环境变量。 | Manual | 1 | 未选中 |
5.4.2 | Consider 外部密钥存储器。 | Manual | 2 | 未选中 |
5.5 可扩展许可控制
部分 | 建议 | 手动/自动 | 级别 | 结果 |
---|---|---|---|---|
5.5.1 | Configure 映像来源。 | Manual | 2 | 未选中 |
5.7 常规策略
部分 | 建议 | 手动/自动 | 级别 | 结果 |
---|---|---|---|---|
5.7.1 | Create 管理边界。 | Manual | 1 | Not |
5.7.2 | Ensure 在 pod 定义中将 seccomp 概要文件设置为 docker/default 。 |
Manual | 2 | Not |
5.7.3 | Apply 安全上下文应用于 pod 和容器。 | Manual | 2 | Not |
5.7.4 | Do 使用缺省名称空间。 | Automated | 2 | Not |
IBM 修复和说明
部分 | 建议/说明 |
---|---|
1.2.4 | 缺省情况下,Red Hat OpenShift on IBM Cloud 配置 IBM Cloud IAM 身份提供者。 |
1.2.19 | 修复 https://github.com/ComplianceAsCode/compliance-operator/issues/77 时,测试将正确忽略 Red Hat OpenShift 版本 4.11 和更高版本的集群。 |
1.2.23 | Red Hat OpenShift on IBM Cloud 可以选择启用 Kubernetes API 服务器审计。 |
1.2.33 | Red Hat OpenShift on IBM Cloud 可以选择启用 Kubernetes 密钥管理服务 (KMS) 提供程序。 |
1.2.34 | Red Hat OpenShift on IBM Cloud 可以选择启用 Kubernetes 密钥管理服务 (KMS) 提供程序。 |
2.7 | Red Hat OpenShift on IBM Cloud 为 etcd配置唯一认证中心。 |
5.2.8 | Red Hat OpenShift on IBM Cloud 安装定制 SCC。 |
5.3.1 | 查看 GitHub 中的问题。 |
5.3.2 | Red Hat OpenShift on IBM Cloud 定义了一组已定义的缺省 Calico 网络策略,可以选择添加其他网络策略。 |