question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Postgres `sslmode` parameter support

See original GitHub issue

I 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:closed
  • Created 4 years ago
  • Reactions:3
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
vitaly-tcommented, Aug 21, 2019

I don’t think using a different connection string parser will change that.

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.

1reaction
vitaly-tcommented, Aug 20, 2019

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found