12a50be520d9f76493b91ee36cfc698b87843d05
[mirror/userdir-ldap.git] / userdir-ldap-slapd.conf.in
1 # The backend type, ldbm, is the default standard
2 database hdb
3
4 # The base of your directory
5 suffix          "@@DN@@"
6
7 # Where the database file are physically stored
8 directory       "/var/lib/ldap"
9
10 moduleload      accesslog
11 overlay accesslog
12 logdb cn=log
13 logops writes
14 logold (objectclass=top)
15 logpurge 90+00:00 1+00:00
16
17 moduleload      constraint
18 overlay constraint
19 constraint_attribute keyfingerprint regex ^([0-9A-F]{40})$
20
21 # Indexing options
22 index gecos,cn,sn,uid,ircNick,hostname,emailForward pres,eq,sub,approx
23 index keyfingerprint,homeDirectory,objectClass,loginShell,supplementaryGid pres,eq
24 index c,gender,dnsZoneEntry,birthDate,gidNumber,uidNumber pres,eq
25
26 # Don't limit queries to the default of 500
27 sizelimit 10000
28
29 # Save the time that the entry gets modified
30 lastmod on
31
32
33 ##
34 ## prefix some rules that only apply to certain clients
35 ## and grant them more privileges
36 ##
37
38 # LDAP admins have full access, so has sshdist
39 access to *
40         by group="cn=LDAP Administrator,ou=users,@@DN@@" write
41         by dn="uid=sshdist,ou=users,@@DN@@" write
42         by * break
43
44 # allow keyring maint to write to the keyFingerPrint attribute
45 # (make an exception for adm for security reasons)
46 access to filter="(!(supplementaryGid=adm))" attrs=keyFingerPrint
47         by group="cn=Keyring Maintainers,ou=users,@@DN@@" write
48         by * break
49
50 # allow users write access to an explicit subset of their fields
51 access to attrs=c,l,loginShell,ircNick,labeledURI,icqUIN,jabberJID,onVacation,birthDate,mailDisableMessage,gender,emailforward,mailCallout,mailGreylisting,mailRBL,mailRHSBL,mailWhitelist,mailContentInspectionAction,mailDefaultOptions,facsimileTelephoneNumber,telephoneNumber,postalAddress,postalCode,loginShell,onVacation,privateSub,latitude,longitude,VoIP,userPassword,sudoPassword,webPassword,bATVToken
52         by self write
53         by * break
54
55
56 ##
57 ## All ACLs from here on result in a decision.  no fall through to later.
58 ##
59
60 # allow authn/z by anyone
61 access to attrs=userPassword,sudoPassword,webPassword,bATVToken
62         by * compare
63
64 # readable only by self
65 access to attrs=sshrsaauthkey
66         by self read
67         by * none
68
69 # debian.org readable, authenticated user readable
70 access to attrs=activity-pgp,activity-from,dnsZoneEntry,c,l,loginShell,onVacation,birthDate,mailDisableMessage,gender,emailforward,mailCallout,mailGreylisting,mailRBL,mailRHSBL,mailWhitelist,mailContentInspectionAction,mailDefaultOptions
71         by peername.ip=127.0.0.1 read
72         by domain=alioth.debian.org none
73         by domain.subtree=@@DOMAIN@@ read
74         by dn.regex="uid=.*,ou=users,@@DN@@" read
75         by * none
76
77 # authenticated user readable
78 access to attrs=facsimileTelephoneNumber,telephoneNumber,postalAddress,postalCode,privateSub,latitude,longitude,VoIP
79         by dn.regex="uid=.*,ou=users,@@DN@@" read
80         by * none
81
82
83 # rest is globally readable
84 access to *
85         by * read
86
87
88 database hdb
89 directory       "/var/lib/ldap-log"
90 suffix cn=log
91 #
92 sizelimit 10000
93
94 index reqStart eq
95 access to *
96         by group="cn=LDAP Administrator,ou=users,@@DN@@" write
97         by dn="uid=sshdist,ou=users,@@DN@@" read
98         by * none
99