TLS and certificate verification
What your endpoint presents, what the default line checks and what it does not, the form each client uses to verify the certificate as well, and what renewal asks of you.
Database connections are TLS-only. There is no plaintext port and no downgrade path.
There is no bundle to download
Your endpoint presents a certificate issued by a public authority. A client that verifies it does so against roots it already has, so there is no file to fetch, no path to deploy and nothing to redeploy when a certificate is replaced.
One certificate carries both of your service's names, the direct one and the one ending in
-pooler. Balta picks it by the name your client sends during the TLS handshake, which is why a
client must send one: libpq 14 and newer do by default, as does every current driver.
This page said the opposite until 22 September 2026. The earlier design issued from a certificate authority of ours. That meant every client needed a copy of our roots before it could verify anything, and no such copy was ever downloadable. Public issuance removes the step rather than improving it.
The default, and the stronger form
| Mode | What it checks | Where you meet it |
|---|---|---|
disable | Nothing. No encryption | Refused by Balta |
require | Encryption only. Any certificate is accepted | The default line on the Connect tab |
verify-ca | The chain, but not the hostname | Not offered |
verify-full | The chain and that the hostname matches | “Verify the certificate” on the Connect tab |
The default line is sslmode=require because every client we have run connects with it as given,
from libpq 14 to the binary Python and Ruby packages. It protects against someone reading the
connection, and not against someone who can answer in your database's place. verify-full protects
against both.
Turn on Verify the certificate on your language's tab in the Connect page for the form that does. They differ by client because the clients find their roots differently:
| Client | The verified form | Roots it checks against |
|---|---|---|
psql, libpq 16 and newer | sslmode=verify-full&sslrootcert=system | Those of the TLS library libpq was built with |
| Python, psycopg | sslmode="verify-full", sslrootcert=certifi.where() | Mozilla's, from the certifi package |
Node, pg | sslmode=verify-full | Node's |
Go, pgx | sslmode=verify-full | Go's system roots |
Java, pgjdbc | sslmode=verify-full&sslfactory=org.postgresql.ssl.DefaultJavaSSLFactory | The JVM's cacerts |
A form counts only if it refuses. We test each one above three ways against a Balta database: with the authority in the client's roots, where it must connect; with the authority absent, where it must refuse; and with a trusted certificate for another name, where it must refuse again. Copy the form as given: a line that connects has not necessarily checked anything.
libpq 14 and 15 read system as a file name and refuse to connect, with
root certificate file "system" does not exist, so the psql form needs libpq 16. The psycopg
binary package carries its own TLS library, which looks for roots in a directory that exists only on
the machine that built it; the certifi package is where its form finds them instead.
Ruby's pg gem and the URI have no verified form here. The URI is read by many drivers that
disagree about sslrootcert, and for the pg gem we found no form that verifies on every system
without naming a file on your computer.
Connect to the hostname, never to an IP address. verify-full checks the hostname against the
certificate, and an IP address will not match it. A client connecting to an IP address also sends
no server name, and Balta needs the name to find your database.
Client examples has each form as a working snippet.
Renewal
Certificates are short-lived and are replaced before they expire. Nothing on your side changes when
one is. With the default line your client does not check the certificate; with a verified form it
checks it against public roots, not a file we handed you, and those roots are maintained by your
operating system, your JVM, your Node build or certifi rather than by us.
That is the whole of what this design asks of you, and it is the reason it replaced the previous one.