# ─────────────────────────────────────────────────────────────────
# PgBouncer userlist — maps Postgres usernames to password hashes
# Format (MD5 auth): "username" "md5<password+username_hash>"
#
# For dev: using the same credentials as docker-compose env vars.
# In production: use scram-sha-256 or Vault to generate this file.
#
# Generate MD5 hash:
#   echo -n "password+username" | md5sum | tr -d ' \n' | sed 's/^/md5/'
#   Linux/macOS:  echo -n "password+username" | md5 -r | sed 's/^/md5/'
#
# Credentials used:
#   postgres  : @dmin123    → md5hash = md5("@dmin123" + "postgres")
#   replicator: repl-password-replace-in-prod → md5hash = md5("repl-password-replace-in-prod" + "replicator")
# ─────────────────────────────────────────────────────────────────

"postgres" "md5$(echo -n '@dmin123postgres' | md5sum | tr -d '  \n')"
"replicator" "md5$(echo -n 'repl-password-replace-in-prodreplicator' | md5sum | tr -d '  \n')"
