Current system: CentOS 7.9, OpenLDAP 2.4
I would like to implement a "hook" into my LDAP operations so that when an ldapadd or ldapmodify operation takes place, a script is run in addition to the normal database operations. From my web searches, it appears that LDAP has a "socket overlay" mechanism that I've seen referred to as slapd-sock
, slapo-sock
, and back-sock
. (Are all these the same thing, or have I missed an important difference?)
Here's a sample configuration from an old thread question of lines that are intended to be added to slapd.conf
:
overlay sock
extensions binddn peername ssf connid
socketpath sockoverlay-listener
sockops modify add
All of the examples and man pages I've found so far show configuration lines to be added to slapd.conf
. However, I've also seen that slapd.conf
is on its way out as a means of controlling LDAP. I'd like to set something up with some stability, especially since I know I'll be upgrading to AlmaLinux 9.1 and OpenLDAP 2.6 before the end of the year.
My question is: How do I specify the above options within an LDIF file? Note that I'm not asking how to use the ldapmodify
command. I'm asking how, from the above slapd.conf
configuration, do I derive the appropriate cn, objectClass, and attributes to put into the LDIF file to enable back-sock
(or whatever it's called)?
I know this is possible, since the OpenLDAP release notes indicate fixes that have been to controlling socket overlays from cn=config
, but I can't find any examples of how to do it.