TMAegis
Thêm quy tắc cho docker

TMA-DOCKER-2.8

Ensure TLS authentication for Docker daemon is configured

Nghiêm trọngCấp 1Tự độngdocker

Mô tả

When the daemon listens on a TCP socket, anyone who can reach it controls the host unless TLS client verification is enabled. Compliant when no tcp:// host is configured, or when tlsverify, tlscacert, tlscert and tlskey are all set. The audit reads the running dockerd command line (ps) together with /etc/docker/daemon.json.

Cách kiểm tra

Phương pháp kiểm tra: Lệnh shell

shell
args=$(ps -eo args 2>/dev/null) || exit 1; s=$(printf '%s\n' "$args" | grep '[d]ockerd'; cat /etc/docker/daemon.json 2>/dev/null); if printf '%s\n' "$s" | grep -q 'tcp://'; then for k in tlsverify tlscacert tlscert tlskey; do printf '%s\n' "$s" | grep -Eq -e "--$k|\"$k\"" || { echo "missing $k"; exit 0; }; done; fi; echo compliant
Đầu ra mong đợi
compliant

Cách khắc phục

Phương pháp khắc phục: Hướng dẫn hoặc bản vá hạ tầng

Configure "tlsverify": true, "tlscacert", "tlscert" and "tlskey" in /etc/docker/daemon.json (or the equivalent dockerd flags) for any tcp:// listener, or remove the TCP listener, then restart the Docker daemon.

Thuộc tính

Hệ điều hành
Bất kỳ
Thẻ
dockerdaemontls
Tham chiếu
CIS Docker Benchmark v1.9.0 - 2.8 Ensure TLS authentication for Docker daemon is configured

Kiểm tra máy này

Chạy lệnh này trên máy bạn được phép kiểm tra. Lần quét chỉ ở chế độ đọc.

shell
tmaegis scan --target docker