Postgresql with ldaps:/// url on port 636

Solution 1:

LDAPS is only supported since PostgreSQL 11. An example pg_hba.conf entry:

hostssl all all 192.168.0.1/24 ldap ldapserver=dc2.ad.foobar.com ldapport=636 ldapscheme=ldaps ldaptls=0 ldapbinddn="CN=ldap,OU=Helpers,OU=Foobar,DC=ad,DC=foobar,DC=com" ldapbindpasswd=*** ldapsearchattribute=mail ldapbasedn="OU=Users,OU=Foobar,DC=ad,DC=foobar,DC=com"

A complete guide: PostgreSQL 11 with Active Directory over SSL on CentOS 7