Skip to content

postgres sslmode not respected when using environment variable connection string #260

@danielmklein

Description

@danielmklein

Hi there!

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions