You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
postgres sslmode not respected when using environment variable connection string #260
We are using Refinery via the CLI, a la refinery migrate -e DATABASE_URL -p ./migrations.
We really want to require SSL connections to our Postgres database, but Refinery is proving problematic for that. When DATABASE_URL is of the form postgres://my_user:[email protected]:5432/db_name?sslmode=require, it does not appear that the sslmode param is respected.
When the relevant database is configured to require SSL, we see an error of the form 0: db error: FATAL: no pg_hba.conf entry for host "x.x.x.x", user "my_user", database "db_name", no encryption, indicating that Refinery is not actually using SSL for the connection.
Please let me know if there is more info I can provide to help debugging this!
Reacted by Wilson, Anna Bansaghi, Spencer Kohan, Dru Sellers and Niko Klanecek
Reacted by Matthew Burke, Aymeric Beaumet and Max Pushkarov
changed the title [-]postgres sslmode=require not respected when using environment variable connection string[/-][+]postgres sslmode not respected when using environment variable connection string[/+]on Dec 2, 2022
Hi, and thanks for the interest! This seems akin to #258. Would you like to submit a PR addressing this? I think it's just a matter of adding the query params to Config, see here, and then forward them again on the build_db_url, see here
Activity
[-]postgres sslmode=require not respected when using environment variable connection string[/-][+]postgres sslmode not respected when using environment variable connection string[/+]jxs commentedon Dec 10, 2022
Hi, and thanks for the interest! This seems akin to #258. Would you like to submit a PR addressing this? I think it's just a matter of adding the query params to
Config, see here, and then forward them again on thebuild_db_url, see hereAdd support for using TLS with PostgreSQL (rust-db#260)
Add support for using TLS with PostgreSQL (rust-db#260)
Add support for using TLS with PostgreSQL (rust-db#260)
Add support for using TLS with PostgreSQL (rust-db#260)
Add support for using TLS with PostgreSQL (rust-db#260)
freezing commentedon Jun 5, 2025
Hi, what's the status here? It seems that #353 fixes it but it was never released?
Add support for TLS in postgres/tokio-postgres using native-tls (#353)