github.com/khulnasoft-lab/kube-bench@v0.2.1-0.20240330183753-9df52345ae58/cfg/k3s-cis-1.23/controlplane.yaml (about) 1 --- 2 controls: 3 version: "k3s-cis-1.23" 4 id: 3 5 text: "Control Plane Configuration" 6 type: "controlplane" 7 groups: 8 - id: 3.1 9 text: "Authentication and Authorization" 10 checks: 11 - id: 3.1.1 12 text: "Client certificate authentication should not be used for users (Manual)" 13 type: "manual" 14 remediation: | 15 Alternative mechanisms provided by Kubernetes such as the use of OIDC should be 16 implemented in place of client certificates. 17 scored: false 18 19 - id: 3.2 20 text: "Logging" 21 checks: 22 - id: 3.2.1 23 text: "Ensure that a minimal audit policy is created (Manual)" 24 audit: "journalctl -D /var/log/journal -u k3s | grep 'Running kube-apiserver' | tail -n1 | grep 'audit-policy-file'" 25 type: "manual" 26 tests: 27 test_items: 28 - flag: "--audit-policy-file" 29 set: true 30 remediation: | 31 Create an audit policy file for your cluster. 32 scored: false 33 34 - id: 3.2.2 35 text: "Ensure that the audit policy covers key security concerns (Manual)" 36 type: "manual" 37 remediation: | 38 Review the audit policy provided for the cluster and ensure that it covers 39 at least the following areas, 40 - Access to Secrets managed by the cluster. Care should be taken to only 41 log Metadata for requests to Secrets, ConfigMaps, and TokenReviews, in 42 order to avoid risk of logging sensitive data. 43 - Modification of Pod and Deployment objects. 44 - Use of `pods/exec`, `pods/portforward`, `pods/proxy` and `services/proxy`. 45 For most requests, minimally logging at the Metadata level is recommended 46 (the most basic level of logging). 47 scored: false