1.5.7 Ensure that the --wal-dir argument is set as appropriate

Information

Store etcd logs separately from etcd data.

Rationale:

etcd is a highly-available key value store used by Kubernetes deployments for persistent storage of all of its REST API objects. These objects are sensitive in nature and should not be mixed with log data. Keeping the log data separate from the etcd data also ensures that those two types of data could individually be safeguarded. Also, you could use a centralized and remote log directory for persistent logging. Additionally, this separation also helps to avoid IO competition between logging and other IO operations.

Solution

Edit the etcd environment file (for example, `/etc/etcd/etcd.conf`) on the etcd server node and set the `ETCD_WAL_DIR` parameter as appropriate: `ETCD_WAL_DIR=''`

Edit the etcd startup file (for example, `/etc/systemd/system/multi-user.target.wants/etcd.service`) and configure the startup parameter for `--wal-dir` and set it to `'${ETCD_WAL_DIR}'`: `ExecStart=/bin/bash -c 'GOMAXPROCS=$(nproc) /usr/bin/etcd --name='${ETCD_NAME}' --data-dir='${ETCD_DATA_DIR}' --listen-client-urls='${ETCD_LISTEN_CLIENT_URLS}' --wal-dir='${ETCD_WAL_DIR}''`

Based on your system, reload the daemon and restart the etcd service. For example, `systemctl daemon-reload systemctl restart etcd.service`

Impact:

None

See Also

https://workbench.cisecurity.org/files/1738

Item Details

Category: AUDIT AND ACCOUNTABILITY

References: 800-53|AU-9, CSCv6|14

Plugin: Unix

Control ID: 8fcadb3d425940b8192df2cf537a639b8af717a5c6f82bffb3b687ad3c2a796f