Re: Direct SSL connection and ALPN loose ends

From: Ranier Vilela <ranier(dot)vf(at)gmail(dot)com>
To: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
Cc: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>, Jacob Champion <jchampion(at)timescale(dot)com>, Peter Eisentraut <peter(at)eisentraut(dot)org>, Robert Haas <robertmhaas(at)gmail(dot)com>, Michael Paquier <michael(at)paquier(dot)xyz>
Subject: Re: Direct SSL connection and ALPN loose ends
Date: 2024-04-29 19:19:07
Message-ID: CAEudQAod9XMcMudW2CQX2=Uebb5Mvdw+xwbiQivq7ux+RKgSPw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Em seg., 29 de abr. de 2024 às 15:36, Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
escreveu:

> On 29/04/2024 21:06, Ranier Vilela wrote:
> > Em seg., 29 de abr. de 2024 às 14:56, Heikki Linnakangas
> > <hlinnaka(at)iki(dot)fi <mailto:hlinnaka(at)iki(dot)fi>> escreveu:
> >
> > On 29/04/2024 20:10, Ranier Vilela wrote:
> > > Hi,
> > >
> > > With TLS 1.3 and others there is possibly a security flaw using
> > ALPN [1].
> > >
> > > It seems to me that the ALPN protocol can be bypassed if the
> > client does
> > > not correctly inform the ClientHello header.
> > >
> > > So, the suggestion is to check the ClientHello header in the
> > server and
> > > terminate the TLS handshake early.
> >
> > Sounds to me like it's working as designed. ALPN in general is
> > optional;
> > if the client doesn't request it, then you proceed without it. We do
> > require ALPN for direct SSL connections though. We can, because
> direct
> > SSL connections is a new feature in Postgres. But we cannot require
> it
> > for the connections negotiated with SSLRequest, or we break
> > compatibility with old clients that don't use ALPN.
> >
> > Ok.
> > But what if I have a server configured for TLS 1.3 and that requires
> > ALPN to allow access?
> > What about a client configured without ALPN requiring connection?
>
> Sorry, I don't understand the questions. What about them?
>
Sorry, I'll try to be clearer.
The way it is designed, can we impose TLS 1.3 and ALPN to allow access to a
public server?

And if on the other side we have a client, configured without ALPN,
when requesting access, the server will refuse?

best regards,
Ranier Vilela

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Jacob Champion 2024-04-29 19:32:36 Re: Direct SSL connection with ALPN and HBA rules
Previous Message Thomas Munro 2024-04-29 19:17:34 Re: Extension Enhancement: Buffer Invalidation in pg_buffercache