Re: Issue with Password Authentication for Pgpool

From: Martin Gainty <mgainty(at)hotmail(dot)com>
To: vijay patil <vijay(dot)postgres(at)gmail(dot)com>, "pgpool-general(at)pgpool(dot)net" <pgpool-general(at)pgpool(dot)net>, "pgsql-general(at)lists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: Issue with Password Authentication for Pgpool
Date: 2025-01-09 17:08:27
Message-ID: CY5PR19MB644734C2F5D7293EC9CC6C0FAE132@CY5PR19MB6447.namprd19.prod.outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

assuming you are implementing kubernetes

kubectl exec -it $(kubectl get pods -l app.kubernetes.io/component=pgpool,app.kubernetes.io/name=postgresql-ha -o jsonpath='{.items[0].metadata.name}') -- pg_md5 -m --config-file="/opt/bitnami/pgpool/conf/pgpool.conf" -u "foo" "bar"

//cat out pgpool afterwards

pgpool:
customUsers:
usernames: "keycloak vkp"
passwords: "my_keycloak*PWD vkp*PWD"

Users and passwords are separated by a space character.

ju<https://github.com/juan131>

________________________________
From: vijay patil <vijay(dot)postgres(at)gmail(dot)com>
Sent: Thursday, January 9, 2025 12:06 AM
To: pgpool-general(at)pgpool(dot)net <pgpool-general(at)pgpool(dot)net>; pgsql-general(at)lists(dot)postgresql(dot)org <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Issue with Password Authentication for Pgpool

Hello Everyone,

Need assistance on below requirements.

My requirement is to prompt for a password when connecting through Pgpool (port 9999) and to avoid using the pool_password file. However, I’m currently getting the error related to the lack of an entry in the pool_passwd file.

Could you please advise how I can achieve password authentication without using the pool_password file, while ensuring that Pgpool prompts for the password during connection?

Here is the relevant configuration from my pool_hba.conf:

host all all 10.125.0.90/32 trust # Node 1
host all all 10.125.0.91/32 trust # Node 2
#host all all 10.125.0.79/32 scram-sha-256 # Node 3
host all all 0.0.0.0/0 scram-sha-256 # All nodes

error :-
[postgres(at)scrbtrheldbaas002 PG_DATA]$ psql -h 10.125.0.79 -U vkp -d postgres -p 9999
psql: error: connection to server at "10.125.0.79", port 9999 failed: FATAL: SCRAM authentication failed
DETAIL: pool_passwd file does not contain an entry for "vkp"

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Ron Johnson 2025-01-09 17:10:51 Re: recovery error while running any statement
Previous Message Adrian Klaver 2025-01-09 17:05:14 Re: recovery error while running any statement