select open change scope Open full search

PG.CENTER connects PostgreSQL documentation, reference, and ecosystem knowledge. Maintained by Pigsty.

CONFIGURATION / CONNECTIONS AND AUTHENTICATION

Specifies a list of SSL ciphers that are allowed by connections using TLS version 1.2 and lower, see ssl_tls13_ciphers for TLS version 1.3 connections.

Type
string
Context
sighup
Measured default
HIGH:MEDIUM:+3DES:!aNULL
Unit
Metadata snapshot
18

Definition PG 18 manual

Specifies a list of SSL ciphers that are allowed by connections using TLS version 1.2 and lower, see ssl_tls13_ciphers for TLS version 1.3 connections. See the ciphers manual page in the OpenSSL package for the syntax of this setting and a list of supported values. The default value is HIGH:MEDIUM:+3DES:!aNULL. The default is usually a reasonable choice unless you have specific security requirements.

This parameter can only be set in the postgresql.conf file or on the server command line.

Explanation of the default value:

HIGH

Cipher suites that use ciphers from HIGH group (e.g., AES, Camellia, 3DES)

MEDIUM

Cipher suites that use ciphers from MEDIUM group (e.g., RC4, SEED)

+3DES

The OpenSSL default order for HIGH is problematic because it orders 3DES higher than AES128. This is wrong because 3DES offers less security than AES128, and it is also much slower. +3DES reorders it after all other HIGH and MEDIUM ciphers.

!aNULL

Disables anonymous cipher suites that do no authentication. Such cipher suites are vulnerable to MITM attacks and therefore should not be used.

Available cipher suite details will vary across OpenSSL versions. Use the command openssl ciphers -v 'HIGH:MEDIUM:+3DES:!aNULL' to see actual details for the currently installed OpenSSL version. Note that this list is filtered at run time based on the server key type.

Measured default history
Version intervalDefault
9.1 – 9.2ALL:!ADH:!LOW:!EXP:!MD5:@STRENGTH
9.3 – 9.3DEFAULT:!LOW:!EXP:!MD5:@STRENGTH
9.4 – 19HIGH:MEDIUM:+3DES:!aNULL
Analysis & operational context

Authored guidance from the GUC source snapshot; the version-specific manual above is the definition reference. View source ↗

How it works

The ssl_ciphers name already exists in PostgreSQL's GUC source at the project's 2008 history boundary and in PG9.0, where it is compiled only under USE_SSL. The audited PG9.0 fallback build does not enable OpenSSL, so the name first appears in the PG9.1 official-image snapshot; that matrix boundary reflects build capability, not the feature's original invention.

The OpenSSL cipher string governs TLS 1.2 and older handshakes. PostgreSQL 18 and later configure TLS 1.3 suites separately with ssl_tls13_ciphers. A SIGHUP reload changes the policy for new TLS contexts and connections but does not renegotiate sessions that are already established.

Treat ssl_ciphers as one part of a complete transport policy with ssl, pg_hba.conf, certificate and key files, CA and revocation settings, protocol floors and ceilings, ssl_groups, and client capabilities. Validate the exact installed OpenSSL build because accepted cipher names and security levels are library-dependent.

Operational considerations

Editing ssl_ciphers without reloading configuration and verifying the effective value and subsequent behavior.

Updating only one TLS file or policy knob and leaving an invalid chain, unreadable key, or incompatible protocol set.

Assuming a reload renegotiates existing sessions; TLS policy changes affect new handshakes.

Changing ssl_ciphers globally without a rollback plan and a client or operational compatibility test.

Workload guidance

OLAP: Use the same TLS floor for analytical traffic; benchmark only after correctness because bulk transfer may expose CPU cost but is not a reason to accept obsolete protocols.

OLTP: Treat ssl_ciphers as transport-security policy rather than a performance knob. Follow the organization's TLS baseline and test certificate rotation, reload, and every client class.

SMALL: Keep ssl_ciphers simple and secure, using managed certificates and library defaults reviewed for the installed OpenSSL version. Rehearse renewal before expiry.

Version history 9
  1. PG 17 → 18changed
  2. PG 15 → 16changed
  3. PG 13 → 14changed
  4. PG 10 → 11changed
  5. PG 9.6 → 10changed
  6. PG 9.4 → 9.5changed
  7. PG 9.3 → 9.4changed
  8. PG 9.2 → 9.3changed
  9. PG 9.0 → 9.1changed

Related entries

Further reading

Definition snapshot: english-manuals:18644c0600588dedc6aff3b01a5… · English manual source