TMAegisBeta
Thêm quy tắc cho yugabytedb

YugabyteDB

TMA-YUGABYTEDB-5.2

Ensure that the default password changed for the cassandra role

Nghiêm trọngCấp 2Tự độngyugabytedb

Mô tả

The cassandra role has a default password which must be changed. The benchmark rates this recommendation Manual; the automated check covers its objective pass criterion. Attempts a ycqlsh login as cassandra/cassandra against ${YCQL_HOST:-127.0.0.1}:${YCQL_PORT:-9042} (ycqlsh on PATH); passes only when the server rejects the credentials. A successful login (including with YCQL authentication disabled) fails, an unreachable server fails.

Cách kiểm tra

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

shell
command -v ycqlsh >/dev/null 2>&1 || exit 1; out=$(ycqlsh -u cassandra -p cassandra -e 'SELECT release_version FROM system.local;' "${YCQL_HOST:-127.0.0.1}" "${YCQL_PORT:-9042}" 2>&1); rc=$?; if [ $rc -eq 0 ]; then echo default_password_accepted; elif printf '%s' "$out" | grep -qiE 'AuthenticationFailed|Bad credentials|incorrect|Unauthorized'; then echo compliant; else exit 1; fi
Đầ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

Log in to ycqlsh as a superuser and run ALTER ROLE cassandra WITH PASSWORD = '<new strong password>';

Thuộc tính

Hệ điều hành
Bất kỳ
Thẻ
yugabytedbauthentication
Tham chiếu
CIS YugabyteDB Benchmark v2.0.0 - 5.2 Ensure that the default password changed for the cassandra role

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