]> git.sur5r.net Git - openldap/blob - doc/man/man5/slapo-retcode.5
Fix typos
[openldap] / doc / man / man5 / slapo-retcode.5
1 .TH SLAPO-RETCODE5 "RELEASEDATE" "OpenLDAP LDVERSION"
2 .\" Copyright 1998-2004 The OpenLDAP Foundation, All Rights Reserved.
3 .\" Copying restrictions apply.  See the COPYRIGHT file.
4 .\" Copyright 2001, Pierangelo Masarati, All rights reserved. <ando@sys-net.it>
5 .\" $OpenLDAP$
6 .SH NAME
7 slapo-retcode \- return code overlay
8 .SH SYNOPSIS
9 ETCDIR/slapd.conf
10 .SH DESCRIPTION
11 The
12 .B retcode
13 overlay to
14 .BR slapd (8)
15 is useful to test the behavior of clients when server-generated erroneous
16 and/or unusual responses occur, e.g. error codes, referrals, 
17 excessive response times and so on.
18
19 The error responses are generated according to different strategies.
20 .LP
21 In the first case, all operations targeted at a specific configurable
22 subtree cause the object related to the request DN to be looked up
23 and checked for return code data: a response code, plus an optional
24 textual message, an optional configurable delay, and, when the response code
25 is referral, a (list of) referral(s).
26 .LP
27 Well-known response codes from standard track documents are provided
28 in \fBretcode.conf\fP, which can be included after instantiating
29 the overlay.
30 .LP
31 In the second case, objects of classes inherited from 
32 the \fBerrAbsObject\fP, like \fBerrObject\fP or \fBerrAuxObject\fP,
33 when returned as intermediate responses of a search request, are changed
34 into the response dictated by their content.
35 .LP
36 A third mode causes objects to be looked up from the underlying database 
37 to discover if their class inherits from \fBerrABsObject\fP;
38 in that case, their content is used to compute the corresponding response.
39 .LP
40 The behavior is disabled by using the \fBmanageDSAit\fP control (RFC 3296);
41 in that case, the resulting object, either present in the directory 
42 or dynamically generated by the overlay, or contained in the request,
43 is handled as usual.
44 .LP 
45 The config directives that are specific to the
46 .B retcode
47 overlay must be prefixed by
48 .BR retcode\- ,
49 to avoid conflicts with directives specific to the underlying database
50 or to other stacked overlays.  The following specific directives 
51 can be used to configure the retcode overlay: 
52 .TP
53 .B retcode\-parent <DN>
54 This directive defines the parent DN where dynamically generated
55 entries reside.
56 If not defined, the suffix of the database is used.
57 .HP
58 .hy 0
59 .B retcode\-item <RDN> <errCode> [op=<oplist>] [text=<message>]
60 .B [ref=<referral>] [sleeptime=<sec>]
61 .RS
62 A dynamically generated entry, located below \fBretcode\-parent\fP.
63 The \fB<errCode>\fP is the number of the response code;
64 it can be in any format supported by strtol.
65 The optional \fB<oplist>\fP is a list of operations that cause
66 response code generation; if absent, all operations are affected.
67 The \fBref\fP field is only allowed for the \fBreferral\fP 
68 response code.
69 .RE
70 .TP
71 .B retcode\-indir
72 Enables exploitation of in-directory stored errAbsObject.
73 May result in a lot of unnecessary overhead.
74
75 .SH SCHEMA
76 The following schema items are created and used by the overlay:
77 .LP
78 The error code:
79 .RS 4
80 (  1.3.6.1.4.1.4203.666.11.4.1.1
81     NAME ( 'errCode' )
82     DESC 'LDAP error code'
83     EQUALITY integerMatch
84     ORDERING integerOrderingMatch
85     SYNTAX 1.3.6.1.4.1.1466.115.121.1.27
86     SINGLE-VALUE )
87 .RE
88 .LP
89 The operations that trigger the response code:
90 .RS 4
91 ( 1.3.6.1.4.1.4203.666.11.4.1.2
92     NAME ( 'errOp' )
93     DESC 'Operations the errObject applies to'
94     EQUALITY caseIgnoreMatch
95     SUBSTR caseIgnoreSubstringsMatch
96     SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )
97 .RE
98 .LP
99 The text message:
100 .RS 4
101 ( 1.3.6.1.4.1.4203.666.11.4.1.3
102     NAME ( 'errText' )
103     DESC 'LDAP error textual description'
104     EQUALITY caseIgnoreMatch
105     SUBSTR caseIgnoreSubstringsMatch
106     SYNTAX 1.3.6.1.4.1.1466.115.121.1.15
107     SINGLE-VALUE )
108 .RE
109 .LP
110 The sleep time before the response is actually returned to the client:
111 .RS 4
112 ( 1.3.6.1.4.1.4203.666.11.4.1.4
113     NAME ( 'errSleepTime' )
114     DESC 'Time to wait before returning the error'
115     EQUALITY integerMatch
116     SYNTAX 1.3.6.1.4.1.1466.115.121.1.27
117     SINGLE-VALUE )
118 .RE
119 .LP
120 The abstract class that triggers the overlay:
121 .RS 4
122 ( 1.3.6.1.4.1.4203.666.11.4.3.0
123     NAME ( 'errAbsObject' )
124     SUP top ABSTRACT
125     MUST ( errCode )
126     MAY ( cn $ description $ errOp $ errText $ errSleepTime ) )
127 .RE
128 .LP
129 The standalone structural objectclass for specifically created data:
130 .RS 4
131 ( 1.3.6.1.4.1.4203.666.11.4.3.1
132     NAME ( 'errObject' )
133     SUP errAbsObject STRUCTURAL )
134 .RE
135 .LP
136 The auxiliary objectclass to alter the behavior of existing objects:
137 .RS 4
138 ( 1.3.6.1.4.1.4203.666.11.4.3.2
139     NAME ( 'errAuxObject' )
140     SUP errAbsObject AUXILIARY )
141 .RE
142
143 .SH EXAMPLE
144 .LP
145 .RS
146 .nf
147 overlay         retcode
148 retcode-parent  "ou=RetCodes,dc=example,dc=com"
149 include         ./retcode.conf
150
151 # Wait 10 seconds, then return success (0x00)
152 retcode-item    "cn=Success after 10 seconds" 0x00 sleeptime=10
153 # Wait 10 seconds, then return timelimitExceeded (0x03)
154 retcode-item    "cn=Timelimit after 10 seconds" 0x03 sleeptime=10
155 .fi
156 .RE
157 .LP
158 .LP
159
160 .SH FILES
161 .TP
162 ETCDIR/slapd.conf
163 default slapd configuration file
164 .SH SEE ALSO
165 .BR slapd.conf (5),
166 .BR slapd (8),
167 .SH ACKNOWLEDGEMENTS
168 .P
169 This module was written in 2005 by Pierangelo Masarati for SysNet s.n.c.