Score:1

How to (properly) force the use of SSL or STARTTLS in OpenLDAP?

ar flag

I have successfully managed to configure my OpenLDAP (which is an Apple Open Directory variant, but that should not matter) to work with both, SSL (ldaps on port 636) as well as STARTTLS (on port 389).

However, it's still possible for a client to connect without any encryption, and I'm trying to disable that. Admittedly, I have only very limited knowledge of OpenLDAP.

Based on this this answer and this tutorial, I tried it with

dn: olcDatabase={1}bdb,cn=config
changetype: modify
add: olcSecurity
olcSecurity: tls=1

After I had applied this to my ldap, attempts to connect without STARTTLS were indeed rejected. However, I was unable to authenticate any more, getting

LDAP: error code 50 - Insufficient Access Rights

Anonymous access works, but I when I test authentication of a user, I get the same above error.

Once I revert my changes (= delete the olcSecurity entry), everything is back to normal.

It looks like my change affected the access authorization, but I don't understand how this is connected, and what might be wrong.

user1686 avatar
fr flag
https://serverfault.com/a/1122437/5799
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.