|
| 1 | +--- |
| 2 | +controls: |
| 3 | +version: "cis-1.24" |
| 4 | +id: 2 |
| 5 | +text: "Datastore Node Configuration" |
| 6 | +type: "etcd" |
| 7 | +groups: |
| 8 | + - id: 2 |
| 9 | + text: "Datastore Node Configuration" |
| 10 | + checks: |
| 11 | + - id: 2.1 |
| 12 | + text: "Ensure that the --cert-file and --key-file arguments are set as appropriate (Automated)" |
| 13 | + tests: |
| 14 | + test_items: |
| 15 | + - flag: "--not-applicable" |
| 16 | + set: false |
| 17 | + remediation: | |
| 18 | + Not applicable. Canonical K8s uses dqlite and the communication to this service is done through a |
| 19 | + local socket (/var/snap/k8s/common/var/lib/k8s-dqlite/k8s-dqlite.sock) accessible to users with root permissions. |
| 20 | + scored: true |
| 21 | + |
| 22 | + - id: 2.2 |
| 23 | + text: "Ensure that the --client-cert-auth argument is set to true (Automated)" |
| 24 | + tests: |
| 25 | + test_items: |
| 26 | + - flag: "--not-applicable" |
| 27 | + set: false |
| 28 | + remediation: | |
| 29 | + Not applicable. Canonical K8s uses dqlite and the communication to this service is done through a |
| 30 | + local socket (/var/snap/k8s/common/var/lib/k8s-dqlite/k8s-dqlite.sock) accessible to users with root permissions. |
| 31 | + scored: true |
| 32 | + |
| 33 | + - id: 2.3 |
| 34 | + text: "Ensure that the --auto-tls argument is not set to true (Automated)" |
| 35 | + tests: |
| 36 | + test_items: |
| 37 | + - flag: "--not-applicable" |
| 38 | + set: false |
| 39 | + remediation: | |
| 40 | + Not applicable. Canonical K8s uses dqlite and the communication to this service is done through a |
| 41 | + local socket (/var/snap/k8s/common/var/lib/k8s-dqlite/k8s-dqlite.sock) accessible to users with root permissions. |
| 42 | + scored: true |
| 43 | + |
| 44 | + - id: 2.4 |
| 45 | + text: "Ensure that the --peer-cert-file and --peer-key-file arguments are set as appropriate (Automated)" |
| 46 | + audit: "if test -e /var/snap/k8s/common/var/lib/k8s-dqlite/cluster.crt && test -e /var/snap/k8s/common/var/lib/k8s-dqlite/cluster.key; then echo 'certs-found'; fi" |
| 47 | + tests: |
| 48 | + test_items: |
| 49 | + - flag: "certs-found" |
| 50 | + remediation: | |
| 51 | + The certificate pair for dqlite and tls peer communication is |
| 52 | + /var/snap/k8s/common/var/lib/k8s-dqlite/cluster.crt and |
| 53 | + /var/snap/k8s/common/var/lib/k8s-dqlite/cluster.key. |
| 54 | + scored: true |
| 55 | + |
| 56 | + - id: 2.5 |
| 57 | + text: "Ensure that the --peer-client-cert-auth argument is set to true (Automated)" |
| 58 | + audit: "/bin/cat $etcdconf | /bin/grep enable-tls || true; echo $?" |
| 59 | + tests: |
| 60 | + bin_op: or |
| 61 | + test_items: |
| 62 | + - flag: "--enable-tls" |
| 63 | + compare: |
| 64 | + op: eq |
| 65 | + value: true |
| 66 | + - flag: "--enable-tls" |
| 67 | + set: false |
| 68 | + remediation: | |
| 69 | + Dqlite peer communication uses TLS unless the --enable-tls is set to false in |
| 70 | + /var/snap/k8s/common/args/k8s-dqlite. |
| 71 | + scored: true |
| 72 | + |
| 73 | + - id: 2.6 |
| 74 | + text: "Ensure that the --peer-auto-tls argument is not set to true (Automated)" |
| 75 | + tests: |
| 76 | + test_items: |
| 77 | + - flag: "--not-applicable" |
| 78 | + set: false |
| 79 | + remediation: | |
| 80 | + Not applicable. Canonical K8s uses dqlite and tls peer communication uses the certificates |
| 81 | + created upon the snap creation. |
| 82 | + scored: false |
| 83 | + |
| 84 | + - id: 2.7 |
| 85 | + text: "Ensure that a unique Certificate Authority is used for the datastore (Manual)" |
| 86 | + tests: |
| 87 | + test_items: |
| 88 | + - flag: "--not-applicable" |
| 89 | + set: false |
| 90 | + remediation: | |
| 91 | + Not applicable. Canonical K8s uses dqlite and tls peer communication uses certificates |
| 92 | + created upon cluster setup. |
| 93 | + scored: true |
0 commit comments