Skip to content
This repository was archived by the owner on Aug 19, 2025. It is now read-only.
This repository was archived by the owner on Aug 19, 2025. It is now read-only.

Allow passing string values for ssl query string in PostgreSQL URL #575

@Exagone313

Description

@Exagone313

When using the PostgreSQL backend, you can pass the ssl key in the query string, with the values true or false. These are converted to boolean and passed as arguments to asyncpg.create_pool

The asyncpg library accepts other values than only True and False, which can be used to choose how certificate validation is done (or not done).

For the record, when setting ssl=true, the ssl mode used is prefer, which will fallback to plain if SSL connection fails, so it is not a secure default. (Edit: This is not true, certificate is checked with ssl=true, the documentation is not clear on that topic).

I'm going to send a PR that permits to send string values, but it will not change the default settings.

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