]> git.sur5r.net Git - openldap/blob - doc/man/man8/slapacl.8
18b968671a704c3aae0af32d2f16f106487c3a2e
[openldap] / doc / man / man8 / slapacl.8
1 .TH SLAPACL 8C "RELEASEDATE" "OpenLDAP LDVERSION"
2 .\" Copyright 2004-2017 The OpenLDAP Foundation All Rights Reserved.
3 .\" Copying restrictions apply.  See COPYRIGHT/LICENSE.
4 .\" $OpenLDAP$
5 .SH NAME
6 slapacl \- Check access to a list of attributes.
7 .SH SYNOPSIS
8 .B SBINDIR/slapacl
9 .BI \-b \ DN
10 [\c
11 .BI \-d \ debug-level\fR]
12 [\c
13 .BI \-D \ authcDN\ \fR|
14 .BI \-U \ authcID\fR]
15 [\c
16 .BI \-f \ slapd.conf\fR]
17 [\c
18 .BI \-F \ confdir\fR]
19 [\c
20 .BI \-o \ option\fR[ = value\fR]]
21 [\c
22 .BR \-u ]
23 [\c
24 .BR \-v ]
25 [\c
26 .BI \-X \ authzID\ \fR|
27 .BI "\-o \ authzDN=" DN\fR]
28 [\c
29 .IR attr [\fB/\fI access ][\fB:\fI value ]]\fR\ [...]
30 .LP
31 .SH DESCRIPTION
32 .LP
33 .B slapacl
34 is used to check the behavior of 
35 .BR slapd (8) 
36 by verifying access to directory data according to the access control list
37 directives defined in its configuration.
38 .
39 It opens the
40 .BR slapd.conf (5)
41 configuration file or the 
42 .BR slapd\-config (5) 
43 backend, reads in the  
44 .BR access / olcAccess
45 directives, and then parses the 
46 .B attr
47 list given on the command-line; if none is given, access to the
48 .B entry
49 pseudo-attribute is tested.
50 .LP
51 .SH OPTIONS
52 .TP
53 .BI \-b \ DN
54 specify the 
55 .I DN 
56 which access is requested to; the corresponding entry is fetched 
57 from the database, and thus it must exist.
58 The
59 .I DN
60 is also used to determine what rules apply; thus, it must be
61 in the naming context of a configured database.  See also
62 .BR \-u .
63 .TP
64 .BI \-d \ debug-level
65 enable debugging messages as defined by the specified
66 .IR debug-level ;
67 see
68 .BR slapd (8)
69 for details.
70 .TP
71 .BI \-D \ authcDN
72 specify a DN to be used as identity through the test session
73 when selecting appropriate
74 .B <by> 
75 clauses in access lists.
76 .TP
77 .BI \-f \ slapd.conf
78 specify an alternative
79 .BR slapd.conf (5)
80 file.
81 .TP
82 .BI \-F \ confdir
83 specify a config directory.
84 If both
85 .B \-f
86 and
87 .B \-F
88 are specified, the config file will be read and converted to
89 config directory format and written to the specified directory.
90 If neither option is specified, an attempt to read the
91 default config directory will be made before trying to use the default
92 config file. If a valid config directory exists then the
93 default config file is ignored.
94 .TP
95 .BI \-o \ option\fR[ = value\fR]
96 Specify an
97 .I option
98 with a(n optional)
99 .IR value .
100 Possible generic options/values are:
101 .LP
102 .nf
103               syslog=<subsystems>  (see `\-s' in slapd(8))
104               syslog\-level=<level> (see `\-S' in slapd(8))
105               syslog\-user=<user>   (see `\-l' in slapd(8))
106
107 .fi
108 .RS
109 Possible options/values specific to
110 .B slapacl
111 are:
112 .RE
113 .nf
114
115               authzDN
116               domain
117               peername
118               sasl_ssf
119               sockname
120               sockurl
121               ssf
122               tls_ssf
123               transport_ssf
124
125 .fi
126 .RS
127 See the related fields in
128 .BR slapd.access (5)
129 for details.
130 .RE
131 .TP
132 .BI \-u
133 do not fetch the entry from the database.
134 In this case, if the entry does not exist, a fake entry with the
135 .I DN
136 given with the
137 .B \-b
138 option is used, with no attributes.
139 As a consequence, those rules that depend on the contents 
140 of the target object will not behave as with the real object.
141 The
142 .I DN
143 given with the
144 .B \-b
145 option is still used to select what rules apply; thus, it must be
146 in the naming context of a configured database.
147 See also
148 .BR \-b .
149 .TP
150 .BI \-U \ authcID
151 specify an ID to be mapped to a 
152 .B DN 
153 as by means of 
154 .B authz\-regexp
155 or
156 .B authz\-rewrite
157 rules (see 
158 .BR slapd.conf (5)
159 for details); mutually exclusive with
160 .BR \-D .
161 .TP
162 .B \-v
163 enable verbose mode.
164 .TP
165 .BI \-X \ authzID
166 specify an authorization ID to be mapped to a
167 .B DN
168 as by means of
169 .B authz\-regexp
170 or
171 .B authz\-rewrite
172 rules (see
173 .BR slapd.conf (5)
174 for details); mutually exclusive with \fB\-o\fP \fBauthzDN=\fIDN\fR.
175 .SH EXAMPLES
176 The command
177 .LP
178 .nf
179 .ft tt
180         SBINDIR/slapacl \-f ETCDIR/slapd.conf \-v \\
181             \-U bjorn \-b "o=University of Michigan,c=US" \\
182             "o/read:University of Michigan"
183
184 .ft
185 .fi
186 tests whether the user
187 .I bjorn
188 can access the attribute 
189 .I o
190 of the entry
191 .I o=University of Michigan,c=US
192 at
193 .I read
194 level.
195 .SH "SEE ALSO"
196 .BR ldap (3),
197 .BR slapd (8),
198 .BR slaptest (8),
199 .BR slapauth (8)
200 .LP
201 "OpenLDAP Administrator's Guide" (http://www.OpenLDAP.org/doc/admin/)
202 .SH ACKNOWLEDGEMENTS
203 .so ../Project