TMA-DOCKER-3.13
Ensure that the Docker server certificate key file ownership is set to root:root
YüksekDüzey 1Otomatikdocker
Açıklama
The Docker server certificate key file must be owned by root:root so that it cannot be replaced by unprivileged users. The path is taken from --tlskey on the dockerd command line or "tlskey" in /etc/docker/daemon.json (default /root/.docker/key.pem); compliant when no such file exists (TLS not configured).
Nasıl denetlenir
Denetim yöntemi: Kabuk komutu
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); p=$(printf '%s\n' "$s" | sed -n -e 's/.*--tlskey[= ]\([^ ]*\).*/\1/p' -e 's/.*"tlskey"[[:space:]]*:[[:space:]]*"\([^"]*\)".*/\1/p' | head -n 1); [ -n "$p" ] || p=/root/.docker/key.pem; [ -e "$p" ] || { echo compliant; exit 0; }; o=$(stat -Lc '%U:%G' "$p") || exit 1; [ "$o" = root:root ] && echo compliant || echo "$p $o"- Beklenen çıktı
compliant
Nasıl düzeltilir
Düzeltme yöntemi: Kılavuz veya altyapı yaması
chown root:root <path of the tlskey file> (as configured for dockerd).
Özellikler
- İşletim sistemleri
- Herhangi biri
- Etiketler
- dockerpermissionstls
- Referans
- CIS Docker Benchmark v1.9.0 - 3.13 Ensure that the Docker server certificate key file ownership is set to root:root
Bu ana makineyi denetle
Bunu denetleme izniniz olan bir makinede çalıştırın. Tarama salt okunurdur.
shell
tmaegis scan --target docker