Re: Proposal: Support custom authentication methods using hooks,Re: Proposal: Support custom authentication methods using hooks

From: Joshua Brindle <joshua(dot)brindle(at)crunchydata(dot)com>
To: Tatsuo Ishii <ishii(at)sraoss(dot)co(dot)jp>
Cc: Stephen Frost <sfrost(at)snowman(dot)net>, "Jonathan S(dot) Katz" <jkatz(at)postgresql(dot)org>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Jeff Davis <pgsql(at)j-davis(dot)com>, samay sharma <smilingsamay(at)gmail(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org, Andres Freund <andres(at)anarazel(dot)de>
Subject: Re: Proposal: Support custom authentication methods using hooks,Re: Proposal: Support custom authentication methods using hooks
Date: 2022-03-07 14:43:41
Message-ID: CAGB+Vh488Wj003+z_is1QKsOxDWBnmWxLgXokjf2KCR18+M2fw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Mar 4, 2022 at 6:03 PM Tatsuo Ishii <ishii(at)sraoss(dot)co(dot)jp> wrote:
>
> >> I still don't understand why using plaintex password authentication
> >> over SSL connection is considered insecure. Actually we have been
> >> stating opposite in the manual:
> >> https://www.postgresql.org/docs/14/auth-password.html
> >>
> >> "If the connection is protected by SSL encryption then password can be
> >> used safely, though."
> >
> > If you aren't doing client verification (i.e., cert in pg_hba) and are
> > not doing verify-full on the client side then a man-in-the-middle
> > attack on TLS is trivial, and the plaintext password will be
> > sniffable.
>
> So the plaintext password is safe if used with hostssl + verify-full
> (server side) and sslmode = verify-full (client side), right?
>

That would be safe-in-transit so long as everything was configured
properly and all certificates were protected. Unfortunately PG doesn't
make this incredibly easy to implement, it allows only 1 client root
cert, the client side doesn't understand system certificate stores or
PKI, etc.

Further, if someone gains access to the password hashes there is still
a pass-the-hash vulnerability, though.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Nitin Jadhav 2022-03-07 14:45:28 Re: Report checkpoint progress with pg_stat_progress_checkpoint (was: Report checkpoint progress in server logs)
Previous Message Amit Langote 2022-03-07 14:18:33 Re: generic plans and "initial" pruning