Re: Issue with Password Authentication for Pgpool

From: vijay patil <vijay(dot)postgres(at)gmail(dot)com>
To: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
Cc: "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 05:31:00
Message-ID: CAD5k+7yM3EgYOU8XqzaF9fNTZoLeYb=ocPjgSBt+_1w4hvuDTw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Thanks David,

I tested the configuration by setting allow_clear_text_frontend_auth = on
and disabling the pool_hba. I made the corresponding entry in the
pg_hba.conf file. However, while connecting through the database port
(5432), it prompts for the password, but when connecting through Pgpool
(port 9999), it does not ask for a password.

Here is the content of pg_hba.conf:

bash
Copy code
# TYPE DATABASE USER ADDRESS
METHOD# "local" is for Unix domain socket connections onlylocal all
all trust# IPv4 local
connections:
host all all 127.0.0.1/32 trust#
IPv6 local connections:
host all all ::1/128 trust#
Allow replication connections from localhost, by a user with the#
replication privilege.local replication all
trust
host replication all 127.0.0.1/32 trust
host replication all ::1/128 trust
host repmgr repmgr 127.0.0.1/32 trust
host repmgr repmgr 10.125.0.90/32 trust
# Primary
host replication repmgr 10.125.0.90/32 trust
host repmgr repmgr 10.125.0.91/32 trust
# Standby
host replication repmgr 10.125.0.91/32 trust
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 0.0.0.0/26 trust
host all all 10.125.0.79/32 scram-sha-256
host all all 0.0.0.0/0 scram-sha-256

When I connect via the database port (5432), it prompts for the password as
expected:

[postgres(at)scrbtrheldbaas002 ~]$ psql -h 10.125.0.79 -U vkp -d postgres -p 5432
Password for user vkp:
psql (15.3)
Type "help" for help.

postgres=>
postgres=>
postgres=> exit

However, when connecting through Pgpool (port 9999), it does not prompt for
the password:

[postgres(at)scrbtrheldbaas002 ~]$ psql -h 10.125.0.79 -U vkp -d postgres -p 9999
psql (15.3)
Type "help" for help.

postgres=>

This behavior might be related to how Pgpool handles authentication. Let me
know if you need further investigation or configuration changes!

Thanks

Vijay

On Thu, Jan 9, 2025 at 10:47 AM David G. Johnston <
david(dot)g(dot)johnston(at)gmail(dot)com> wrote:

> On Wednesday, January 8, 2025, vijay patil <vijay(dot)postgres(at)gmail(dot)com>
> wrote:
>
>> 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?
>>
>
>
> https://www.pgpool.net/docs/latest/en/html/runtime-config-connection.html#GUC-ALLOW-CLEAR-TEXT-FRONTEND-AUTH
>
> David J.
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message David G. Johnston 2025-01-09 05:44:02 Re: Issue with Password Authentication for Pgpool
Previous Message David G. Johnston 2025-01-09 05:17:35 Re: Issue with Password Authentication for Pgpool