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