Re: Direct SSL connection with ALPN and HBA rules

From: Jacob Champion <jacob(dot)champion(at)enterprisedb(dot)com>
To: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Michael Paquier <michael(at)paquier(dot)xyz>, Postgres hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Direct SSL connection with ALPN and HBA rules
Date: 2024-04-25 23:23:59
Message-ID: CAOYmi+nWKJNihuMpT+ZVTC5-d+pQdACTK7xKhhwAB075EHrOMg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Apr 25, 2024 at 2:50 PM Heikki Linnakangas <hlinnaka(at)iki(dot)fi> wrote:
> > I think that comes down to the debate upthread, and whether you think
> > it's a performance tweak or a security feature. My take on it is,
> > `direct` mode is performance, and `requiredirect` is security.
>
> Agreed, although the the security benefits from `requiredirect` are
> pretty vague. It reduces the attack surface, but there are no known
> issues with the 'postgres' or 'direct' negotiation either.

I think reduction in attack surface is a concrete security benefit,
not a vague one. True, I don't know of any exploits today, but that
seems almost tautological -- if there were known exploits in our
upgrade handshake, I assume we'd be working to fix them ASAP?

> Perhaps 'requiredirect' should be renamed to 'directonly'?

If it's agreed that we don't want to require a stronger sslmode for
that sslnegotiation setting, then that would probably be an
improvement. But who is the target user for
`sslnegotiation=directonly`, in your opinion? Would they ever have a
reason to use a weak sslmode?

> >> I'm not sure about this either. The 'gssencmode' option is already
> >> quite weird in that it seems to override the "require"d priority of
> >> "sslmode=require", which it IMO really shouldn't.
>
> Yeah, that combination is weird. I think we should forbid it. But that's
> separate from sslnegotiation.

Separate but related, IMO. If we were all hypothetically okay with
gssencmode ignoring `sslmode=require`, then it's hard for me to claim
that `sslnegotiation=requiredirect` should behave differently. On the
other hand, if we're not okay with that and we'd like to change it,
it's easier for me to argue that `requiredirect` should also be
stricter from the get-go.

Thanks,
--Jacob

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2024-04-25 23:28:45 Re: BitmapHeapScan streaming read user and prelim refactoring
Previous Message Melanie Plageman 2024-04-25 23:03:57 Re: BitmapHeapScan streaming read user and prelim refactoring