mirror of
https://github.com/aquasecurity/kube-bench.git
synced 2025-02-06 12:51:58 +00:00
3a2348eba7
* Create cis-1.10 yamls and Update info - Modify yaml versions from 1.9 to 1.10 - Adapt configmap to cover cis-1.10 - Adapt docs and cmd files * Adapt master.yaml - 1.2.29 update cipher list to remove the following insecure ones (RC4-Based, 3DES-Based, RSA-Based AES CBC): TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA, TLS_RSA_WITH_3DES_EDE_CBC_SHA, TLS_RSA_WITH_AES_128_CBC_SHA256, TLS_RSA_WITH_AES_128_CBC_SHA, TLS_RSA_WITH_AES_256_CBC_SHA, TLS_RSA_WITH_RC4_128_SHA, TLS_ECDHE_RSA_WITH_RC4_128_SHA ticket: https://workbench.cisecurity.org/community/43/tickets/21760 * Adapt policies.yaml - 5.1.11 typo in sub-resource name 'certificatesigningrequest' https://workbench.cisecurity.org/tickets/21352 - 5.2.2 new audit to verify if a container is privileged or not. https://workbench.cisecurity.org/tickets/20919 - 5.2.3 new audit to verify the presence of hostPID opt-in across all pods. https://workbench.cisecurity.org/tickets/20919 - 5.2.4 new audit to verify the presence of hostIPC opt-in across all pods. https://workbench.cisecurity.org/tickets/20923 - 5.2.5 new audit to verify the presence of hostNetwork opt-in across all pods. https://workbench.cisecurity.org/tickets/20921 - 5.2.6 new audit to verify the presence of 'allowPrivilegeEscalation' to true across all pods' container(s) - 5.2.6 the 'allowPrivilegeEscalation' setting is moved from 'spec' to 'securityContext' https://workbench.cisecurity.org/tickets/20922 - 5.2.9 new audit to verify the presence of added capabilities across all pods' container(s) * Fix 5.2.6 remediation
136 lines
4.8 KiB
YAML
136 lines
4.8 KiB
YAML
---
|
|
controls:
|
|
version: "cis-1.10"
|
|
id: 2
|
|
text: "Etcd Node Configuration"
|
|
type: "etcd"
|
|
groups:
|
|
- id: 2
|
|
text: "Etcd Node Configuration"
|
|
checks:
|
|
- id: 2.1
|
|
text: "Ensure that the --cert-file and --key-file arguments are set as appropriate (Automated)"
|
|
audit: "/bin/ps -ef | /bin/grep $etcdbin | /bin/grep -v grep"
|
|
tests:
|
|
bin_op: and
|
|
test_items:
|
|
- flag: "--cert-file"
|
|
env: "ETCD_CERT_FILE"
|
|
- flag: "--key-file"
|
|
env: "ETCD_KEY_FILE"
|
|
remediation: |
|
|
Follow the etcd service documentation and configure TLS encryption.
|
|
Then, edit the etcd pod specification file /etc/kubernetes/manifests/etcd.yaml
|
|
on the master node and set the below parameters.
|
|
--cert-file=</path/to/ca-file>
|
|
--key-file=</path/to/key-file>
|
|
scored: true
|
|
|
|
- id: 2.2
|
|
text: "Ensure that the --client-cert-auth argument is set to true (Automated)"
|
|
audit: "/bin/ps -ef | /bin/grep $etcdbin | /bin/grep -v grep"
|
|
tests:
|
|
test_items:
|
|
- flag: "--client-cert-auth"
|
|
env: "ETCD_CLIENT_CERT_AUTH"
|
|
compare:
|
|
op: eq
|
|
value: true
|
|
remediation: |
|
|
Edit the etcd pod specification file $etcdconf on the master
|
|
node and set the below parameter.
|
|
--client-cert-auth="true"
|
|
scored: true
|
|
|
|
- id: 2.3
|
|
text: "Ensure that the --auto-tls argument is not set to true (Automated)"
|
|
audit: "/bin/ps -ef | /bin/grep $etcdbin | /bin/grep -v grep"
|
|
tests:
|
|
bin_op: or
|
|
test_items:
|
|
- flag: "--auto-tls"
|
|
env: "ETCD_AUTO_TLS"
|
|
set: false
|
|
- flag: "--auto-tls"
|
|
env: "ETCD_AUTO_TLS"
|
|
compare:
|
|
op: eq
|
|
value: false
|
|
remediation: |
|
|
Edit the etcd pod specification file $etcdconf on the master
|
|
node and either remove the --auto-tls parameter or set it to false.
|
|
--auto-tls=false
|
|
scored: true
|
|
|
|
- id: 2.4
|
|
text: "Ensure that the --peer-cert-file and --peer-key-file arguments are
|
|
set as appropriate (Automated)"
|
|
audit: "/bin/ps -ef | /bin/grep $etcdbin | /bin/grep -v grep"
|
|
tests:
|
|
bin_op: and
|
|
test_items:
|
|
- flag: "--peer-cert-file"
|
|
env: "ETCD_PEER_CERT_FILE"
|
|
- flag: "--peer-key-file"
|
|
env: "ETCD_PEER_KEY_FILE"
|
|
remediation: |
|
|
Follow the etcd service documentation and configure peer TLS encryption as appropriate
|
|
for your etcd cluster.
|
|
Then, edit the etcd pod specification file $etcdconf on the
|
|
master node and set the below parameters.
|
|
--peer-client-file=</path/to/peer-cert-file>
|
|
--peer-key-file=</path/to/peer-key-file>
|
|
scored: true
|
|
|
|
- id: 2.5
|
|
text: "Ensure that the --peer-client-cert-auth argument is set to true (Automated)"
|
|
audit: "/bin/ps -ef | /bin/grep $etcdbin | /bin/grep -v grep"
|
|
tests:
|
|
test_items:
|
|
- flag: "--peer-client-cert-auth"
|
|
env: "ETCD_PEER_CLIENT_CERT_AUTH"
|
|
compare:
|
|
op: eq
|
|
value: true
|
|
remediation: |
|
|
Edit the etcd pod specification file $etcdconf on the master
|
|
node and set the below parameter.
|
|
--peer-client-cert-auth=true
|
|
scored: true
|
|
|
|
- id: 2.6
|
|
text: "Ensure that the --peer-auto-tls argument is not set to true (Automated)"
|
|
audit: "/bin/ps -ef | /bin/grep $etcdbin | /bin/grep -v grep"
|
|
tests:
|
|
bin_op: or
|
|
test_items:
|
|
- flag: "--peer-auto-tls"
|
|
env: "ETCD_PEER_AUTO_TLS"
|
|
set: false
|
|
- flag: "--peer-auto-tls"
|
|
env: "ETCD_PEER_AUTO_TLS"
|
|
compare:
|
|
op: eq
|
|
value: false
|
|
remediation: |
|
|
Edit the etcd pod specification file $etcdconf on the master
|
|
node and either remove the --peer-auto-tls parameter or set it to false.
|
|
--peer-auto-tls=false
|
|
scored: true
|
|
|
|
- id: 2.7
|
|
text: "Ensure that a unique Certificate Authority is used for etcd (Manual)"
|
|
audit: "/bin/ps -ef | /bin/grep $etcdbin | /bin/grep -v grep"
|
|
tests:
|
|
test_items:
|
|
- flag: "--trusted-ca-file"
|
|
env: "ETCD_TRUSTED_CA_FILE"
|
|
remediation: |
|
|
[Manual test]
|
|
Follow the etcd documentation and create a dedicated certificate authority setup for the
|
|
etcd service.
|
|
Then, edit the etcd pod specification file $etcdconf on the
|
|
master node and set the below parameter.
|
|
--trusted-ca-file=</path/to/ca-file>
|
|
scored: false
|