Re: Replication using mTLS issue - Mailing list pgsql-general

From Tom Lane
Subject Re: Replication using mTLS issue
Date
Msg-id 630189.1718994241@sss.pgh.pa.us
Whole thread Raw
In response to Replication using mTLS issue  (Drew Zoellner <drewtzoellner@gmail.com>)
List pgsql-general
Drew Zoellner <drewtzoellner@gmail.com> writes:
> So the same user is able to connect using a non replication connection
> using the same mtls certificate and pg_ident.conf map. So it seems like the
> cert & map are working for this user.

Hmph.  I tried to reproduce your problem, and it works for me: I can
create a replication connection that's authenticated by certificate
and relies on a username map to map from the CN in the client
certificate to the database username that's mentioned in the "hostssl
replication" entry.

All I can suggest at this point is to go over your configuration
with a fine-tooth comb, looking for probably-silly mistakes such as
inconsistent spellings.  One thing I can think of to mention in
particular is to be sure that the standby's primary_conninfo
explicitly includes "user=pgrepmgr_nonprod", as that's likely not the
user name it'd default to.

Another idea could be to enable log_connections on the primary,
and see if the incoming connection request looks different than
you were expecting.

            regards, tom lane



pgsql-general by date:

Previous
From: Drew Zoellner
Date:
Subject: Re: Replication using mTLS issue
Next
From: "Shenavai, Manuel"
Date:
Subject: RE: Autovacuum, dead tuples and bloat