TMA-DOCKER-2.8
Ensure TLS authentication for Docker daemon is configured
CríticaNível 1Automatizadadocker
Descrição
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.
Como é verificado
Método de auditoria: Comando 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- Saída esperada
compliant
Como é corrigido
Método de correção: Orientação ou patch de infraestrutura
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.
Propriedades
- Sistemas operacionais
- Qualquer
- Tags
- dockerdaemontls
- Referência
- CIS Docker Benchmark v1.9.0 - 2.8 Ensure TLS authentication for Docker daemon is configured
Verificar este host
Execute isto em uma máquina que você tenha permissão para auditar. A varredura é somente leitura.
shell
tmaegis scan --target docker