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