From: Rob Sargent <robjsargent@gmail.com>
To: Adrian Klaver <adrian.klaver@aklaver.com>
To: pgsql-generallists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: Re: localhost ssl
Date: Fri, 22 Jan 2021 14:11:55 -0700
Message-ID: <2f653f6c-5f27-13fd-49be-90845a45ef43@gmail.com> (raw)
In-Reply-To: <5f8db865-2f0e-6764-f2f0-b344feb42368@aklaver.com>
References: <e77dddba-3c98-4cb2-5492-c0cf694c084d@gmail.com>
<1ca17e3b-14de-69ff-5f0b-4082376571ca@aklaver.com>
<73ae4494-3b65-6ecd-b610-9a9ac5c9cce1@gmail.com>
<5f8db865-2f0e-6764-f2f0-b344feb42368@aklaver.com>
> No, as I really have no idea what:
>
> "In production I hope to name the role with each connection as I want
> the search_path set by the connecting role. ..."
>
> means?
My apologies: I rely on the search_path being set according to the role
(--user).
Perhaps what I was missing is that the connection string uses both
username and certificate?
>
> I would point out this:
>
> https://www.postgresql.org/docs/12/auth-cert.html
>
> "User name mapping can be used to allow cn to be different from the
> database user name."
>
Just prior to that quote is
"The cn (Common Name) attribute of the certificate will be compared to
the requested database user name, and if they match the login will be
allowed."
which leads to me to believe I would need a cert per role.
> which leads to this:
>
> https://www.postgresql.org/docs/12/auth-username-maps.htmlI don't think the mapping tricks help me, but happy to be convinced
otherwise.
I have specific roles accessing specific schemas via sql which is not
schema qualified.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: robjsargent@gmail.com, adrian.klaver@aklaver.com
Subject: Re: localhost ssl
In-Reply-To: <2f653f6c-5f27-13fd-49be-90845a45ef43@gmail.com>
References: <e77dddba-3c98-4cb2-5492-c0cf694c084d@gmail.com> <1ca17e3b-14de-69ff-5f0b-4082376571ca@aklaver.com> <73ae4494-3b65-6ecd-b610-9a9ac5c9cce1@gmail.com> <5f8db865-2f0e-6764-f2f0-b344feb42368@aklaver.com> <2f653f6c-5f27-13fd-49be-90845a45ef43@gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox