on
for all production environments. Ensure you have valid certificates configured before enabling. Test both encrypted and unencrypted connection options during migration period, but ultimately require SSL for all production traffic./etc/ssl/certs/ca-certificates.crt
). Keep the file secure with appropriate permissions (readable by postgres user only). Regularly update the CA bundle to maintain trust security./etc/ssl/certs/postgresql.crt
). Use certificates from trusted certificate authorities rather than self-signed certificates for production environments. Ensure regular certificate rotation before expiration.ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384
. Regularly review and update cipher suites to phase out deprecated algorithms. Avoid SSLv3 and weak ciphers like those using CBC mode or RSA key exchange./etc/ssl/crls/
) with appropriate permissions. Ensure CRL files are regularly updated and monitor for any performance impact during certificate validation.openssl dhparam -out dhparams.pem 2048
and set the path to this file. Regularly regenerate parameters every 1-2 years as computational capabilities advance.prime256v1
(NIST P-256) for broad compatibility or X25519
for modern security. Avoid compromised curves like secp112r1 or secp160r1. Ensure your OpenSSL version supports the selected curve./etc/ssl/private/postgresql.key
). Apply strict file permissions (600) and ensure only the postgres user can read the file. Use passphrase protection initially, but consider using ssl_passphrase_command
for automated restarts.TLSv1.3
for maximum security where supported. For broader compatibility, use TLSv1.2
. Avoid TLSv1.0 and TLSv1.1 as they have known vulnerabilities and are deprecated.TLSv1.2
as minimum for all production environments. Consider TLSv1.3
for new deployments. Never allow SSLv3 or earlier versions due to critical security vulnerabilities.on
if your passphrase command can safely be called during reload operations. This enables certificate rotation without service interruption, improving availability and security posture.on
for all environments. This ensures that your carefully curated cipher list is respected, preventing clients from negotiating weaker ciphers than your security policy allows.Start your journey toward a healthier PostgreSQL with pghealth.
You can explore all features immediately with a free trial β no installation required.
π Start Free Trial