smhairston
smhairston

Reputation: 1

How to set up Postgresql LDAP Auth w/ ldaptls=1 . (postgresql 10)

Right now I have the following, which works:

host all all all ldap ldapserver=ldap.server.name ldapprefix="DOMAIN\"

but to my understanding the connection between the ldap server and pg db isn't encrypted and I need it to be. So i change to:

host all all all ldap ldapserver=ldap.server.name ldapprefix="DOMAIN\" ldaptls=1

this give me an error saying "could not start ldap tls session connect error".

What are the steps that Im missing in order to get this working? I have a feeling I need to be dropping certs either somewhere on my ldap instance or pg instance (or both) but I don't really have any experience configuring any of this.

Upvotes: 0

Views: 1448

Answers (1)

richyen
richyen

Reputation: 9988

If you are looking to use ldaptls=1, then please make sure that you are using the correct certs to connect to the LDAP server. Also, depending on how LDAP is set up, you may need to add ldapport=389 to tell Postgres to use the TLS port on the LDAP side.

More information at https://richyen.com/postgres/2018/02/09/making_postgres_talk_to_ldap_with_starttls.html

Upvotes: 1

Related Questions