Re: [PATCH] Clarify that ssl_groups is for any key exchange groups

Поиск
Список
Период
Сортировка
Искать

Re: [PATCH] Clarify that ssl_groups is for any key exchange groups

От:
Ewan Young <kdbase.hack@gmail.com>
Дата:
On Tue, Jun 2, 2026 at 4:05 AM Si, Evan  wrote:
>
> Hi,
>
> The ssl_groups parameter introduced in Postgres 18 decided to use a short_desc: "Sets the group(s) to use for Diffie-Hellman key exchange" [1]. The documentation still references curves [2].
>
> However, this parameter is just passed through to SSL_CTX_set1_groups_list. This means the parameter readily accepts values like a pure `MLKEM768`, assuming the crypto lib supports it, which is true since OpenSSL 3.5. Yet these Shor-safe groups are not DH key exchange.
>
> I think it makes sense to modify the documentation to a more generic one to reflect the capabilities of ssl_groups more accurately, e.g. "Sets the named groups to use for TLS key exchange."
>
> A more concrete patch suggestion is attached.
>
> Evan
Hi,

+1 for the idea. (I'm fairly new here, so please take my comments with
a grain of salt.)

I tried the patch on HEAD: it applies cleanly, and the new short_desc shows up
correctly in postgres --describe-config.

While reading it I noticed two small things:
1. The comment just above the renamed call in be_tls_init() still
   says "set up ephemeral DH and ECDH keys". Maybe it should be
   updated to match?

2. The SSLECDHCurve variable (and its "GUC variable for default ECDH
   curve" comment in be-secure.c) still uses the old naming. I wasn't
   sure if that was left out intentionally to keep the patch small --
   if not, would it make sense to rename it too, for consistency with
   the initialize_groups() rename?

Regards,
Ewan
>
> [1] https://www.postgresql.org/message-id/D44791DD-0CD9-48A7-9471-60593673A91B%40yesql.se
> [2] https://www.postgresql.org/docs/18/runtime-config-connection.html#GUC-SSL-GROUPS
>
>


Re: [PATCH] Clarify that ssl_groups is for any key exchange groups

От:
"Si, Evan" <evsi@amazon.com>
Дата:
Вложения:
On 6/2/26, 11:32 PM, "Ewan Young" > wrote:
>
> +1 for the idea. (I'm fairly new here, so please take my comments with
> a grain of salt.)

Thanks for the review!

> 1. The comment just above the renamed call in be_tls_init() still
> says "set up ephemeral DH and ECDH keys". Maybe it should be
> updated to match?

Right, that makes sense. I did a larger grep and updated comments where I found stale references to curves and (EC)DH.

> 2. The SSLECDHCurve variable (and its "GUC variable for default ECDH
> curve" comment in be-secure.c) still uses the old naming. I wasn't
> sure if that was left out intentionally to keep the patch small --
> if not, would it make sense to rename it too, for consistency with
> the initialize_groups() rename?

This also seems reasonable. I didn't find usage of this extern outside of Postgres itself in the wild from a brief search.

Attached a revision.

Evan

Re: [PATCH] Clarify that ssl_groups is for any key exchange groups

От:
Daniel Gustafsson <daniel@yesql.se>
Дата:
> On 4 Jun 2026, at 05:00, Ewan Young  wrote:

> v2 looks good to me, and I have nothing further.

I have applied the docs portion of this patch to master and REL_18_STABLE, but
given where we are in the release cycle I don't think the renames qualify as
fixes during a freeze.  Please feel free to register this patch in the upcoming
commitfest to get the remaining portion into v20.  You can add me as a reviewer
on that entry to make sure it stays on my radar.

--
Daniel Gustafsson



Re: [PATCH] Clarify that ssl_groups is for any key exchange groups

От:
Evan <evansi.dev@gmail.com>
Дата:
On 6/5/2026 1:22 PM, Daniel Gustafsson wrote:
>> On 4 Jun 2026, at 05:00, Ewan Young  wrote:
> 
>> v2 looks good to me, and I have nothing further.
> 
> I have applied the docs portion of this patch to master and REL_18_STABLE, but
> given where we are in the release cycle I don't think the renames qualify as
> fixes during a freeze.  Please feel free to register this patch in the upcoming
> commitfest to get the remaining portion into v20.  You can add me as a reviewer
> on that entry to make sure it stays on my radar.
> 
Thanks! It looks like you found the commitfest entry for it right after 
the email.

Otherwise for reference: https://commitfest.postgresql.org/patch/6843/

(Same person, different email.)


Re: [PATCH] Clarify that ssl_groups is for any key exchange groups

От:
surya poondla <suryapoondla4@gmail.com>
Дата:
Hi Evan,

Thank you for the v3 patch, it applies cleanly to the current master.

The generated GUC table picks up SSLNamedGroups, and no references to SSLECDHCurve remain anywhere in src/ or doc/.

The patch looks good.

Regards,
Surya Poondla
FAQ