Postgres `sslmode` parameter support
See original GitHub issueI can’t figure out clearly, is sslmode
parameter supported for connection strings? As I can see in pg-connection-string, sslmode
isn’t parsed, but I can see its mention in the codebase.
I use pg-promise
in my project, and I have sslmode
parameter in the Postgres connection string from Google Cloud. So I can’t connect due to the database "dbname?sslmode=disable" does not exist
, that’s why I’m asking 😃
Issue Analytics
- State:
- Created 4 years ago
- Reactions:3
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Documentation: 15: 34.19. SSL Support - PostgreSQL
The different values for the sslmode parameter provide different levels of protection. SSL can provide protection against three types of attacks: Eavesdropping.
Read more >Using psql to connect to PostgreSQL in SSL mode
I have created a certificate file (server.crt) and key (server.key) in data directory and update the parameter SSL to "on" to enable secure...
Read more >Postgres SSLMODE Explained - ankane.org
Postgres SSLMODE Explained. When you connect to a database, Postgres uses the sslmode parameter to determine the security of the connection.
Read more >Using SSL with a PostgreSQL DB instance
Amazon RDS supports Secure Socket Layer (SSL) encryption for PostgreSQL DB instances. ... If your connection parameters specify sslmode=verify-ca or ...
Read more >Setting up SSL authentication for PostgreSQL - CYBERTEC
This posting will help you to set up SSL authentication for PostgreSQL ... There are a couple of parameters which are related to...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
What makes a difference - this driver continues to use an ancient version of pg-connection-string, and for no good reason that I know of.
And though I suggested more than once to switch over to the generic connection-string, it is turned down every time on some premise of old compatibility that few would care about. So you keep getting issues open and people getting confused about all the discrepancies going on between the object format and the connection string syntax. This should have been sorted ages ago.
You can, for the time being use generic connection-string to parse it, and use the connection object with any parameters that you want.
Other than that, I submitted a PR there sometime ago, but it’s still just hanging there.