Re: Fine-tune TLS 1.3 cipher suites and curves lists

From: Daniel Gustafsson <daniel(at)yesql(dot)se>
To: Seraphime Kirkovski <skirkovski(at)vmware(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Fine-tune TLS 1.3 cipher suites and curves lists
Date: 2023-07-17 20:06:07
Message-ID: 6E3FD976-0D7F-4F64-ACDD-3E0FBF3834AD@yesql.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> On 17 Jul 2023, at 15:16, Seraphime Kirkovski <skirkovski(at)vmware(dot)com> wrote:

> I see in the source code that only TLS 1.2 and bellow cipher lists can be configured:
>
> https://github.com/postgres/postgres/blob/master/src/backend/libpq/be-secure-openssl.c#L281
>
> and Postgres relies on the OpenSSL defaults for TLS 1.3 ciphersuites.
>
> My first question is whether there is a reason not to support setting TLS 1.3 cipher suites through configuration ? Maybe there are Postgres builds with BoringSSL ? (Just speculating ?)

I think the main raison is that noone has done it, and noone has requested it.
I have no way if knowing for certain, but I doubt too many postgres users
change this setting.

> Another thing I was curious about is why does postgres opts to support setting only a single elliptic group (https://github.com/postgres/postgres/blob/master/src/backend/libpq/be-secure-openssl.c#L1303) instead of calling out to an SSL function like SSL_CTX_set1_curves_list ?
>
> Would the community be interested in seeing patches for setting TLS 1.3 ciphersuites and expanding the configuration option for EC settings to support lists instead of single values ?

I would be interested in seeing them, and would offer to review them.

The main challenge is IMO to properly document these settings such that
postgres users know what they are, and when they should think about changing
them. Postgres also supports very old OpenSSL versions, so any change and
setting must in some way make sense for those installations (which may be a
no-op, a warning at startup for non-applicable settings, or something else).

--
Daniel Gustafsson

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Stephen Frost 2023-07-17 20:19:31 Re: SLRUs in the main buffer pool - Page Header definitions
Previous Message Jeff Davis 2023-07-17 19:43:10 Re: MERGE ... RETURNING