⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 slapo-accesslog.5

📁 ldap服务器源码
💻 5
字号:
.TH SLAPO-ACCESSLOG 5 "RELEASEDATE" "OpenLDAP LDVERSION".\" Copyright 2005-2007 The OpenLDAP Foundation All Rights Reserved..\" Copying restrictions apply.  See COPYRIGHT/LICENSE..\" $OpenLDAP: pkg/ldap/doc/man/man5/slapo-accesslog.5,v 1.1.2.9 2007/01/02 21:43:45 kurt Exp $.SH NAMEslapo-accesslog \- Access Logging overlay.SH SYNOPSISETCDIR/slapd.conf.SH DESCRIPTIONThe Access Logging overlay can be used to record all accesses to a givenbackend database on another database. This allows all of the activity ona given database to be reviewed using arbitrary LDAP queries, instead ofjust logging to local flat text files. Configuration options are availablefor selecting a subset of operation types to log, and to automaticallyprune older log records from the logging database.  Log records are storedwith audit schema (see below) to assure their readability whether viewedas LDIF or in raw form..SH CONFIGURATIONThese.B slapd.confoptions apply to the Access Logging overlay.They should appear after the.B overlaydirective..TP.B logdb <suffix>Specify the suffix of a database to be used for storing the log records.The specified database must have already been configured in a prior sectionof the config file, and it must have a rootDN configured. The access controlson the log database should prevent general write access. The suffix entryof the log database will be created automatically by this overlay. The logentries will be generated as the immediate children of the suffix entry..TP.B logops <operations>Specify which types of operations to log. The valid operation types areabandon, add, bind, compare, delete, extended, modify, modrdn, search,and unbind. Aliases for common sets of operations are also available:.RS.TP.B writesadd, delete, modify, modrdn.TP.B readscompare, search.TP.B sessionabandon, bind, unbind.TP.B allall operations.RE.TP.B logold <filter>Specify a filter for matching against Deleted and Modified entries. Ifthe entry matches the filter, the old contents of the entry will belogged along with the current request..TP.B logpurge <age> <interval>Specify the maximum age for log entries to be retained in the database,and how often to scan the database for old entries. Both the.B ageand.B intervalare specified as a time span in days, hours, minutes, and seconds. Thetime format is [ddd+]hh:mm[:ss] i.e., the days and seconds components areoptional but hours and minutes are required. Except for days, which canbe up to 5 digits, each numeric field must be exactly two digits. For example.RS.RS.PD 0.TPlogpurge 2+00:00 1+00:00.RE.PDwould specify that the log database should be scanned every day for oldentries, and entries older than two days should be deleted. When using alog database that supports ordered indexing on generalizedTime attributes,specifying an eq index on the.B reqStartattribute will greatly benefit the performance of the purge operation..RE.TP.B logsuccess TRUE | FALSEIf set to TRUE then log records will only be generated for successfulrequests, i.e., requests that produce a result code of 0 (LDAP_SUCCESS).If FALSE, log records are generated for all requests whether theysucceed or not. The default is FALSE..SH EXAMPLES.LP.nf	database bdb	suffix cn=log	\...	index reqStart eq	database bdb	suffix dc=example,dc=com	\...	overlay accesslog	logdb cn=log	logops writes reads	logold (objectclass=person).fi.SH SCHEMAThe.B accesslogoverlay utilizes the "audit" schema described herein.This schema is specifically designed for.B accesslogauditing and is not intended to be used otherwise.  It is alsonoted that the schema describe here is.I a work in.IR 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 associatedattribute types as described below.There isa basic.B auditObjectclass from which two additional classes,.B auditReadObjectand.B auditWriteObjectare derived. Object classes for each type of LDAP operation are furtherderived from these classes. This object class hierarchy is designed toallow flexible yet efficient searches of the log based on either a specificoperation type's class, or on more general classifications. The definitionof the.B auditObjectclass is as follows:.LP.RS 4(  1.3.6.1.4.1.4203.666.11.5.2.1    NAME 'auditObject'    DESC 'OpenLDAP request auditing'    SUP top STRUCTURAL    MUST ( reqStart $ reqType $ reqSession )    MAY ( reqDN $ reqAuthzID $ reqControls $ reqRespControls $        reqEnd $ reqResult $ reqMessage $ reqReferral ) ).RE.PNote that all of the OIDs used in the logging schema currently resideunder the OpenLDAP Experimental branch. It is anticipated that theywill migrate to a Standard branch in the future.An overview of the attributes follows:.B reqStartand.B reqEndprovide the start and end time of the operation, respectively. They usegeneralizedTime syntax. The.B reqStartattribute is also used as the RDN for each log entry.The.B reqTypeattribute is a simple string containing the type of operationbeing logged, e.g..BR add ,.BR delete ,.BR search ,etc. For extended operations, the type also includes the OID of theextended operation, e.g..B extended(1.1.1.1)The.B reqSessionattribute is an implementation-specific identifier that is common toall the operations associated with the same LDAP session. Currently thisis slapd's internal connection ID, stored in decimal.The.B reqDNattribute is the distinguishedName of the target of the operation. E.g., fora Bind request, this is the Bind DN. For an Add request, this is the DNof the entry being added. For a Search request, this is the base DN ofthe search.The.B reqAuthzIDattribute is the distinguishedName of the user that performed the operation.This will usually be the same name as was established at the start of asession by a Bind request (if any) but may be altered in variouscircumstances.The.B reqControlsand.B reqRespControlsattributes carry any controls sent by the client on the request and returnedby the server in the response, respectively. The attribute values are justuninterpreted octet strings.The.B reqResultattribute is the numeric LDAP result code of the operation, indicatingeither success or a particular LDAP error code. An error code may beaccompanied by a text error message which will be recorded in the.B reqMessageattribute.The.B reqReferralattribute carries any referrals that were returned with the result of therequest.Operation-specific classes are defined with additional attributes to carryall of the relevant parameters associated with the operation:.LP.RS 4(  1.3.6.1.4.1.4203.666.11.5.2.4    NAME 'auditAbandon'    DESC 'Abandon operation'    SUP auditObject STRUCTURAL    MUST reqId ).RE.PFor the.B Abandonoperation the.B reqIdattribute contains the message ID of the request that was abandoned..LP.RS 4(  1.3.6.1.4.1.4203.666.11.5.2.5    NAME 'auditAdd'    DESC 'Add operation'    SUP auditWriteObject STRUCTURAL    MUST reqMod ).RE.PThe.B Addclass inherits from the.B auditWriteObjectclass. The Add and Modify classes are very similar. The.B reqModattribute carries all of the attributes of the original entry being added.(Or in the case of a Modify operation, all of the modifications beingperformed.) The values are formatted as.RS.PD 0.TPattribute:<+|-|=|#> [ value].RE.RE.PDWhere '+' indicates an Add of a value, '-' for Delete, '=' for Replace,and '#' for Increment. In an Add operation, all of the reqMod values willhave the '+' designator..P.LP.RS 4(  1.3.6.1.4.1.4203.666.11.5.2.6    NAME 'auditBind'    DESC 'Bind operation'    SUP auditObject STRUCTURAL    MUST ( reqVersion $ reqMethod ) ).RE.PThe.B Bindclass includes the.B reqVersionattribute which contains the LDAP protocol version specified in the Bindas well as the.B reqMethodattribute which contains the Bind Method used in the Bind. This will bethe string.B SIMPLEfor LDAP Simple Binds or.B SASL(<mech>)for SASL Binds.Note that unless configured as a global overlay, only Simple Binds usingDNs that reside in the current database will be logged..LP.RS 4(  1.3.6.1.4.1.4203.666.11.5.2.7    NAME 'auditCompare'    DESC 'Compare operation'    SUP auditObject STRUCTURAL    MUST reqAssertion ).RE.PFor the.B Compareoperation the.B reqAssertionattribute carries the Attribute Value Assertion used in the compare request..LP.RS 4(  1.3.6.1.4.1.4203.666.11.5.2.8    NAME 'auditDelete'    DESC 'Delete operation'    SUP auditWriteObject STRUCTURAL    MAY reqOld ).RE.PThe.B Deleteoperation needs no further parameters. However, the.B reqOldattribute may optionally be used to record the contents of the entry priorto its deletion. The values are formatted as.RS.PD 0.TPattribute: value.RE.PDThe.B reqOldattribute is only populated if the entry being deleted matches theconfigured.B logoldfilter..LP.RS 4(  1.3.6.1.4.1.4203.666.11.5.2.9    NAME 'auditModify'    DESC 'Modify operation'    SUP auditWriteObject STRUCTURAL    MAY reqOld MUST reqMod ).RE.PThe.B Modifyoperation contains a description of modifications in the.B reqModattribute, which was already described above in the Add operation. It mayoptionally contain the previous contents of any modified attributes in the.B reqOldattribute, using the same format as described above for the Delete operation.The.B reqOldattribute is only populated if the entry being modified matches theconfigured.B logoldfilter..LP.RS 4(  1.3.6.1.4.1.4203.666.11.5.2.10    NAME 'auditModRDN'    DESC 'ModRDN operation'    SUP auditWriteObject STRUCTURAL    MUST ( reqNewRDN $ reqDeleteOldRDN )    MAY reqNewSuperior ).RE.PThe.B ModRDNclass uses the.B reqNewRDNattribute to carry the new RDN of the request.The.B reqDeleteOldRDNattribute is a Boolean value showing.B TRUEif the old RDN was deleted from the entry, or.B FALSEif the old RDN was preserved.The.B reqNewSuperiorattribute carries the DN of the new parent entry if the request specifiedthe new parent..LP.RS 4(  1.3.6.1.4.1.4203.666.11.5.2.11    NAME 'auditSearch'    DESC 'Search operation'    SUP auditReadObject STRUCTURAL    MUST ( reqScope $ reqDerefAliases $ reqAttrsOnly )    MAY ( reqFilter $ reqAttr $ reqEntries $ reqSizeLimit $          reqTimeLimit ) ).RE.PFor the.B Searchclass the.B reqScopeattribute contains the scope of the original search request, using thevalues specified for the LDAP URL format. I.e..BR base ,.BR one ,.BR sub ,or.BR subord .The.B reqDerefAliasesattribute is one of.BR never ,.BR finding ,.BR searching ,or.BR always ,denoting how aliases will be processed during the search.The.B reqAttrsOnlyattribute is a Boolean value showing.B TRUE if only attribute names were requested, or.B FALSEif attributes and their values were requested.The.B reqFilterattribute carries the filter used in the search request.The.B reqAttrattribute lists the requested attributes if specific attributes wererequested.The.B reqEntriesattribute is the integer count of how many entries were returned bythis search request.The.B reqSizeLimitand.B reqTimeLimitattributes indicate what limits were requested on the search operation..LP.RS 4(  1.3.6.1.4.1.4203.666.11.5.2.12    NAME 'auditExtended'    DESC 'Extended operation'    SUP auditObject STRUCTURAL    MAY reqData ).RE.PThe.B Extendedclass represents an LDAP Extended Operation. As noted above, the actual OID ofthe operation is included in the.B reqTypeattribute of the parent class. If any optional data was provided with therequest, it will be contained in the.B reqDataattribute as an uninterpreted octet string..SH NOTESThe Access Log implemented by this overlay may be used for a variety ofother tasks, e.g. as a ChangeLog for a replication mechanism, as wellas for security/audit logging purposes..SH FILES.TPETCDIR/slapd.confdefault slapd configuration file.SH SEE ALSO.BR slapd.conf (5)..SH ACKNOWLEDGEMENTS.PThis module was written in 2005 by Howard Chu of Symas Corporation.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -