Serverside SNI in PostgreSQL 19
summary
Server-side SNI lands in Postgres 19 as a committed feature that lets the server read clients' sslsni and select certificate, key and CA per hostname using a new SSL SNI GUC and a pg_hba.conf SNI table. It preloads OpenSSL contexts so handshakes avoid file I O, matches literal case-insensitive hostnames (with a '*' default and a special no_SNI keyword), applies CRLs cluster-wide, works with OpenSSL 1.1.1+ (not LibreSSL), and currently exposes SNI during an unencrypted client hello so ECH support is still future work.
AI-written summary · about
chapters (16)
- 0:00Introduction and speaker background
- 1:08What is SNI and why it matters
- 3:58Security limitations of SNI
- 5:25Client-side SNI in PostgreSQL history
- 6:49Server-side SNI in PostgreSQL 19
- 7:30Configuration and pg_hba changes
- 9:16Supported TLS libraries and versions
- 11:24Default host and no-SNI handling
- 13:11Host-based certificate configuration
- 14:57Strict mode and connection matching
- 15:39Multi-tenancy and security benefits
- 16:43Internal implementation details
- 20:54Future work and improvements
- 21:56Encrypted Client Hello support
- 23:00LibreSSL compatibility challenges
- 24:04Summary and Q&A
