no way to set rejectUnauthorized from pg-connection-string
See original GitHub issueNow that rejectUnauthorized is being defaulted to true, there is no way to modify that from the connection string. Some libraries (example are setting opposite defaults to try and ease the migration.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:9
- Comments:8 (2 by maintainers)
Top Results From Across the Web
node.js - Is it ok to be setting rejectUnauthorized to false in ...
We recently moved to Heroku and upon attempting to connect our apps to the DB, it kept rejecting our queries with the message...
Read more >pg-connection-string - npm
When user and password are given, they are included in the typical URL positions, with an empty host , as in socket://user:pass@/var/run/pgsql ....
Read more >tls - Is it safe to set rejectUnauthorized to false when using ...
My question is how safe is this with a Postgres database on Heroku and would it pose any threat to the security of...
Read more >Why am I getting an error when I upgrade to pg@8?
Resolution. Depending on the setup, the pg config will need to set the rejectUnauthorized value to false . This can be done 1...
Read more >node tls rejectunauthorized=0 - You.com | The AI Search ...
BlockI don't want to see this, for any search. Feedback. What do you think of this? How to set value for NODE_TLS_REJECT_UNAUTHORIZED =0...
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

Hi everyone, I have a requirement to use
verify-ca- with the AWS RDS proxy service the hostname is invalid and you can only check the CA. The OS already has the relevant AWS CA installed.I’m not clear on whether doing the above (set rejectUnauthorized: false) will actually check the CA? Is there an equivalent to the native
verify-caoption or do I need to specify the CA certificate to make it check just the CA?👍 for having an
sslmodeargument but want to make sure it’ll actually match psql configuration exactlyMy recommendation:
In general, we should adhere to the libpq connection URI documentation. Specifically, we should support the Parameter Key Words.
sslmode. For non-native mode, I do not think we can easily supportalloworprefer. I also thinkverify-cawill not work as expected asrejectUnauthorizedseems to check the host. We can document the mapping for non-native mode like this:I do not feel great about
verify-canot settingrejectUnauthorized = true. https://github.com/brianc/node-postgres-docs/issues/79 shows thatrejectUnauthorizedoften requires the host to be specified. This is more strict than the true meaning ofverify-ca. That being said, I wonder if we should make itrejectUnauthorized = trueeven though the postgres documentation states thatverify-cawill not check the host.ssl. If bothsslandsslmodeare specified,sslmodewill winsslis set, also setrejectUnauthorized: true. This maintains the node default but makes it more obvious as to what is going on