第 6 章 插件实现的服务器功能参考
本章包含插件的参考信息。
Directory 服务器插件功能的每个部分的配置在子树 cn=plugins,cn=config
下都有自己的独立条目和属性集。
dn: cn=Telephone Syntax,cn=plugins,cn=config objectclass: top objectclass: nsSlapdPlugin objectclass: extensibleObject cn: Telephone Syntax nsslapd-pluginPath: libsyntax-plugin nsslapd-pluginInitfunc: tel_init nsslapd-pluginType: syntax nsslapd-pluginEnabled: on
其中一些属性适用于所有插件,而其他插件则可能特定于特定的插件。您可以通过在 cn=config
子树上执行 ldapsearch
来检查给定插件使用哪些属性。
所有插件都是从 extensibleObject
对象类继承的 nsSlapdPlugin
对象类的实例。当条目中存在两个对象类(除顶级对象类外)时,服务器会考虑插件配置属性,如下例所示:
dn:cn=ACL Plugin,cn=plugins,cn=config objectclass:top objectclass:nsSlapdPlugin objectclass:extensibleObject
6.1. 所有插件通用属性列表
此列表提供了简短的属性描述、条目 DN、有效范围、默认值、语法和每个属性的示例。
每个目录服务器插件都属于 nsslapdPlugin
对象类。
此对象类在 Directory Server 中定义。
优越的类
top
OID
2.16.840.1.113730.3.2.41
属性 | 定义 |
---|---|
objectClass | 提供分配给条目的对象类。 |
cn | 提供条目的通用名称。 |
标识插件库名称(不带库后缀)。 | |
标识插件的初始化功能。 | |
标识插件的类型。 | |
标识插件 ID。 | |
标识插件的版本。 | |
标识插件的供应商。 | |
标识插件的描述。 | |
标识是否启用插件。 | |
按照执行顺序设置插件的优先级。 |
6.1.1. nsslapd-logAccess
此属性允许您将插件运行的搜索操作记录到 cn=config
中的 nsslapd-accesslog
参数中设置的文件。
插件参数 | 描述 |
---|---|
条目 DN | cn=plug-in name,cn=plugins,cn=config |
有效值 | on | off |
默认值 | off |
语法 | DirectoryString |
示例 | nsslapd-logAccess: Off |
6.1.2. nsslapd-logAudit
此属性允许您记录和审核数据库修改,源自插件。
如果在 cn=config
中启用了 nsslapd-auditlog-logging-enabled
参数,则成功修改事件会记录在审计日志中。要通过插件记录失败的修改数据库操作,请在 cn=config
中启用 nsslapd-auditfaillog-logging-enabled
属性。
插件参数 | 描述 |
---|---|
条目 DN | cn=plug-in name,cn=plugins,cn=config |
有效值 | on | off |
默认值 | off |
语法 | DirectoryString |
示例 | nsslapd-logAudit: Off |
6.1.3. nsslapd-pluginDescription
此属性提供插件的描述。
插件参数 | 描述 |
---|---|
条目 DN | cn=plug-in name,cn=plugins,cn=config |
有效值 | |
默认值 | 无 |
语法 | DirectoryString |
示例 | nsslapd-pluginDescription: acl access check 插件 |
6.1.4. nsslapd-pluginEnabled
此属性指定插件是否已启用。可以使用协议更改此属性,但仅在下一次服务器重启时生效。
插件参数 | 描述 |
---|---|
条目 DN | cn=plug-in name,cn=plugins,cn=config |
有效值 | on | off |
默认值 | on |
语法 | DirectoryString |
示例 | nsslapd-pluginEnabled: on |
6.1.5. nsslapd-pluginId
此属性指定插件 ID。
插件参数 | 描述 |
---|---|
条目 DN | cn=plug-in name,cn=plugins,cn=config |
有效值 | 任何有效的插件 ID |
默认值 | 无 |
语法 | DirectoryString |
示例 | nsslapd-pluginId: chaining database |
6.1.6. nsslapd-pluginInitfunc
此属性指定要启动插件功能。
插件参数 | 描述 |
---|---|
条目 DN | cn=plug-in name,cn=plugins,cn=config |
有效值 | 任何有效的插件功能 |
默认值 | 无 |
语法 | DirectoryString |
示例 | nsslapd-pluginInitfunc: NS7bitAttr_Init |
6.1.7. nsslapd-pluginPath
此属性指定插件的完整路径。
插件参数 | 描述 |
---|---|
条目 DN | cn=plug-in name,cn=plugins,cn=config |
有效值 | 任何有效的路径 |
默认值 | 无 |
语法 | DirectoryString |
示例 | nsslapd-pluginPath: uid-plugin |
6.1.8. nsslapd-pluginPrecedence
此属性设置插件执行顺序的优先级或优先级。优先级定义插件的执行顺序,允许更复杂的环境或交互,因为它可以在执行前等待完成的操作。对于 pre-operation 和 post-operation 插件,这更为重要。
值 1 的插件具有最高的优先级,首先运行;值为 99 的插件具有最低优先级。默认值为 50.
插件参数 | 描述 |
---|---|
条目 DN | cn=plug-in name,cn=plugins,cn=config |
有效值 | 1 到 99 |
默认值 | 50 |
语法 | 整数 |
示例 | nsslapd-pluginPrecedence: 3 |
6.1.9. nsslapd-pluginType
此属性指定插件类型。如需更多信息,请参阅 第 6.2.4 节 “nsslapd-plugin-depends-on-type”。
插件参数 | 描述 |
---|---|
条目 DN | cn=plug-in name,cn=plugins,cn=config |
有效值 | 任何有效的插件类型 |
默认值 | 无 |
语法 | DirectoryString |
示例 | nsslapd-pluginType: preoperation |
6.1.10. nsslapd-pluginVendor
此属性指定插件的供应商。
插件参数 | 描述 |
---|---|
条目 DN | cn=plug-in name,cn=plugins,cn=config |
有效值 | 任何批准的插件供应商 |
默认值 | Red Hat, Inc. |
语法 | DirectoryString |
示例 | nsslapd-pluginVendor: Red Hat, Inc. |
6.1.11. nsslapd-pluginVersion
此属性指定插件版本。
插件参数 | 描述 |
---|---|
条目 DN | cn=plug-in name,cn=plugins,cn=config |
有效值 | 任何有效的插件版本 |
默认值 | 产品版本号 |
语法 | DirectoryString |
示例 | nsslapd-pluginVersion: {VER} |