Skip to content

@shopify/shopify-app-session-storage-postgresql: Support for SSL Certificate Configuration in PostgreSQL Session Storage. #2835

@francoislecs

Description

@francoislecs

Hello,

When using a database that requires SSL—such as an AWS RDS database—we need to provide an SSL certificate.

Currently, this does not seem possible because the connection does not use the provided dbUrl as-is. Instead, it extracts parts of the URL to initialize the connection (ref:

).

I found few issues reporting this problem, but none of them provide a good solution. Here is an example: #493

The closest workaround I found is this comment, which suggests using the environment variables PGSSLMODE and PGSSLROOTCERT. However, it turns out that node-postgres does not support PGSSLROOTCERT (see brianc/node-postgres#2723).

I also saw an attempt to address this by allowing extra options when instantiating PostgreSQLSessionStorage in #727, but the PR was not merged. Why hasn't this solution or a similar one been implemented yet?

In the meantime, is there a solution to provide an SSL certificate, or is self-patching the only way to use this library with databases that require SSL connections?

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