YugabyteDB
TMA-YUGABYTEDB-1.6
Ensure the YugabyteDB service is run as a non-root user
CaoCấp 2Tự độngyugabytedb
Mô tả
Though YugabyteDB database may be run as root, it should run as another non-root user. Passes when every running yb-master / yb-tserver process runs as a non-root account (FAIL when none are running).
Cách kiểm tra
Phương pháp kiểm tra: Lệnh shell
shell
out=$(ps -eo user=,comm= 2>/dev/null) || exit 1; printf '%s\n' "$out" | awk '$2 == "yb-master" || $2 == "yb-tserver" {n++; if ($1 == "root") r++} END {if (n == 0) print "not running"; else if (r > 0) print "root"; else print "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
Create a dedicated yugabyte user and group, chown the installation and fs_data_dirs to it and start yb-master/yb-tserver as that user (User=yugabyte in the service unit).
Thuộc tính
- Hệ điều hành
- Bất kỳ
- Thẻ
- yugabytedbservice-account
- Tham chiếu
- CIS YugabyteDB Benchmark v2.0.0 - 1.6 Ensure the YugabyteDB service is run as a non-root user
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 yugabytedb --level 2