PostgreSQL – Is sslmode=verify-full Enough for Secure Connection?

postgresql

I'm using Amazon's postgresql RDS service to run a few shared development/testing databases. I'm connecting to it via something like:

 psql " dbname=postgres user=myrootuser sslrootcert=rds-combined-ca-bundle.pem sslmode=verify-full host=myhostname.asdfqwer.us-west-2.rds.amazonaws.com"

The password is in a pgpass file which no one else should be able to read.

Is this enough to connect securely to the database? Or are there vulnerabilities that can, say, downgrade the connection to plain text or something that I should be aware of?

(I know it would probably be wise to put the DB behind a VPC/firewall not make it globally accessible, but that's not practical for us at the moment).

Best Answer

If done correctly, it is secure.

The biggest vulnerability would be someone tricking you into removing the sslmode=verify-full parameters from your connect string, or some similar social engineering attack.