From: Tom Lane <tgl@sss.pgh.pa.us>
To: Zwettler Markus (OIZ) <Markus.Zwettler@zuerich.ch>
Cc: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: Re: postgres ssl client certificate authentification
Date: Fri, 15 Oct 2021 11:49:28 -0400
Message-ID: <959129.1634312968@sss.pgh.pa.us> (raw)
In-Reply-To: <54285c6f118c4aa1b5b7a5bfc99bd840@zuerich.ch>
References: <54285c6f118c4aa1b5b7a5bfc99bd840@zuerich.ch>
"Zwettler Markus (OIZ)" <Markus.Zwettler@zuerich.ch> writes:
> I am playing around with postgres ssl encryption. I am confused about client certificate authentication:
> <quote>
> The second approach combines any authentication method for hostssl entries with the verification of client certificates by setting the clientcert authentication option to verify-ca or verify-full. The former option only enforces that the certificate is valid, while the latter also ensures that the cn (Common Name) in the certificate matches the user name or an applicable mapping.
> </quote>
> https://www.postgresql.org/docs/12/ssl-tcp.html
Given that your server is 9.6.x, you're reading the wrong version
of the docs. Per
https://www.postgresql.org/docs/9.6/auth-pg-hba-conf.html
the only clientcert value that does anything is "1":
In addition to the method-specific options listed below, there is one
method-independent authentication option clientcert, which can be
specified in any hostssl record. When set to 1, this option requires
the client to present a valid (trusted) SSL certificate, in addition
to the other requirements of the authentication method.
regards, tom lane
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: tgl@sss.pgh.pa.us, Markus.Zwettler@zuerich.ch
Subject: Re: postgres ssl client certificate authentification
In-Reply-To: <959129.1634312968@sss.pgh.pa.us>
References: <54285c6f118c4aa1b5b7a5bfc99bd840@zuerich.ch> <959129.1634312968@sss.pgh.pa.us>
* 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