rootdn "cn=admin,cn=config"
rootpw secret
+# Options to allow DIGEST-MD5 SASL binds using passwords in the LDAP directory
+password-hash {CLEARTEXT}
+
+authz-regexp
+ uid=admin,cn=[^,]*,cn=auth
+ cn=admin,dc=example,dc=com
+
+authz-regexp
+ uid=([^,]*),cn=[^,]*,cn=auth
+ uid=$1,ou=people,dc=example,dc=com
+
#######################################################################
# mdb database definitions can be added here, or added by ldapadd
#######################################################################
rootdn "cn=admin,cn=config"
rootpw secret
+# SASL mapping of users to DNs so we can do PLAIN / LOGIN over ldaps
+authz-regexp
+ uid=admin,cn=[^,]*,cn=auth
+ cn=admin,dc=example,dc=com
+
+authz-regexp
+ uid=([^,]*),cn=[^,]*,cn=auth
+ uid=$1,ou=people,dc=subdept,dc=example,dc=com
+
#
# Certificates for SSL/TLS connections
# Note - these will not match the host name so clients need to use
olcDbCheckpoint: 512 30
olcAccess: to attrs=userPassword by dn="cn=admin,dc=example,dc=com" write by anonymous auth by self write by * none
olcAccess: to attrs=shadowLastChange by self write by * read
-olcAccess: to * by dn.exact="gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth" manage by dn="cn=admin,cn=config" manage
-olcAccess: to dn.base="" by * read
-olcAccess: to * by dn="cn=admin,dc=example,dc=com" write by * read
+olcAccess: to dn.base="" by dn="cn=admin,cn=config" manage by * read
+olcAccess: to * by dn.exact="gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth" manage by dn="cn=admin,cn=config" manage by dn="cn=admin,dc=example,dc=com" write by * read
dn: olcOverlay=syncprov,olcDatabase={1}mdb,cn=config
objectClass: olcOverlayConfig
olcLastMod: TRUE
olcDbCheckpoint: 512 30
olcAccess: to attrs=userPassword by dn="cn=admin,dc=example,dc=com" write by anonymous auth by self write by * none
-olcAccess: to * by dn.exact="gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth" manage by dn="cn=admin,cn=config" manage
olcAccess: to attrs=shadowLastChange by self write by * read
-olcAccess: to dn.base="" by * read
-olcAccess: to * by dn="cn=admin,dc=example,dc=com" write by * read
+olcAccess: to dn.base="" by dn="cn=admin,cn=config" manage by * read
+olcAccess: to * by dn.exact="gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth" manage by dn="cn=admin,cn=config" manage by dn="cn=admin,dc=example,dc=com" write by * read
# Create top-level object in domain
dn: dc=example,dc=com