PostgreSQL
TMA-POSTGRES-6.10
Ensure Weak SSL/TLS Ciphers Are Disabled
Deskripsi
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.
Cara pemeriksaan
Metode audit: Kueri SQL
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"- Output yang diharapkan
compliant
Cara perbaikan
Metode perbaikan: Panduan atau patch infrastruktur
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.
Properti
- Sistem operasi
- Apa saja
- Tag
- postgresdatabasetls
- Referensi
- CIS PostgreSQL 18 Benchmark v1.0.0 - 6.10 Ensure Weak SSL/TLS Ciphers Are Disabled
Periksa host ini
Jalankan ini pada mesin yang diizinkan untuk Anda audit. Pemindaian bersifat hanya baca.
tmaegis scan --target postgres