TMAegis
Thêm quy tắc cho postgres

TMA-POSTGRES-5.3

Ensure login via "local" UNIX Domain Socket is configured correctly

CaoCấp 1Xem xét thủ côngpostgres

Mô tả

A remote host login, via SSH, is arguably the most secure means of remotely accessing and administering the PostgreSQL server. Once connected to the PostgreSQL server, using the psql client, via UNIX DOMAIN SOCKETS, while using the peer authentication method is the most secure mechanism available for local database connections.

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.

Review the 'local' lines of pg_hba.conf (SELECT * FROM pg_hba_file_rules WHERE type = 'local';). As user1 run psql -U postgres -d postgres: it must fail with 'Peer authentication failed'; as postgres it must succeed. Local login as another account than your own is a fail.

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

Use 'local all all peer' (or 'local all postgres peer') as the local rule, create database roles that match OS users that need access, then SELECT pg_reload_conf();

Thuộc tính

Hệ điều hành
Bất kỳ
Thẻ
postgresdatabaseauthenticationpg_hbamanual
Tham chiếu
CIS PostgreSQL 18 Benchmark v1.0.0 - 5.3 Ensure login via "local" UNIX Domain Socket is configured correctly