slapd-acl.conf 5.48 KB
Newer Older
Kurt Zeilenga's avatar
Kurt Zeilenga committed
1
# master slapd config -- for testing
Quanah Gibson-Mount's avatar
Quanah Gibson-Mount committed
2
# $OpenLDAP$
Kurt Zeilenga's avatar
notices    
Kurt Zeilenga committed
3
4
## This work is part of OpenLDAP Software <http://www.openldap.org/>.
##
Quanah Gibson-Mount's avatar
Quanah Gibson-Mount committed
5
## Copyright 1998-2019 The OpenLDAP Foundation.
Kurt Zeilenga's avatar
notices    
Kurt Zeilenga committed
6
7
8
9
10
11
12
13
14
15
## All rights reserved.
##
## Redistribution and use in source and binary forms, with or without
## modification, are permitted only as authorized by the OpenLDAP
## Public License.
##
## A copy of this license is available in the file LICENSE in the
## top-level directory of the distribution or, alternatively, at
## <http://www.OpenLDAP.org/license.html>.

16
17
18
19
20
21
22
include		@SCHEMADIR@/core.schema
include		@SCHEMADIR@/cosine.schema
include		@SCHEMADIR@/inetorgperson.schema
include		@SCHEMADIR@/openldap.schema
include		@SCHEMADIR@/nis.schema
pidfile		@TESTDIR@/slapd.1.pid
argsfile	@TESTDIR@/slapd.1.args
Kurt Zeilenga's avatar
Kurt Zeilenga committed
23

Kurt Zeilenga's avatar
Kurt Zeilenga committed
24
# global ACLs
25
26
27
28
#
# normal installations should protect root dse, cn=monitor, cn=subschema
#

Pierangelo Masarati's avatar
cleanup    
Pierangelo Masarati committed
29
access		to dn.exact="" attrs=objectClass
30
31
32
		by users read
access		to *
		by * read
Kurt Zeilenga's avatar
Kurt Zeilenga committed
33

34
35
#mod#modulepath	../servers/slapd/back-@BACKEND@/
#mod#moduleload	back_@BACKEND@.la
36
37
#monitormod#modulepath ../servers/slapd/back-monitor/
#monitormod#moduleload back_monitor.la
38

Kurt Zeilenga's avatar
Kurt Zeilenga committed
39
#######################################################################
40
# database definitions
Kurt Zeilenga's avatar
Kurt Zeilenga committed
41
42
#######################################################################

43
database	@BACKEND@
44

45
46
suffix		"dc=example,dc=com"
rootdn		"cn=Manager,dc=example,dc=com"
Kurt Zeilenga's avatar
Kurt Zeilenga committed
47
rootpw		secret
Quanah Gibson-Mount's avatar
Quanah Gibson-Mount committed
48
#~null~#directory	@TESTDIR@/db.1.a
49
50
#indexdb#index		objectClass	eq
#indexdb#index		cn,sn,uid	pres,eq,sub
Quanah Gibson-Mount's avatar
Quanah Gibson-Mount committed
51
52
#ndb#dbname db_1
#ndb#include @DATADIR@/ndb.conf
Quanah Gibson-Mount's avatar
Quanah Gibson-Mount committed
53
add_content_acl	on
Pierangelo Masarati's avatar
cleanup    
Pierangelo Masarati committed
54
55
#access		to attrs=objectclass dn.subtree="dc=example,dc=com"
access		to attrs=objectclass
Quanah Gibson-Mount's avatar
Quanah Gibson-Mount committed
56
		by dn.exact="cn=Bjorn Jensen,ou=Information Technology Division,ou=People,dc=example,dc=com" add
Kurt Zeilenga's avatar
Kurt Zeilenga committed
57
		by * =rsc stop
58

Pierangelo Masarati's avatar
cleanup    
Pierangelo Masarati committed
59
60
#access		to filter="(objectclass=person)" attrs=userpassword dn.subtree="dc=example,dc=com"
access		to filter="(objectclass=person)" attrs=userpassword
61
		by anonymous auth
Kurt Zeilenga's avatar
Kurt Zeilenga committed
62
		by self =wx
63

64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
access		to dn.exact="cn=Mark Elliot,ou=Alumni Association,ou=People,dc=example,dc=com"
			attrs=cn val="Mark A Elliot"
		by dn="cn=Barbara Jensen,ou=Information Technology Division,ou=People,dc=example,dc=com" read
		by * break

access		to dn.exact="cn=Mark Elliot,ou=Alumni Association,ou=People,dc=example,dc=com"
			attrs=cn val="Mark Elliot"
		by dn="cn=Bjorn Jensen,ou=Information Technology Division,ou=People,dc=example,dc=com" read
		by * break

access		to dn.exact="cn=Mark Elliot,ou=Alumni Association,ou=People,dc=example,dc=com"
			attrs=cn
		by * search

access		to dn.exact="cn=John Doe,ou=Information Technology Division,ou=People,dc=example,dc=com"
Pierangelo Masarati's avatar
Pierangelo Masarati committed
79
			attrs=cn val.regex="^John D.+"
80
81
82
83
		by dn="cn=Barbara Jensen,ou=Information Technology Division,ou=People,dc=example,dc=com" read
		by * break

access		to dn.exact="cn=John Doe,ou=Information Technology Division,ou=People,dc=example,dc=com"
Pierangelo Masarati's avatar
Pierangelo Masarati committed
84
			attrs=cn val.regex="^Jonath.+"
85
86
87
88
89
90
91
		by dn="cn=Bjorn Jensen,ou=Information Technology Division,ou=People,dc=example,dc=com" read
		by * break

access		to dn.exact="cn=John Doe,ou=Information Technology Division,ou=People,dc=example,dc=com"
			attrs=cn
		by * search

Pierangelo Masarati's avatar
Pierangelo Masarati committed
92
93
94
95
96
97
98
99
100
101
102
access		to dn.onelevel="ou=Information Technology Division,ou=People,dc=example,dc=com"
			filter="(cn=*Jensen)"
			attrs=cn val.regex=".*Jensen$"
		by dn="cn=Barbara Jensen,ou=Information Technology Division,ou=People,dc=example,dc=com" read
		by dn="cn=Bjorn Jensen,ou=Information Technology Division,ou=People,dc=example,dc=com" read
		by * break

access		to dn.exact="cn=Bjorn Jensen,ou=Information Technology Division,ou=People,dc=example,dc=com"
			attrs=cn
		by * search

103
104
105
access		to dn.children="ou=Alumni Association,ou=People,dc=example,dc=com"
		by dn.regex=".+,dc=example,dc=com" +c continue
		by dn.subtree="dc=example,dc=com" +rs continue
106
		by dn.children="dc=example,dc=com" +d continue
Kurt Zeilenga's avatar
Kurt Zeilenga committed
107
		by * stop
108

Pierangelo Masarati's avatar
cleanup    
Pierangelo Masarati committed
109
110
#access		to attrs=member,uniquemember dn.subtree="dc=example,dc=com"
access		to attrs=member,uniquemember
111
		by dn.exact="cn=James A Jones 1,ou=Alumni Association,ou=People,dc=example,dc=com" selfwrite
Kurt Zeilenga's avatar
Kurt Zeilenga committed
112
		by dnattr=member selfwrite
113
		by dnattr=uniquemember selfwrite
Kurt Zeilenga's avatar
Kurt Zeilenga committed
114
		by * read
115

Pierangelo Masarati's avatar
cleanup    
Pierangelo Masarati committed
116
117
#access		to attrs=member,uniquemember filter="(mail=*com)" dn.subtree="dc=example,dc=com"
access		to attrs=member,uniquemember filter="(mail=*com)"
Kurt Zeilenga's avatar
Kurt Zeilenga committed
118
119
		by * read

120
121
#access		to filter="(|(objectclass=groupofnames)(objectClass=groupofuniquenames))" dn.subtree="dc=example,dc=com"
access		to filter="(|(objectclass=groupofnames)(objectClass=groupofuniquenames))"
Pierangelo Masarati's avatar
Pierangelo Masarati committed
122
		by dn.exact="cn=Bjorn Jensen,ou=Information Technology Division,ou=People,dc=example,dc=com" =sc continue
Pierangelo Masarati's avatar
Pierangelo Masarati committed
123
		by dn.regex="^cn=Bjorn Jensen,ou=Information Technology Division,ou=People,dc=example,dc=com$" +rw stop
Kurt Zeilenga's avatar
Kurt Zeilenga committed
124
		by * break
125

Pierangelo Masarati's avatar
Pierangelo Masarati committed
126
127
access		to dn.children="ou=Information Technology Division,ou=People,dc=example,dc=com"
		by group/groupOfUniqueNames/uniqueMember.exact="cn=ITD Staff,ou=Groups,dc=example,dc=com" write
Howard Chu's avatar
Howard Chu committed
128
129
		by * read

130
131
132
133
134
135
access		to dn.exact="cn=Alumni Assoc Staff,ou=Groups,dc=example,dc=com"
		by set="[cn=Alumni Assoc Staff,ou=Groups,dc=example,dc=com]/member* & user" write
		by * read

#access		to filter="(name=X*Y*Z)" dn.subtree="dc=example,dc=com"
access		to filter="(name=X*Y*Z)"
136
137
		by * continue

138
access		to dn.subtree="ou=Add & Delete,dc=example,dc=com"
139
140
141
142
143
		by dn.exact="cn=Bjorn Jensen,ou=Information Technology Division,ou=People,dc=example,dc=com" add
		by dn.exact="cn=Barbara Jensen,ou=Information Technology Division,ou=People,dc=example,dc=com" delete
		by dn.exact="cn=James A Jones 1,ou=Alumni Association,ou=People,dc=example,dc=com" write
		by * read

Kurt Zeilenga's avatar
Kurt Zeilenga committed
144
# fall into global ACLs
145

146
#monitor#database	monitor