Pete Lorenz
08/12/2024, 5:16 PMJakub Talaj
08/13/2024, 9:00 AMsslmode, sslrootcert, sslcert
. You can also check active connections to your RDS PostgreSQL cluster to see if they are encrypted:
Connect to the PostgreSQL Database: You can connect using a tool like psql or any other PostgreSQL client.
Run the Following Query:
SELECT
datname,
usename,
ssl,
client_addr,
client_hostname,
client_port
FROM
pg_stat_ssl
JOIN
pg_stat_activity
ON
pg_stat_ssl.pid = pg_stat_activity.pid;
If on Amazon RDS SSL has been configured to REQUIRE SSL connection then psql
will fail to connect. Requirement for connection to PostgreSQL DB instance to use SSL is specified in rds.force_ssl
. The encrypted status of your connection is shown in the logon banner when you connect to the DB instance, example:
Password for user master:
psql (10.3)
SSL connection (cipher: DHE-RSA-AES256-SHA, bits: 256)
Type "help" for help.
postgres=>
You can also load the sslinfo
extension and then call the ssl_is_used()
function to determine if SSL is being used. The function returns t
if the connection is using SSL, otherwise it returns `f`:
CREATE EXTENSION sslinfo;
SELECT ssl_is_used();
Please let me know if that helped.Pete Lorenz
08/13/2024, 8:24 PMJakub Talaj
08/15/2024, 9:13 AMJakub Talaj
08/20/2024, 9:27 AM