Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Direct SSL negotiation support #7809

Open
hlinnaka opened this issue May 20, 2024 · 5 comments
Open

Feature: Direct SSL negotiation support #7809

hlinnaka opened this issue May 20, 2024 · 5 comments
Labels
c/cloud/proxy Component: cloud: proxy t/feature Issue type: feature, for new features or requests

Comments

@hlinnaka
Copy link
Contributor

PostgreSQL 17 supports "direct SSL connections". That means, you can start the TLS handshake immediately after opening the TCP connection, without the traditional SSLRequest negotiation. That eliminates one round-trip from establishing a connection. libpq in v17 has new option sslnegotiation=direct, to use the new mode.

Let's add support for that to the proxy. There are two parts to this:

  1. Accept "direct SSL" connections from clients.

    Because our proxy parses and handles the authentication, we can accept direct SSL connections regardless of the Postgres server version that you're ultimately connecting to.

  2. Use the new direct SSL connections when connecting to a v17 server. We don't have v17 computes yet, so this will need to wait until we do.

@hlinnaka hlinnaka added t/feature Issue type: feature, for new features or requests c/cloud/proxy Component: cloud: proxy labels May 20, 2024
@hlinnaka
Copy link
Contributor Author

The direct SSL protocol is described in https://www.postgresql.org/docs/devel/protocol-flow.html#PROTOCOL-FLOW-SSL

@hlinnaka
Copy link
Contributor Author

hlinnaka commented May 20, 2024

Once you start to look this, I'd like get feedback on the relevant PostgreSQL documentation. Is it clear from the docs how it works? Anything missing that should be mentioned?

@conradludgate
Copy link
Contributor

@hlinnaka when is postgres 17 due to release?

@hlinnaka
Copy link
Contributor Author

@hlinnaka when is postgres 17 due to release?

Around September 2024

@hlinnaka
Copy link
Contributor Author

The GA 17.0 release is around September 2024, but v17 beta1 will released in the next few days. There's no rush, but it would be nice to have this some time before the GA release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c/cloud/proxy Component: cloud: proxy t/feature Issue type: feature, for new features or requests
Projects
None yet
Development

No branches or pull requests

2 participants