1 .TH SLAPO-ACCESSLOG 5 "RELEASEDATE" "OpenLDAP LDVERSION"
2 .\" Copyright 2005 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 a custom schema to assure their readability whether viewed as LDIF
21 options apply to the Access Logging overlay.
22 They should appear after the
24 directive and before any subsequent
29 Specify the suffix of a database to be used for storing the log records.
30 The specified database must have already been configured in a prior section
31 of the config file. The suffix entry of the database must also already
32 exist. The log entries will be generated as the immediate children of the
35 .B logops <operations>
36 Specify which types of operations to log. The valid operation types are
37 abandon, add, bind, compare, delete, extended, modify, modrdn, search,
38 and unbind. Aliases for common sets of operations are also available:
42 add, delete, modify, modrdn
54 .B logpurge <age> <interval>
55 Specify the maximum age for log entries to be retained in the database,
56 and how often to scan the database for old entries. Both the
60 are specified as a time span in days, hours, minutes, and seconds. The
61 time format is [ddd+]hh:mm[:ss] i.e., the days and seconds components are
62 optional but hours and minutes are required. Except for days, which can
63 be up to 5 digits, each numeric field must be exactly two digits. For example
68 logpurge 2+00:00 1+00:00
71 would specify that the log database should be scanned every day for old
72 entries, and entries older than two days should be deleted. When using a
73 log database that supports ordered indexing on generalizedTime attributes,
74 specifying an eq index on the
76 attribute will greatly benefit the performance of the purge operation.
79 .B logsuccess TRUE | FALSE
80 If set to TRUE then log records will only be generated for successful
81 requests, i.e., requests that produce a result code of 0 (LDAP_SUCCESS).
82 If FALSE, log records are generated for all requests whether they
83 succeed or not. The default is FALSE.
94 suffix dc=example,dc=com
104 overlay defines a number of object classes for use in the logs. There is
107 class from which two additional classes,
111 are derived. Object classes for each type of LDAP operation are further
112 derived from these classes. This object class hierarchy is designed to
113 allow flexible yet efficient searches of the log based on either a specific
114 operation type's class, or on more general classifications. The definition
120 ( 1.3.6.1.4.1.4203.666.11.5.2.1
122 DESC 'OpenLDAP request auditing'
124 MUST ( reqStart $ reqType $ reqSession )
125 MAY ( reqDN $ reqAuthzID $ reqControls $ reqRespControls $
126 reqEnd $ reqResult $ reqMessage $ reqReferral ) )
129 Note that all of the OIDs used in the logging schema currently reside
130 under the OpenLDAP Experimental branch. It is anticipated that they
131 will migrate to a Standard branch in the future.
133 An overview of the attributes follows:
137 provide the start and end time of the operation, respectively. They use
138 generalizedTime syntax. The
140 attribute is also used as the RDN for each log entry.
144 attribute is a simple string containing the type of operation
149 etc. For extended operations, the type also includes the OID of the
150 extended operation, e.g.
151 .B extended(1.2.3.4.1)
155 attribute is an implementation-specific identifier that is common to
156 all the operations associated with the same LDAP session. Currently this
157 is slapd's internal connection ID, stored in decimal.
161 attribute is the distinguishedName of the target of the operation. E.g., for
162 a Bind request, this is the Bind DN. For an Add request, this is the DN
163 of the entry being added. For a Search request, this is the base DN of
168 attribute is the distinguishedName of the user that performed the operation.
169 This will usually be the same name as was established at the start of a
170 session by a Bind request (if any) but may be altered in various
177 attributes carry any controls sent by the client on the request and returned
178 by the server in the response, respectively. The attribute values are just
179 uninterpreted octet strings.
183 attribute is the numeric LDAP result code of the operation, indicating
184 either success or a particular LDAP error code. An error code may be
185 accompanied by a text error message which will be recorded in the
191 attribute carries any referrals that were returned with the result of the
194 Operation-specific classes are defined with additional attributes to carry
195 all of the relevant parameters associated with the operation:
199 ( 1.3.6.1.4.1.4203.666.11.5.2.4
201 DESC 'Abandon operation'
202 SUP auditObject STRUCTURAL
210 attribute contains the message ID of the request that was abandoned.
214 ( 1.3.6.1.4.1.4203.666.11.5.2.5
217 SUP auditWriteObject STRUCTURAL
223 class inherits from the
225 class. The Add and Modify classes are very similar. The
227 attribute carries all of the attributes of the original entry being added.
228 (Or in the case of a Modify operation, all of the modifications being
229 performed.) The values are formatted as
233 attribute:<+|-|=|#> [ value]
237 Where '+' indicates an Add of a value, '-' for Delete, '=' for Replace,
238 and '#' for Increment. In an Add operation, all of the reqMod values will
239 have the '+' designator.
243 ( 1.3.6.1.4.1.4203.666.11.5.2.6
245 DESC 'Bind operation'
246 SUP auditObject STRUCTURAL
247 MUST ( reqVersion $ reqMethod ) )
254 attribute which contains the LDAP protocol version specified in the Bind
257 attribute which contains the Bind Method used in the Bind. This will be
260 for LDAP Simple Binds or
263 Note that unless configured as a global overlay, only Simple Binds using
264 DNs that reside in the current database will be logged.
268 ( 1.3.6.1.4.1.4203.666.11.5.2.7
270 DESC 'Compare operation'
271 SUP auditObject STRUCTURAL
279 attribute carries the Attribute Value Assertion used in the compare request.
283 ( 1.3.6.1.4.1.4203.666.11.5.2.8
285 DESC 'Delete operation'
286 SUP auditWriteObject STRUCTURAL
292 operation needs no further parameters. However, the
294 attribute may optionally be used to record the contents of the entry prior
295 to its deletion. The values are formatted as
302 This option is not yet implemented.
306 ( 1.3.6.1.4.1.4203.666.11.5.2.9
308 DESC 'Modify operation'
309 SUP auditWriteObject STRUCTURAL
310 MAY reqOld MUST reqMod )
315 operation contains a description of modifications in the
317 attribute, which was already described above in the Add operation. It may
318 optionally contain the previous contents of any modified attributes in the
320 attribute, using the same format as described above for the Delete operation.
321 This option is not yet implemented.
325 ( 1.3.6.1.4.1.4203.666.11.5.2.10
327 DESC 'ModRDN operation'
328 SUP auditWriteObject STRUCTURAL
329 MUST ( reqNewRDN $ reqDeleteOldRDN )
337 attribute to carry the new RDN of the request.
340 attribute is a Boolean value showing
342 if the old RDN was deleted from the entry, or
344 if the old RDN was preserved.
347 attribute carries the DN of the new parent entry if the request specified
352 ( 1.3.6.1.4.1.4203.666.11.5.2.11
354 DESC 'Search operation'
355 SUP auditReadObject STRUCTURAL
356 MUST ( reqScope $ reqDerefAliases $ reqAttrsOnly )
357 MAY ( reqFilter $ reqAttr $ reqEntries $ reqSizeLimit $
365 attribute contains the scope of the original search request, using the
366 values specified for the LDAP URL format. I.e.
380 denoting how aliases will be processed during the search.
383 attribute is a Boolean value showing
385 if only attribute names were requested, or
387 if attributes and their values were requested.
390 attribute carries the filter used in the search request.
393 attribute lists the requested attributes if specific attributes were
397 attribute is the integer count of how many entries were returned by
403 attributes indicate what limits were requested on the search operation.
407 ( 1.3.6.1.4.1.4203.666.11.5.2.12
409 DESC 'Extended operation'
410 SUP auditObject STRUCTURAL
416 class represents an LDAP Extended Operation. As noted above, the actual OID of
417 the operation is included in the
419 attribute of the parent class. If any optional data was provided with the
420 request, it will be contained in the
422 attribute as an uninterpreted octet string.
425 The Access Log implemented by this overlay may be used for a variety of
426 other tasks, e.g. as a ChangeLog for a replication mechanism, as well
427 as for security/audit logging purposes.
432 default slapd configuration file
438 This module was written in 2005 by Howard Chu of Symas Corporation.