-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support the PGSSLCERT, PGSSLKEY, PGSSLROOTCERT environment variables #2723
Comments
any solution to the problem? @rafiss |
Yes the PR I linked in my issue report under "Desired solution" addresses the problem. |
dapeleg-dn
added a commit
to dapeleg-dn/node-postgres
that referenced
this issue
Jun 1, 2023
dapeleg-dn
added a commit
to dapeleg-dn/node-postgres
that referenced
this issue
Jun 1, 2023
PR suggested: #2994 |
dapeleg-dn
added a commit
to dapeleg-dn/node-postgres
that referenced
this issue
Jun 5, 2023
dapeleg-dn
added a commit
to dapeleg-dn/node-postgres
that referenced
this issue
Jun 5, 2023
dapeleg-dn
added a commit
to dapeleg-dn/node-postgres
that referenced
this issue
Jun 5, 2023
PR is ready. Waiting for a maintainer to review and approve. |
derhuerst
added a commit
to NYC-Open-Transit/mta-subway-gtfs-rt-proxy
that referenced
this issue
Jul 12, 2024
This is a shim for brianc/node-postgres#2723.
derhuerst
added a commit
to NYC-Open-Transit/mta-subway-gtfs-rt-proxy
that referenced
this issue
Jul 12, 2024
This is a shim for brianc/node-postgres#2723.
derhuerst
added a commit
to NYC-Open-Transit/mta-subway-gtfs-rt-proxy
that referenced
this issue
Jul 12, 2024
This is a shim for brianc/node-postgres#2723.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Summary
According to the docs, node-postgres uses the same environment variables as libpq to connect to a PostgreSQL server.
However, PGSSLCERT, PGSSLKEY, PGSSLROOTCERT are not supported.
To reproduce
Use the following script
Run it with
PGSSLMODE=require PGSSLCERT=/home/ubuntu/certs/client.testuser.crt PGSSLROOTCERT=/home/ubuntu/certs/ca.crt PGSSLKEY=/home/ubuntu/certs/client.testuser.key PGHOST=localhost PGPORT=26257 PGUSER=root node test.js
It results in the error
This is because the ssl field in ConnectionParameters is simply set to true and the certs fields are not populated
Desired solution
My colleague @RichardJCai has created this PR #2517
The text was updated successfully, but these errors were encountered: