allow listmasters to write to the privateSub attribute
[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 listmasters to write to the privateSub attribute
51 access to attrs=privateSub
52         by group="cn=Listmasters,ou=users,@@DN@@" write
53         by * break
54
55 # allow users write access to an explicit subset of their fields
56 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,voipPassword,bATVToken
57         by self write
58         by * break
59
60
61 ##
62 ## All ACLs from here on result in a decision.  no fall through to later.
63 ##
64
65 # allow authn/z by anyone
66 access to attrs=userPassword,sudoPassword,webPassword,voipPassword,bATVToken
67         by * compare
68
69 # readable only by self
70 access to attrs=sshrsaauthkey
71         by self read
72         by * none
73
74 # debian.org readable, authenticated user readable
75 access to attrs=activity-pgp,activity-from,dnsZoneEntry,c,l,loginShell,onVacation,birthDate,mailDisableMessage,gender,emailforward,mailCallout,mailGreylisting,mailRBL,mailRHSBL,mailWhitelist,mailContentInspectionAction,mailDefaultOptions
76         by peername.ip=127.0.0.1 read
77         by domain=alioth.debian.org none
78         by domain.subtree=@@DOMAIN@@ read
79         by dn.regex="uid=.*,ou=users,@@DN@@" read
80         by * none
81
82 # authenticated user readable
83 access to attrs=facsimileTelephoneNumber,telephoneNumber,postalAddress,postalCode,privateSub,latitude,longitude,VoIP
84         by dn.regex="uid=.*,ou=users,@@DN@@" read
85         by * none
86
87 # rest is globally readable
88 access to attrs=access,accountComment,accountStatus,admin,allowedGroups,allowedHost,architecture,bandwidth,cn,comment,dc,description,disk,distribution,dnsTTL,dnsZoneEntry,exportOptions,gecos,gid,gidNumber,homeDirectory,host,hostname,icqUin,ipHostNumber,ircNick,jabberJID,keyFingerPrint,labeledURI,mXRecord,machine,member,memory,mn,objectClass,ou,physicalHost,purpose,shadowExpire,shadowLastChange,shadowMax,shadowMin,shadowWarning,sn,sponsor,sponsor-admin,sshRSAHostKey,status,subGroup,supplementaryGid,uid,uidNumber
89         by * read
90
91 access to *
92         by * none
93
94
95 database hdb
96 directory       "/var/lib/ldap-log"
97 suffix cn=log
98 #
99 sizelimit 10000
100
101 index reqStart eq
102 access to *
103         by group="cn=LDAP Administrator,ou=users,@@DN@@" write
104         by dn="uid=sshdist,ou=users,@@DN@@" read
105         by * none
106