Crate postgres_secrets

Source
Expand description

A secure way to access Postgres credentials from a file.

postgres_secrets allows you to encode less-sensitive information about a database, such as a hostname or database name, in insecure configuration vectors such as command lines. The password can then be looked up using from a file supplied via the user’s dotfiles or systems like Docker secrets.

Currently, only the pgpass format is supported. Support for connection service files may be implemented in the future.

The main functionality is documented in PgPass.

Re-exports§

pub use pgpass::PgPass;

Modules§

pgpass
Access Postgres credentials stored in the pgpass format. https://www.postgresql.org/docs/current/libpq-pgpass.html

Structs§

Credentials
Credentials for accessing a Postgres database. This can be used either by accessing it’s fields directly, or by converting it into a postgres::Config.

Constants§

DEFAULT_PORT