TMAegis
postgres 관련 규칙 더 보기

PostgreSQL

TMA-POSTGRES-6.10

Ensure Weak SSL/TLS Ciphers Are Disabled

보통레벨 1자동postgres

설명

The PostgreSQL ssl_ciphers and ssl_tls13_ciphers directives specify which Cipher Suites are allowed in the negotiation with the client. ssl_ciphers is used to specify the list of allowed cipher suites for TLS 1.2 and earlier versions. While ssl_tls13_ciphers is a list of cipher suites that are allowed by connections using TLS version 1.3. Passes only when ssl_ciphers and ssl_tls13_ciphers (PostgreSQL 18) list nothing but TLS_AES_256_GCM_SHA384, TLS_AES_128_GCM_SHA256 and TLS_AES_128_CCM_SHA256; an empty ssl_tls13_ciphers falls back to the OpenSSL defaults and fails. Runs psql as ${PGUSER:-postgres} against ${PGDATABASE:-postgres}; set PGHOST/PGPORT and use ~/.pgpass (not PGPASSWORD, see 1.6/1.7) when peer authentication is not available.

점검 방법

감사 방식: SQL 쿼리

sql_query
out=$(psql -X -U "${PGUSER:-postgres}" -d "${PGDATABASE:-postgres}" -tAc "SELECT CASE WHEN NOT EXISTS (SELECT 1 FROM regexp_split_to_table(current_setting('ssl_ciphers') || ':' || coalesce(current_setting('ssl_tls13_ciphers', true), ''), '[:,]') AS t(c) WHERE btrim(c) NOT IN ('TLS_AES_256_GCM_SHA384','TLS_AES_128_GCM_SHA256','TLS_AES_128_CCM_SHA256')) THEN 'compliant' ELSE 'noncompliant' END" 2>/dev/null) || exit 1; printf '%s\n' "$out"
예상 출력
compliant

조치 방법

조치 방식: 가이드 또는 인프라 패치

ALTER SYSTEM SET ssl_ciphers = 'TLS_AES_256_GCM_SHA384,TLS_AES_128_GCM_SHA256,TLS_AES_128_CCM_SHA256'; ALTER SYSTEM SET ssl_tls13_ciphers = 'TLS_AES_256_GCM_SHA384,TLS_AES_128_GCM_SHA256,TLS_AES_128_CCM_SHA256'; SELECT pg_reload_conf(); then check pg_stat_ssl for sessions using other ciphers.

속성

운영 체제
모두
태그
postgresdatabasetls
참고 자료
CIS PostgreSQL 18 Benchmark v1.0.0 - 6.10 Ensure Weak SSL/TLS Ciphers Are Disabled

이 호스트 점검하기

감사 권한이 있는 시스템에서 실행하세요. 스캔은 읽기 전용입니다.

shell
tmaegis scan --target postgres