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