1 .TH SLAPO-ACCESSLOG 5 "RELEASEDATE" "OpenLDAP LDVERSION"
2 .\" Copyright 2005-2007 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, and it must have a rootDN configured. The access controls
30 on the log database should prevent general write access. The suffix entry
31 of the log database will be created automatically by this overlay. The log
32 entries will be generated as the immediate children of the suffix entry.
34 .B logops <operations>
35 Specify which types of operations to log. The valid operation types are
36 abandon, add, bind, compare, delete, extended, modify, modrdn, search,
37 and unbind. Aliases for common sets of operations are also available:
41 add, delete, modify, modrdn
54 Specify a filter for matching against Deleted and Modified entries. If
55 the entry matches the filter, the old contents of the entry will be
56 logged along with the current request.
58 .B logpurge <age> <interval>
59 Specify the maximum age for log entries to be retained in the database,
60 and how often to scan the database for old entries. Both the
64 are specified as a time span in days, hours, minutes, and seconds. The
65 time format is [ddd+]hh:mm[:ss] i.e., the days and seconds components are
66 optional but hours and minutes are required. Except for days, which can
67 be up to 5 digits, each numeric field must be exactly two digits. For example
72 logpurge 2+00:00 1+00:00
75 would specify that the log database should be scanned every day for old
76 entries, and entries older than two days should be deleted. When using a
77 log database that supports ordered indexing on generalizedTime attributes,
78 specifying an eq index on the
80 attribute will greatly benefit the performance of the purge operation.
83 .B logsuccess TRUE | FALSE
84 If set to TRUE then log records will only be generated for successful
85 requests, i.e., requests that produce a result code of 0 (LDAP_SUCCESS).
86 If FALSE, log records are generated for all requests whether they
87 succeed or not. The default is FALSE.
98 suffix dc=example,dc=com
103 logold (objectclass=person)
109 overlay utilizes the "audit" schema described herein.
110 This schema is specifically designed for
112 auditing and is not intended to be used otherwise. It is also
113 noted that the schema describe here is
116 and hence subject to change without notice.
117 The schema is loaded automatically by the overlay.
119 The schema includes a number of object classes and associated
120 attribute types as described below.
125 class from which two additional classes,
129 are derived. Object classes for each type of LDAP operation are further
130 derived from these classes. This object class hierarchy is designed to
131 allow flexible yet efficient searches of the log based on either a specific
132 operation type's class, or on more general classifications. The definition
138 ( 1.3.6.1.4.1.4203.666.11.5.2.1
140 DESC 'OpenLDAP request auditing'
142 MUST ( reqStart $ reqType $ reqSession )
143 MAY ( reqDN $ reqAuthzID $ reqControls $ reqRespControls $
144 reqEnd $ reqResult $ reqMessage $ reqReferral ) )
147 Note that all of the OIDs used in the logging schema currently reside
148 under the OpenLDAP Experimental branch. It is anticipated that they
149 will migrate to a Standard branch in the future.
151 An overview of the attributes follows:
155 provide the start and end time of the operation, respectively. They use
156 generalizedTime syntax. The
158 attribute is also used as the RDN for each log entry.
162 attribute is a simple string containing the type of operation
167 etc. For extended operations, the type also includes the OID of the
168 extended operation, e.g.
173 attribute is an implementation-specific identifier that is common to
174 all the operations associated with the same LDAP session. Currently this
175 is slapd's internal connection ID, stored in decimal.
179 attribute is the distinguishedName of the target of the operation. E.g., for
180 a Bind request, this is the Bind DN. For an Add request, this is the DN
181 of the entry being added. For a Search request, this is the base DN of
186 attribute is the distinguishedName of the user that performed the operation.
187 This will usually be the same name as was established at the start of a
188 session by a Bind request (if any) but may be altered in various
195 attributes carry any controls sent by the client on the request and returned
196 by the server in the response, respectively. The attribute values are just
197 uninterpreted octet strings.
201 attribute is the numeric LDAP result code of the operation, indicating
202 either success or a particular LDAP error code. An error code may be
203 accompanied by a text error message which will be recorded in the
209 attribute carries any referrals that were returned with the result of the
212 Operation-specific classes are defined with additional attributes to carry
213 all of the relevant parameters associated with the operation:
217 ( 1.3.6.1.4.1.4203.666.11.5.2.4
219 DESC 'Abandon operation'
220 SUP auditObject STRUCTURAL
228 attribute contains the message ID of the request that was abandoned.
232 ( 1.3.6.1.4.1.4203.666.11.5.2.5
235 SUP auditWriteObject STRUCTURAL
241 class inherits from the
243 class. The Add and Modify classes are very similar. The
245 attribute carries all of the attributes of the original entry being added.
246 (Or in the case of a Modify operation, all of the modifications being
247 performed.) The values are formatted as
251 attribute:<+|-|=|#> [ value]
255 Where '+' indicates an Add of a value, '-' for Delete, '=' for Replace,
256 and '#' for Increment. In an Add operation, all of the reqMod values will
257 have the '+' designator.
261 ( 1.3.6.1.4.1.4203.666.11.5.2.6
263 DESC 'Bind operation'
264 SUP auditObject STRUCTURAL
265 MUST ( reqVersion $ reqMethod ) )
272 attribute which contains the LDAP protocol version specified in the Bind
275 attribute which contains the Bind Method used in the Bind. This will be
278 for LDAP Simple Binds or
281 Note that unless configured as a global overlay, only Simple Binds using
282 DNs that reside in the current database will be logged.
286 ( 1.3.6.1.4.1.4203.666.11.5.2.7
288 DESC 'Compare operation'
289 SUP auditObject STRUCTURAL
297 attribute carries the Attribute Value Assertion used in the compare request.
301 ( 1.3.6.1.4.1.4203.666.11.5.2.8
303 DESC 'Delete operation'
304 SUP auditWriteObject STRUCTURAL
310 operation needs no further parameters. However, the
312 attribute may optionally be used to record the contents of the entry prior
313 to its deletion. The values are formatted as
322 attribute is only populated if the entry being deleted matches the
329 ( 1.3.6.1.4.1.4203.666.11.5.2.9
331 DESC 'Modify operation'
332 SUP auditWriteObject STRUCTURAL
333 MAY reqOld MUST reqMod )
338 operation contains a description of modifications in the
340 attribute, which was already described above in the Add operation. It may
341 optionally contain the previous contents of any modified attributes in the
343 attribute, using the same format as described above for the Delete operation.
346 attribute is only populated if the entry being modified matches the
353 ( 1.3.6.1.4.1.4203.666.11.5.2.10
355 DESC 'ModRDN operation'
356 SUP auditWriteObject STRUCTURAL
357 MUST ( reqNewRDN $ reqDeleteOldRDN )
365 attribute to carry the new RDN of the request.
368 attribute is a Boolean value showing
370 if the old RDN was deleted from the entry, or
372 if the old RDN was preserved.
375 attribute carries the DN of the new parent entry if the request specified
380 ( 1.3.6.1.4.1.4203.666.11.5.2.11
382 DESC 'Search operation'
383 SUP auditReadObject STRUCTURAL
384 MUST ( reqScope $ reqDerefAliases $ reqAttrsOnly )
385 MAY ( reqFilter $ reqAttr $ reqEntries $ reqSizeLimit $
393 attribute contains the scope of the original search request, using the
394 values specified for the LDAP URL format. I.e.
408 denoting how aliases will be processed during the search.
411 attribute is a Boolean value showing
413 if only attribute names were requested, or
415 if attributes and their values were requested.
418 attribute carries the filter used in the search request.
421 attribute lists the requested attributes if specific attributes were
425 attribute is the integer count of how many entries were returned by
431 attributes indicate what limits were requested on the search operation.
435 ( 1.3.6.1.4.1.4203.666.11.5.2.12
437 DESC 'Extended operation'
438 SUP auditObject STRUCTURAL
444 class represents an LDAP Extended Operation. As noted above, the actual OID of
445 the operation is included in the
447 attribute of the parent class. If any optional data was provided with the
448 request, it will be contained in the
450 attribute as an uninterpreted octet string.
453 The Access Log implemented by this overlay may be used for a variety of
454 other tasks, e.g. as a ChangeLog for a replication mechanism, as well
455 as for security/audit logging purposes.
460 default slapd configuration file
466 This module was written in 2005 by Howard Chu of Symas Corporation.