pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Thomas Guyot <tguyot@gmail.com>
To: Rejo Oommen <rejo.oommen@gmail.com>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: Is Client connections via ca.crt only possible?
Date: Wed, 3 Aug 2022 22:22:52 -0400
Message-ID: <2427474d-b5f7-cd8a-c4a9-b6cf36644de0@gmail.com> (raw)
In-Reply-To: <CAFiZ60hNc6=nLdWUH9W9HgeP4ZHiUEf3csCoV-w5XFdMirM77A@mail.gmail.com>
References: <CAFiZ60hyT7wJ+jtSiJ3UjE92jCK43cqOF0cxmmkwq8Q+EnkSqw@mail.gmail.com>
	<d8b05b17-544e-13c5-a4df-d03d0a9e4761@gmail.com>
	<CAFiZ60hNc6=nLdWUH9W9HgeP4ZHiUEf3csCoV-w5XFdMirM77A@mail.gmail.com>

On 2022-08-03 21:37, Rejo Oommen wrote:
> Thank you for the reply Thomas. I agree with you on the mutual TLS 
> that you mentioned.
>
> Here is what I was looking at.
>
> The configurations at the server end will be with auth-method as md5 
> and auth-option as clientcert=verify-ca.
>

There's your issue. If you tell the server to validate the client cert, 
then it will require the client to provide a valid cert to identify itself.

> In this way, the user's password along with the valid ca should allow 
> connections to pass.
>

The ca on your setup is only useful for the client to ensure the server 
is the correct one and prevent MITM attacks. This is a client-side 
check, not server-side.

The only authentication security here is the password/md5, but protected 
from eavesdropping (passive and MITM) and connection hijacking by 
encryption, with some of these protections only effective when the 
client use the verify-ca option. The server cannot ensure the client is 
actually validating the ca, not even that it's taking to the actual 
client and not a MITM, simply because the client itself is not 
authenticated by mutual TLS.

Regards

--
Thomas





view thread (4+ messages)

Message-ID: <2427474d-b5f7-cd8a-c4a9-b6cf36644de0@gmail.com>
Permalink:  ../2427474d-b5f7-cd8a-c4a9-b6cf36644de0@gmail.com/
Also on:    postgresql.org/message-id/2427474d-b5f7-cd8a-c4a9-b6cf36644de0@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: tguyot@gmail.com, rejo.oommen@gmail.com
  Subject: Re: Is Client connections via ca.crt only possible?
  In-Reply-To: <2427474d-b5f7-cd8a-c4a9-b6cf36644de0@gmail.com>
  References: <CAFiZ60hyT7wJ+jtSiJ3UjE92jCK43cqOF0cxmmkwq8Q+EnkSqw@mail.gmail.com> <d8b05b17-544e-13c5-a4df-d03d0a9e4761@gmail.com> <CAFiZ60hNc6=nLdWUH9W9HgeP4ZHiUEf3csCoV-w5XFdMirM77A@mail.gmail.com> <2427474d-b5f7-cd8a-c4a9-b6cf36644de0@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