Re: Direct SSL connection with ALPN and HBA rules
Heikki Linnakangas <hlinnaka@iki.fi>
From: Heikki Linnakangas <hlinnaka@iki.fi>
To: Daniel Gustafsson <daniel@yesql.se>, Robert Haas <robertmhaas@gmail.com>
Cc: Jacob Champion <jacob.champion@enterprisedb.com>,
Michael Paquier <michael@paquier.xyz>,
Postgres hackers <pgsql-hackers@lists.postgresql.org>
Date: 2024-05-16T14:23:54Z
Lists: pgsql-hackers
On 16/05/2024 17:08, Daniel Gustafsson wrote:
>> On 16 May 2024, at 15:54, Robert Haas <robertmhaas@gmail.com> wrote:
>>
>> On Wed, May 15, 2024 at 9:33 AM Heikki Linnakangas <hlinnaka@iki.fi> wrote:
>>> Ok, yeah, I can see that now. Here's a new version to address that. I
>>> merged ENC_SSL_NEGOTIATED_SSL and ENC_SSL_DIRECT_SSL to a single method,
>>> ENC_SSL. The places that need to distinguish between them now check
>>> conn-sslnegotiation. That seems more clear now that there is no fallback.
>>
>> Unless there is a compelling reason to do otherwise, we should
>> expedite getting this committed so that it is included in beta1.
>> Release freeze begins Saturday.
>
> +1. Having reread the thread and patch I think we should go for this one.
Yep, committed. Thanks everyone!
On 15/05/2024 21:24, Jacob Champion wrote:
> This assertion seems a little strange to me:
>
>> if (conn->sslnegotiation[0] == 'p')
>> {
>> ProtocolVersion pv;
>>
>> Assert(conn->sslnegotiation[0] == 'p');
>
> But other than that nitpick, nothing else jumps out at me at the moment.
Fixed that. It was a leftover, I had the if-else conditions the other
way round at one point during development.
--
Heikki Linnakangas
Neon (https://neon.tech)
Commits
-
Remove option to fall back from direct to postgres SSL negotiation
- fb5718f35ff6 17.0 landed
-
Reject SSL connection if ALPN is used but there's no common protocol
- 17a834a04d5a 17.0 landed
-
libpq: Enforce ALPN in direct SSL connections
- 03a0e0d4bb78 17.0 landed
-
libpq: If ALPN is not used, make PQsslAttribute(conn, "alpn") == ""
- 3c184092651b 17.0 landed
-
Fix documentation and comments on what happens after GSS rejection
- 5c9f35fc48ea 17.0 landed
-
doc: Add note to prevent server spoofing with SCRAM
- d0f4824a5410 16.0 cited