porsager / postgres

Postgres.js - The Fastest full featured PostgreSQL client for Node.js, Deno, Bun and CloudFlare
The Unlicense
7.26k stars 262 forks source link

Support `?sslrootcert=system` config option #689

Closed nicksrandall closed 10 months ago

nicksrandall commented 11 months ago

This new config option in Postgres v16 can help prevent MITM attacks. It would be great if this was supported in postgres.js.

More info: https://neon.tech/blog/avoid-mitm-attacks-with-psql-postgres-16

Basically, ?sslrootcert=system is a shortened way to say ?sslmode=verify-full&sslrootcert=/etc/ssl/cert.pem

porsager commented 10 months ago

Hi @nicksrandall - yeah that's cool! I'm open for a PR, if you don't want to wait until I need it myself 😉

nicksrandall commented 10 months ago

@porsager PR is here: #690

porsager commented 10 months ago

Haha - oh my - it was right there 😍 sorry - tired eyes

porsager commented 10 months ago

Fixed in #690