Feature Request: Option for TLS no SSLRequest with psql - Mailing list pgsql-general

From AJ ONeal
Subject Feature Request: Option for TLS no SSLRequest with psql
Date
Msg-id ECNyobMWPeoCd4yj_5J0RsDL1yKC9MbbBwOGCYHgcts7v0BW_-znGIoxcvfzUsf3yKvUB6Lef22OBMZnJyZ-0T2U1qaVflQqEGO0RFHp1PE=@proton.me
Whole thread Raw
Responses Re: Feature Request: Option for TLS no SSLRequest with psql
Re: Feature Request: Option for TLS no SSLRequest with psql
List pgsql-general
Could we get a `postgrestls://` or `sslmode=tls` or --tls option that instructs psql​ to sends straight TLS, skipping the 0000000804d2162f / 0000000804d21630 + N / Y / S handshake?

Rationale:

In the age of TLS, SNI, and ALPN, protocol routing and virtual hosting is easier, more reliable, and less expensive than it's ever been, but having to deal with a bespoke protocol handshake at "the edge" really puts a damper on things:

Currently, every single proxy / TLS tool has to decide whether or not to support Postgres specifically. It's a lot of duplicate work and causes Postgres support to lag until someone who is 1) familiar with the language 2) familiar with the codebase 3) familiar with postgres' SSLRequest 4) and has power to review and accept changes is available (and willing) to help.


It would be great if the postgres​ server also supported receiving straight TLS, but since the reverse proxy / load balancer typically terminates the TLS in these settings, even if it were only available in the client, it would simplify protocol routing greatly.

Note: in many instances subdomains are used to specify user/db to route to, so SNI+ALPN alone are enough to complete the routing, but even if the plaintext user/db/app message is being matched on, it's much​ easier for someone to write a module in any given proxy for that because it fits the same pattern as HTTP Host matching - it doesn't require a handshake on either side of the TLS termination, which is where the complexity comes in.

AJ ONeal

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Unnecessary buffer usage with multicolumn index, row comparison, and equility constraint
Next
From: AJ ONeal
Date:
Subject: Feature Request: Add "pg" as TLS-ALPN