TMAegis
Thêm quy tắc cho postgres

PostgreSQL

TMA-POSTGRES-2.4

Ensure Passwords are Not Stored in the service file

Trung bìnhCấp 1Xem xét thủ côngpostgres

Mô tả

One can set a password in a PostgreSQL connection service file. Verify the password option is not used in a connection service file.

Cách kiểm tra

Phương pháp kiểm tra: Xem xét thủ công

Khuyến nghị này không thể kiểm tra tự động. Lần quét sẽ liệt kê mục này kèm hướng dẫn khi bạn truyền cờ --include-manual.

As root search connection service files for passwords: find / -name .pg_service.conf -type f -exec grep -H password {} \; 2>/dev/null; grep password /root/.pg_service.conf "${PGSERVICEFILE}" "${PGSYSCONFDIR}/pg_service.conf". Any password=... line is a finding.

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

Remove password= entries from pg_service.conf/.pg_service.conf files and store credentials in ~/.pgpass (mode 0600) or use certificate authentication.

Thuộc tính

Hệ điều hành
Bất kỳ
Thẻ
postgresdatabasecredentialsmanual
Tham chiếu
CIS PostgreSQL 18 Benchmark v1.0.0 - 2.4 Ensure Passwords are Not Stored in the service file