2021-12-17 10:51:33 +00:00
|
|
|
include /etc/ldap/schema/core.schema
|
|
|
|
include /etc/ldap/schema/cosine.schema
|
|
|
|
include /etc/ldap/schema/nis.schema
|
|
|
|
include /etc/ldap/schema/inetorgperson.schema
|
|
|
|
% for schema in sorted(conf.get('schemas', set())):
|
|
|
|
include /etc/ldap/schema/${schema}.schema
|
|
|
|
% endfor
|
|
|
|
include /etc/ldap/schema/ppolicy.schema
|
|
|
|
|
|
|
|
pidfile /var/run/slapd/slapd.pid
|
|
|
|
argsfile /var/run/slapd/slapd.args
|
|
|
|
|
|
|
|
# OpenLDAP logs can get rather spammy, so we enable logging only
|
|
|
|
# on demand for debug purposes to keep the syslog nice and tidy.
|
|
|
|
loglevel ${conf.get('loglevel', 0)}
|
|
|
|
|
|
|
|
sizelimit unlimited
|
|
|
|
|
|
|
|
disallow bind_anon
|
|
|
|
|
|
|
|
modulepath /usr/lib/ldap
|
|
|
|
moduleload back_mdb.so
|
|
|
|
moduleload back_monitor.so
|
|
|
|
moduleload back_ldap.so
|
|
|
|
moduleload memberof.so
|
|
|
|
moduleload syncprov.so
|
|
|
|
moduleload ppolicy.so
|
|
|
|
moduleload pw-sha2.so
|
|
|
|
|
|
|
|
TLSCACertificateFile /etc/ldap/ssl/${conf['ssl']}.crt_intermediate.pem
|
|
|
|
TLSCertificateFile /etc/ldap/ssl/${conf['ssl']}.crt.pem
|
|
|
|
TLSCertificateKeyFile /etc/ldap/ssl/${conf['ssl']}.key.pem
|
|
|
|
#TLSVerifyClient never
|
|
|
|
#TLSCRLCheck none
|
|
|
|
#security tls=1
|
|
|
|
|
|
|
|
backend mdb
|
|
|
|
database mdb
|
|
|
|
suffix "dc=qzwi,dc=de"
|
|
|
|
checkpoint 32 30
|
|
|
|
rootdn "uid=root,dc=qzwi,dc=de"
|
|
|
|
rootpw ${conf['rootpw']}
|
|
|
|
directory /var/lib/ldap
|
|
|
|
# mdb has a limit:
|
|
|
|
maxsize 1000000000
|
|
|
|
|
|
|
|
monitoring on
|
|
|
|
|
|
|
|
index cn pres,eq
|
|
|
|
index dc pres,eq
|
|
|
|
index member pres,eq
|
|
|
|
index memberOf pres,eq
|
|
|
|
index memberUid eq
|
|
|
|
index objectClass eq
|
|
|
|
index uid pres,eq
|
|
|
|
|
|
|
|
overlay memberof
|
|
|
|
memberof-group-oc groupOfNames
|
|
|
|
memberof-member-ad member
|
|
|
|
memberof-memberof-ad memberOf
|
|
|
|
memberof-refint TRUE
|
|
|
|
|
|
|
|
overlay ppolicy
|
|
|
|
|
2021-12-17 20:16:54 +00:00
|
|
|
access to dn.one="ou=Users,dc=qzwi,dc=de"
|
|
|
|
attrs=userPassword
|
|
|
|
by anonymous auth
|
|
|
|
by * break
|
2021-12-17 10:51:33 +00:00
|
|
|
|
2021-12-17 20:16:54 +00:00
|
|
|
access to *
|
|
|
|
by group="ou=qzwi-admins,ou=Groups,dc=qzwi,dc=de" manage
|
|
|
|
by * break
|
2021-12-17 10:51:33 +00:00
|
|
|
|
|
|
|
% for tree, matches in sorted(conf.get('access', {}).items()):
|
|
|
|
# ${tree}
|
2021-12-18 09:31:06 +00:00
|
|
|
% for access, users in sorted(matches.items()):
|
|
|
|
% for user in sorted(users):
|
2021-12-17 20:16:54 +00:00
|
|
|
access to dn.sub="${tree}"
|
|
|
|
by dn.exact="${user}" ${access}
|
|
|
|
by * break
|
2021-12-18 09:31:06 +00:00
|
|
|
% endfor
|
2021-12-17 10:51:33 +00:00
|
|
|
% endfor
|
|
|
|
# / ${tree}
|
|
|
|
|
|
|
|
% endfor
|
|
|
|
|
|
|
|
# Grant read access to all applications
|
2021-12-17 20:16:54 +00:00
|
|
|
access to dn.children="ou=Applications,dc=qzwi,dc=de"
|
|
|
|
attrs=userPassword
|
|
|
|
by anonymous auth
|
|
|
|
by * break
|
|
|
|
access to dn.sub="ou=Users,dc=qzwi,dc=de"
|
2021-12-18 09:31:06 +00:00
|
|
|
by dn.children="ou=Applications,dc=qzwi,dc=de" read
|
|
|
|
by * break
|
2021-12-17 20:16:54 +00:00
|
|
|
access to dn.sub="ou=Groups,dc=qzwi,dc=de"
|
2021-12-18 09:31:06 +00:00
|
|
|
by dn.children="ou=Applications,dc=qzwi,dc=de" read
|
|
|
|
by * break
|
2021-12-17 10:51:33 +00:00
|
|
|
|
|
|
|
database monitor
|
|
|
|
rootDN "cn=admin,cn=Monitor"
|
|
|
|
rootPW admin
|