pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
certs in connection string
3+ messages / 2 participants
[nested] [flat]

* certs in connection string
@ 2021-02-13 16:57  Rob Sargent <robjsargent@gmail.com>
  0 siblings, 1 reply; 3+ messages in thread

From: Rob Sargent @ 2021-02-13 16:57 UTC (permalink / raw)
  To: pgsql-generallists.postgresql.org <pgsql-general@lists.postgresql.org>

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)




^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: certs in connection string
@ 2021-02-15 15:23  Laurenz Albe <laurenz.albe@cybertec.at>
  parent: Rob Sargent <robjsargent@gmail.com>
  0 siblings, 1 reply; 3+ messages in thread

From: Laurenz Albe @ 2021-02-15 15:23 UTC (permalink / raw)
  To: Rob Sargent <robjsargent@gmail.com>; pgsql-generallists.postgresql.org <pgsql-general@lists.postgresql.org>

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
-- 
Cybertec | https://www.cybertec-postgresql.com






^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: certs in connection string
@ 2021-02-15 18:01  Rob Sargent <robjsargent@gmail.com>
  parent: Laurenz Albe <laurenz.albe@cybertec.at>
  0 siblings, 0 replies; 3+ messages in thread

From: Rob Sargent @ 2021-02-15 18:01 UTC (permalink / raw)
  To: Laurenz Albe <laurenz.albe@cybertec.at>; pgsql-generallists.postgresql.org <pgsql-general@lists.postgresql.org>



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).





^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2021-02-15 18:01 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2021-02-13 16:57 certs in connection string Rob Sargent <robjsargent@gmail.com>
2021-02-15 15:23 ` Laurenz Albe <laurenz.albe@cybertec.at>
2021-02-15 18:01   ` Rob Sargent <robjsargent@gmail.com>

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