PostgreSQL DN Distinguished Name certificate authentication design

PostgreSQL Distinguished Name (DN) Authentication: Beyond CN-Based Certificate Mapping

Today, I’m diving into Distinguished Name (DN) authentication—a powerful feature that enables certificate-based authentication when the Common Name (CN) in your client certificate doesn’t match your PostgreSQL username. This approach is essential in enterprise environments where certificate naming conventions don’t align with database user naming requirements. Version Compatibility: The clientname=DN feature was introduced in PostgreSQL 14. If you’re using PostgreSQL 13 or earlier versions, this DN authentication method will not work and you’ll need to use traditional CN-based certificate authentication instead. ...

August 15, 2025 · 8 min · Özkan Pakdil