Skip to content

Postgres database: support TLS/SSL connection settings #955

@1u0

Description

@1u0

Arroyo currently doesn't support TLS connection (settings) to a Postgres used as database backend.
The Postgres connection settings are limited to:

let mut cfg = deadpool_postgres::Config::new();
cfg.dbname = Some(config.database_name.clone());
cfg.host = Some(config.host.clone());
cfg.port = Some(config.port);
cfg.user = Some(config.user.clone());
cfg.password = Some((*config.password).clone());

match tokio_postgres::config::Config::new()
.host(&config.host)
.port(config.port)
.user(&config.user)
.password(&*config.password)
.dbname(&config.database_name)
.connect(NoTls)

In some Postgres setups, it might be a requirement to use or the DB forces to use TLS/SSL only connections.
Would be nice to at least support configuring Postgres SSL mode setting.

Note: maybe it would be more convenient to allow configuring Postgres connection via URL format (postgres://...), with possibility to override some of the parameters separately (mainly to support setting password via environment variable).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions