TMAegis
postgres için daha fazla kural

PostgreSQL

TMA-POSTGRES-6.10

Ensure Weak SSL/TLS Ciphers Are Disabled

OrtaDüzey 1Otomatikpostgres

Açıklama

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.

Nasıl denetlenir

Denetim yöntemi: SQL sorgusu

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"
Beklenen çıktı
compliant

Nasıl düzeltilir

Düzeltme yöntemi: Kılavuz veya altyapı yaması

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.

Özellikler

İşletim sistemleri
Herhangi biri
Etiketler
postgresdatabasetls
Referans
CIS PostgreSQL 18 Benchmark v1.0.0 - 6.10 Ensure Weak SSL/TLS Ciphers Are Disabled

Bu ana makineyi denetle

Bunu denetleme izniniz olan bir makinede çalıştırın. Tarama salt okunurdur.

shell
tmaegis scan --target postgres