SLAPO-RETCODE(5) | File Formats Manual | SLAPO-RETCODE(5) |
slapo-retcode - return code overlay to slapd
/etc/ldap/slapd.conf
The retcode overlay to slapd(8) is useful to test the behavior of clients when server-generated erroneous and/or unusual responses occur, e.g. error codes, referrals, excessive response times and so on.
The error responses are generated according to different strategies.
In the first case, all operations targeted at a specific configurable subtree cause the object related to the request DN to be looked up and checked for return code data: a response code, plus an optional textual message, an optional configurable delay, an optional matched DN field, and, when the response code is "referral", a (list of) referral(s).
Well-known response codes from standard track documents are provided in retcode.conf, which can be included after instantiating the overlay.
In the second case, objects of classes inherited from the errAbsObject, like errObject or errAuxObject, when returned as intermediate responses of a search request, are changed into the response dictated by their content.
A third mode causes objects to be looked up from the underlying database to discover if their class inherits from errABsObject; in that case, their content is used to compute the corresponding response.
The behavior is disabled by using the manageDSAit control (RFC 3296); in that case, the resulting object, either present in the directory or dynamically generated by the overlay, or contained in the request, is handled as usual.
The config directives that are specific to the retcode overlay must be prefixed by retcode-, to avoid conflicts with directives specific to the underlying database or to other stacked overlays. The following specific directives can be used to configure the retcode overlay:
retcode-item <RDN> <errCode> [op=<oplist>] [text=<message>] [ref=<referral>] [sleeptime=<sec>] [matched=<DN>] [unsolicited=<OID>[:<data>]] [flags=[pre|post-]disconnect[,...]]
The retcode overlay utilizes the "return code" schema described herein. This schema is specifically designed for use with this overlay and is not intended to be used otherwise. It is also noted that the schema described here is a work in progress, and hence subject to change without notice. The schema is loaded automatically by the overlay.
The schema includes a number of object classes and associated attribute types as described below.
The error code:
The operations that trigger the response code:
The text message:
The sleep time before the response is actually returned to the client:
The matched DN returned to the client:
The OID to be returned as extended response OID in RFC 4511 unsolicited responses ("0" generates a regular response with msgid set to 0):
The octet string to be returned as extended response data in RFC 4511 unsolicited response:
If TRUE, slapd(8) disconnects abruptly without notice; if FALSE, it disconnects after sending response as appropriate:
The abstract class that triggers the overlay:
The standalone structural objectclass for specifically created data:
The auxiliary objectclass to alter the behavior of existing objects:
overlay retcode retcode-parent "ou=RetCodes,dc=example,dc=com" # retcode.conf is found in tests/data/ of the source tree include ./retcode.conf # Wait 10 seconds, then return success (0x00) retcode-item "cn=Success after 10 seconds" 0x00 sleeptime=10 # Wait 10 seconds, then return timelimitExceeded (0x03) retcode-item "cn=Timelimit after 10 seconds" 0x03 sleeptime=10
slapd.conf(5), slapd-config(5), slapd(8). The slapo-retcode(5) overlay supports dynamic configuration via back-config.
This module was written in 2005 by Pierangelo Masarati for SysNet s.n.c.
2021/01/18 | OpenLDAP 2.4.57+dfsg-3+deb11u1 |