8.5. 跟踪插件发起更新的绑定 DN
在目录服务器中,您可以跟踪哪个用户执行导致插件更新条目的操作。如果启用了跟踪,并且插件会因为用户执行操作而更改了条目,您可以在更新条目的 modifiersname 属性中看到用户的名称。
8.5.1. 跟踪由插件执行的条目修改的用户信息 复制链接链接已复制到粘贴板!
当用户执行更改条目的操作时,它可以触发其他、自动更改目录树。默认情况下,目录服务器不会跟踪执行启动数据修改操作的用户名称。要跟踪用户信息,您可以使用 nsslapd-plugin-binddn-tracking 参数。
例如,当管理员删除用户时,referential Integrity Postoperation 插件会自动从所有组中删除用户。您可以在条目中看到由绑定到服务器的用户帐户执行的初始操作。但是,所有相关更新都默认由插件执行,没有关于哪个用户发起更新的信息。
第二个示例可能使用 MemberOf 插件来更新带有组成员资格的用户条目。对组帐户的更新显示为绑定用户执行,而对用户条目的编辑显示为由 MemberOf 插件执行:
dn: cn=example_group,ou=groups,dc=example,dc=com
modifiersname: uid=example,ou=people,dc=example,dc=com
dn: uid=example,ou=people,dc=example,dc=com
modifiersname: cn=MemberOf Plugin,cn=plugins,cn=config
nsslapd-plugin-binddn-tracking 参数使服务器能够跟踪哪个用户源自更新操作,以及实际执行操作的内部插件。绑定的用户显示在 modifiersname 和 creatorsname 操作属性中,而执行更新的插件则显示在 internalModifiersname 和 internalCreatorsname 操作属性中。例如:
dn: uid=example,ou=people,dc=example,dc=com
modifiersname: uid=admin,ou=people,dc=example,dc=com
internalModifiersname: cn=MemberOf Plugin,cn=plugins,cn=config
nsslapd-plugin-binddn-tracking 参数跟踪和维护绑定用户以及为该连接执行的所有更新之间的关系。
internalModifiersname 和 internalCreatorsname 属性始终显示一个插件作为身份。属性的值为:
-
当核心目录服务器执行更改时,
cn=ldbm database,cn=plugins,cn=config -
当
插件更改了条目时,cn=plugins,cn=config 的 DN
8.5.2. 使用命令行跟踪插件发起更新的绑定 DN 复制链接链接已复制到粘贴板!
对于由插件启动的数据更新,通常需要了解哪个用户执行导致更新的操作。在命令行中,设置 nsslapd-plugin-binddn-tracking 参数来跟踪此类用户信息。
流程
在
上,将nsslapd-plugin-binddn-tracking参数设置为:# dsconf <instance_name> config replace nsslapd-plugin-binddn-tracking=on
验证
-
显示插件更改的条目的
modifiersname和internalModifiersname属性。例如,如果启用了memberOf属性,请在将用户添加到组后显示用户的属性:
# ldapsearch -D "cn=Directory Manager" -W -H ldap://server.example.com -x -b "uid=example-user,ou=People,dc=example,dc=com" -s base -x internalModifiersname -x modifiersname
dn: uid=example-user,ou=people,dc=example,dc=com
modifiersname: uid=admin,ou=people,dc=example,dc=com
internalModifiersname: cn=MemberOf Plugin,cn=plugins,cn=config
8.5.3. 使用 Web 控制台跟踪插件发起更新的绑定 DN 复制链接链接已复制到粘贴板!
对于由插件启动的数据更新,通常需要了解哪个用户执行导致更新的操作。使用 Web 控制台,您可以启用跟踪用户信息。
先决条件
- 您已登录到 web 控制台中的 Directory Server 实例。
流程
-
打开
菜单。 -
在 Advanced Settings 选项卡中,选择
Enable Plugin Bind DN Tracking。 - 点 。
验证
-
显示插件更改的条目的
modifiersname和internalModifiersname属性。例如,如果启用了memberOf属性,请在将用户添加到组后显示用户的属性:
# ldapsearch -D "cn=Directory Manager" -W -H ldap://server.example.com -x -b "uid=example-user,ou=People,dc=example,dc=com" -s base -x internalModifiersname -x modifiersname
dn: uid=example-user,ou=people,dc=example,dc=com
modifiersname: uid=admin,ou=people,dc=example,dc=com
internalModifiersname: cn=MemberOf Plugin,cn=plugins,cn=config