-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Description
Postgres 17 supports direct SSL negotiation with sslnegotiation=direct. pgx supports this, for example via PGSSLNEGOTIATION=direct or by sslnegotiation=direct in the DB connection URL, but it's not supported here.
Currently I'm running a Kubernetes Job that uses golang-migrate to run migrations. This Job talks to an RDS instance where traffic goes through an egress gateway, who's service entry requires TLS on port 5432. Without direct SSL negotiation, the initial SSL negotiation packets are sent over plaintext, causing the gateway to reject traffic from the Job's pod.
A solution is to create the connection manually and pass the connection to the golang-migrate binaries, but this requires maintaining my own wrapper binary, workflows to build and push it, etc. I'd rather just have golang-migrate support direct SSL and use this binary in my Job directly without maintaining a wrapper.