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