1 .TH SLAPO-ACCESSLOG 5 "RELEASEDATE" "OpenLDAP LDVERSION"
2 .\" Copyright 2005-2006 The OpenLDAP Foundation All Rights Reserved.
3 .\" Copying restrictions apply. See COPYRIGHT/LICENSE.
6 slapo-accesslog \- Access Logging overlay
10 The Access Logging overlay can be used to record all accesses to a given
11 backend database on another database. This allows all of the activity on
12 a given database to be reviewed using arbitrary LDAP queries, instead of
13 just logging to local flat text files. Configuration options are available
14 for selecting a subset of operation types to log, and to automatically
15 prune older log records from the logging database. Log records are stored
16 with audit schema (see below) to assure their readability whether viewed
17 as LDIF or in raw form.
21 options apply to the Access Logging overlay.
22 They should appear after the
27 Specify the suffix of a database to be used for storing the log records.
28 The specified database must have already been configured in a prior section
29 of the config file. The suffix entry of the log database will be created
30 automatically by this overlay. The log entries will be generated as the
31 immediate children of the suffix entry.
33 .B logops <operations>
34 Specify which types of operations to log. The valid operation types are
35 abandon, add, bind, compare, delete, extended, modify, modrdn, search,
36 and unbind. Aliases for common sets of operations are also available:
40 add, delete, modify, modrdn
53 Specify a filter for matching against Deleted and Modified entries. If
54 the entry matches the filter, the old contents of the entry will be
55 logged along with the current request.
57 .B logoldattr <attr> ...
58 Specify a list of attributes whose old contents are always logged in
59 a Modify request. Usually only the contents of attributes that were
60 actually modified will be logged.
62 .B logpurge <age> <interval>
63 Specify the maximum age for log entries to be retained in the database,
64 and how often to scan the database for old entries. Both the
68 are specified as a time span in days, hours, minutes, and seconds. The
69 time format is [ddd+]hh:mm[:ss] i.e., the days and seconds components are
70 optional but hours and minutes are required. Except for days, which can
71 be up to 5 digits, each numeric field must be exactly two digits. For example
76 logpurge 2+00:00 1+00:00
79 would specify that the log database should be scanned every day for old
80 entries, and entries older than two days should be deleted. When using a
81 log database that supports ordered indexing on generalizedTime attributes,
82 specifying an eq index on the
84 attribute will greatly benefit the performance of the purge operation.
87 .B logsuccess TRUE | FALSE
88 If set to TRUE then log records will only be generated for successful
89 requests, i.e., requests that produce a result code of 0 (LDAP_SUCCESS).
90 If FALSE, log records are generated for all requests whether they
91 succeed or not. The default is FALSE.
102 suffix dc=example,dc=com
107 logold (objectclass=person)
113 overlay utilizes the "audit" schema described herein.
114 This schema is specifically designed for
116 auditing and is not intended to be used otherwise. It is also
117 noted that the schema describe here is
120 and hence subject to change without notice.
121 The schema is loaded automatically by the overlay.
123 The schema includes a number of object classes and associated
124 attribute types as described below.
129 class from which two additional classes,
133 are derived. Object classes for each type of LDAP operation are further
134 derived from these classes. This object class hierarchy is designed to
135 allow flexible yet efficient searches of the log based on either a specific
136 operation type's class, or on more general classifications. The definition
142 ( 1.3.6.1.4.1.4203.666.11.5.2.1
144 DESC 'OpenLDAP request auditing'
146 MUST ( reqStart $ reqType $ reqSession )
147 MAY ( reqDN $ reqAuthzID $ reqControls $ reqRespControls $
148 reqEnd $ reqResult $ reqMessage $ reqReferral ) )
151 Note that all of the OIDs used in the logging schema currently reside
152 under the OpenLDAP Experimental branch. It is anticipated that they
153 will migrate to a Standard branch in the future.
155 An overview of the attributes follows:
159 provide the start and end time of the operation, respectively. They use
160 generalizedTime syntax. The
162 attribute is also used as the RDN for each log entry.
166 attribute is a simple string containing the type of operation
171 etc. For extended operations, the type also includes the OID of the
172 extended operation, e.g.
177 attribute is an implementation-specific identifier that is common to
178 all the operations associated with the same LDAP session. Currently this
179 is slapd's internal connection ID, stored in decimal.
183 attribute is the distinguishedName of the target of the operation. E.g., for
184 a Bind request, this is the Bind DN. For an Add request, this is the DN
185 of the entry being added. For a Search request, this is the base DN of
190 attribute is the distinguishedName of the user that performed the operation.
191 This will usually be the same name as was established at the start of a
192 session by a Bind request (if any) but may be altered in various
199 attributes carry any controls sent by the client on the request and returned
200 by the server in the response, respectively. The attribute values are just
201 uninterpreted octet strings.
205 attribute is the numeric LDAP result code of the operation, indicating
206 either success or a particular LDAP error code. An error code may be
207 accompanied by a text error message which will be recorded in the
213 attribute carries any referrals that were returned with the result of the
216 Operation-specific classes are defined with additional attributes to carry
217 all of the relevant parameters associated with the operation:
221 ( 1.3.6.1.4.1.4203.666.11.5.2.4
223 DESC 'Abandon operation'
224 SUP auditObject STRUCTURAL
232 attribute contains the message ID of the request that was abandoned.
236 ( 1.3.6.1.4.1.4203.666.11.5.2.5
239 SUP auditWriteObject STRUCTURAL
245 class inherits from the
247 class. The Add and Modify classes are very similar. The
249 attribute carries all of the attributes of the original entry being added.
250 (Or in the case of a Modify operation, all of the modifications being
251 performed.) The values are formatted as
255 attribute:<+|-|=|#> [ value]
259 Where '+' indicates an Add of a value, '-' for Delete, '=' for Replace,
260 and '#' for Increment. In an Add operation, all of the reqMod values will
261 have the '+' designator.
265 ( 1.3.6.1.4.1.4203.666.11.5.2.6
267 DESC 'Bind operation'
268 SUP auditObject STRUCTURAL
269 MUST ( reqVersion $ reqMethod ) )
276 attribute which contains the LDAP protocol version specified in the Bind
279 attribute which contains the Bind Method used in the Bind. This will be
282 for LDAP Simple Binds or
285 Note that unless configured as a global overlay, only Simple Binds using
286 DNs that reside in the current database will be logged.
290 ( 1.3.6.1.4.1.4203.666.11.5.2.7
292 DESC 'Compare operation'
293 SUP auditObject STRUCTURAL
301 attribute carries the Attribute Value Assertion used in the compare request.
305 ( 1.3.6.1.4.1.4203.666.11.5.2.8
307 DESC 'Delete operation'
308 SUP auditWriteObject STRUCTURAL
314 operation needs no further parameters. However, the
316 attribute may optionally be used to record the contents of the entry prior
317 to its deletion. The values are formatted as
326 attribute is only populated if the entry being deleted matches the
333 ( 1.3.6.1.4.1.4203.666.11.5.2.9
335 DESC 'Modify operation'
336 SUP auditWriteObject STRUCTURAL
337 MAY reqOld MUST reqMod )
342 operation contains a description of modifications in the
344 attribute, which was already described above in the Add operation. It may
345 optionally contain the previous contents of any modified attributes in the
347 attribute, using the same format as described above for the Delete operation.
350 attribute is only populated if the entry being modified matches the
357 ( 1.3.6.1.4.1.4203.666.11.5.2.10
359 DESC 'ModRDN operation'
360 SUP auditWriteObject STRUCTURAL
361 MUST ( reqNewRDN $ reqDeleteOldRDN )
369 attribute to carry the new RDN of the request.
372 attribute is a Boolean value showing
374 if the old RDN was deleted from the entry, or
376 if the old RDN was preserved.
379 attribute carries the DN of the new parent entry if the request specified
384 ( 1.3.6.1.4.1.4203.666.11.5.2.11
386 DESC 'Search operation'
387 SUP auditReadObject STRUCTURAL
388 MUST ( reqScope $ reqDerefAliases $ reqAttrsOnly )
389 MAY ( reqFilter $ reqAttr $ reqEntries $ reqSizeLimit $
397 attribute contains the scope of the original search request, using the
398 values specified for the LDAP URL format. I.e.
412 denoting how aliases will be processed during the search.
415 attribute is a Boolean value showing
417 if only attribute names were requested, or
419 if attributes and their values were requested.
422 attribute carries the filter used in the search request.
425 attribute lists the requested attributes if specific attributes were
429 attribute is the integer count of how many entries were returned by
435 attributes indicate what limits were requested on the search operation.
439 ( 1.3.6.1.4.1.4203.666.11.5.2.12
441 DESC 'Extended operation'
442 SUP auditObject STRUCTURAL
448 class represents an LDAP Extended Operation. As noted above, the actual OID of
449 the operation is included in the
451 attribute of the parent class. If any optional data was provided with the
452 request, it will be contained in the
454 attribute as an uninterpreted octet string.
457 The Access Log implemented by this overlay may be used for a variety of
458 other tasks, e.g. as a ChangeLog for a replication mechanism, as well
459 as for security/audit logging purposes.
464 default slapd configuration file
470 This module was written in 2005 by Howard Chu of Symas Corporation.