diff --git a/bitnami/pgbouncer/1/debian-11/rootfs/opt/bitnami/scripts/libpgbouncer.sh b/bitnami/pgbouncer/1/debian-11/rootfs/opt/bitnami/scripts/libpgbouncer.sh index 2f52b7dbfb404..58b361f8a9439 100644 --- a/bitnami/pgbouncer/1/debian-11/rootfs/opt/bitnami/scripts/libpgbouncer.sh +++ b/bitnami/pgbouncer/1/debian-11/rootfs/opt/bitnami/scripts/libpgbouncer.sh @@ -228,6 +228,9 @@ pgbouncer_initialize() { if ! is_empty_value "$PGBOUNCER_AUTH_USER"; then database_value+=" auth_user=$PGBOUNCER_AUTH_USER" fi + if ! is_empty_value "$PGBOUNCER_AUTH_DBNAME"; then + database_value+=" auth_dbname=$PGBOUNCER_AUTH_DBNAME" + fi if ! is_empty_value "$PGBOUNCER_CONNECT_QUERY"; then database_value+=" connect_query='${PGBOUNCER_CONNECT_QUERY}'" fi diff --git a/bitnami/pgbouncer/1/debian-11/rootfs/opt/bitnami/scripts/pgbouncer-env.sh b/bitnami/pgbouncer/1/debian-11/rootfs/opt/bitnami/scripts/pgbouncer-env.sh index e17b76121fb0a..31afc87f81641 100644 --- a/bitnami/pgbouncer/1/debian-11/rootfs/opt/bitnami/scripts/pgbouncer-env.sh +++ b/bitnami/pgbouncer/1/debian-11/rootfs/opt/bitnami/scripts/pgbouncer-env.sh @@ -29,6 +29,7 @@ pgbouncer_env_vars=( PGBOUNCER_PORT PGBOUNCER_LISTEN_ADDRESS PGBOUNCER_AUTH_USER + PGBOUNCER_AUTH_DBNAME PGBOUNCER_AUTH_QUERY PGBOUNCER_AUTH_TYPE PGBOUNCER_AUTH_HBA_FILE @@ -120,6 +121,7 @@ export PGBOUNCER_DATABASE="${PGBOUNCER_DATABASE:-postgres}" export PGBOUNCER_PORT="${PGBOUNCER_PORT:-6432}" export PGBOUNCER_LISTEN_ADDRESS="${PGBOUNCER_LISTEN_ADDRESS:-0.0.0.0}" export PGBOUNCER_AUTH_USER="${PGBOUNCER_AUTH_USER:-}" +export PGBOUNCER_AUTH_DBNAME="${PGBOUNCER_AUTH_DBNAME:-}" export PGBOUNCER_AUTH_QUERY="${PGBOUNCER_AUTH_QUERY:-}" export PGBOUNCER_AUTH_TYPE="${PGBOUNCER_AUTH_TYPE:-scram-sha-256}" export PGBOUNCER_AUTH_HBA_FILE="${PGBOUNCER_AUTH_HBA_FILE:-}" diff --git a/bitnami/pgbouncer/README.md b/bitnami/pgbouncer/README.md index 2ae36ffb99711..005fae42ce102 100644 --- a/bitnami/pgbouncer/README.md +++ b/bitnami/pgbouncer/README.md @@ -121,6 +121,7 @@ To expose a ["fallback database" (wildcard that matches any)](https://www.pgboun ### Other options * `PGBOUNCER_AUTH_USER`: PgBouncer will use this user to connect to the database and query the PostgreSQL backend for a user and password. No defaults. +* `PGBOUNCER_AUTH_DBNAME`: PgBouncer will use this user database for authentication purposes. No defaults. * `PGBOUNCER_AUTH_QUERY`: PgBouncer will use this query to connect to the database and query the PostgreSQL backend for a user and password. No defaults. * `PGBOUNCER_AUTH_TYPE`: PgBouncer authentication type. Default: **scram-sha-256** * `PGBOUNCER_AUTH_HBA_FILE`: HBA configuration file to use if auth_type is set to hba. No defaults.