pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Rob Sargent <robjsargent@gmail.com>
To: Laurenz Albe <laurenz.albe@cybertec.at>
To: pgsql-generallists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: Re: certs in connection string
Date: Mon, 15 Feb 2021 11:01:00 -0700
Message-ID: <c9048391-0ac0-1b48-93ca-c08a830e6fa2@gmail.com> (raw)
In-Reply-To: <8adec105140aebabf0814880fd88d3ed8fac8c3e.camel@cybertec.at>
References: <89C60392-DFF9-4C1A-BB0D-DD54608F2AA5@gmail.com>
	<8adec105140aebabf0814880fd88d3ed8fac8c3e.camel@cybertec.at>



On 2/15/21 8:23 AM, Laurenz Albe wrote:
> On Sat, 2021-02-13 at 09:57 -0700, Rob Sargent wrote:
>> I’m confused, as usual, about using a cert in a connection string.  I wish to connect form a
>>   “middle ware” piece to PG on be half of various clients.  Does each client need a corresponding
>>   cert/key or is the certification intended to say the sending machine is who it says it is
>>   (thereby needing only one cert)
> 
> They can share one certificate.
> 
> https://www.postgresql.org/docs/current/auth-cert.html:
> 
>    When using this authentication method, the server will require that the client provide a valid,
>    trusted certificate. No password prompt will be sent to the client. 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.
> 
> Yours,
> Laurenz Albe
> 
Thank you.

Since I wish to make the jdbc connection using the role's login (for 
search_path, I take it I will make role-specific certs, setting the CN 
accordingly. (I do know which role I need for each connection request 
and can set the dbname as well).





view thread (3+ messages)

Message-ID: <c9048391-0ac0-1b48-93ca-c08a830e6fa2@gmail.com>
Permalink:  ../c9048391-0ac0-1b48-93ca-c08a830e6fa2@gmail.com/
Also on:    postgresql.org/message-id/c9048391-0ac0-1b48-93ca-c08a830e6fa2@gmail.com

 · 

reply

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, laurenz.albe@cybertec.at
  Subject: Re: certs in connection string
  In-Reply-To: <c9048391-0ac0-1b48-93ca-c08a830e6fa2@gmail.com>
  References: <89C60392-DFF9-4C1A-BB0D-DD54608F2AA5@gmail.com> <8adec105140aebabf0814880fd88d3ed8fac8c3e.camel@cybertec.at> <c9048391-0ac0-1b48-93ca-c08a830e6fa2@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