有关请求过滤策略的概述,请参见《Sun Java System Directory Server Enterprise Edition 6.3 Reference》中的“Request Filtering Policies for Connection Handlers”。有关搜索数据隐藏规则的概述,请参见《Sun Java System Directory Server Enterprise Edition 6.3 Reference》中的“Search Data Hiding Rules in the Request Filtering Policy”。
有关如何创建和配置请求过滤策略和搜索数据隐藏规则的信息,请参见以下过程。
可使用 DSCC 执行此任务。有关信息,请参见目录服务控制中心界面和 DSCC 联机帮助。
创建请求过滤策略。
$ dpconf create-request-filtering-policy policy-name |
将请求过滤策略与某个连接处理程序关联。
$ dpconf set-connection-handler-prop -h host -p port connection-handler-name \ request-filtering-policy:policy-name |
可使用 DSCC 执行此任务。有关信息,请参见目录服务控制中心界面和 DSCC 联机帮助。
查看请求过滤策略的属性。
$ dpconf get-request-filtering-policy-prop -h host -p port policy-name |
请求过滤策略的默认属性如下所示:
allow-add-operations : true allow-bind-operations : true allow-compare-operations : true allow-delete-operations : true allow-extended-operations : true allow-inequality-search-operations : true allow-modify-operations : true allow-rename-operations : true allow-search-operations : true allowed-comparable-attrs : all allowed-search-scopes : base allowed-search-scopes : one-level allowed-search-scopes : subtree allowed-subtrees : "" description : - prohibited-comparable-attrs : none prohibited-subtrees : none |
通过设置步骤 1 中列出的一个或多个属性来配置请求过滤策略。
$ dpconf set-request-filtering-policy-prop -h host -p port policy-name \ property:value [property:value ...] |
通过设置步骤 1 中列出的属性,可以配置请求过滤策略的以下功能:
允许客户端执行的操作类型
对客户端公开或隐藏的子树
搜索操作的范围
搜索过滤器的类型
可以或无法在搜索和比较操作中进行比较的属性类型
可使用 DSCC 执行此任务。有关信息,请参见目录服务控制中心界面和 DSCC 联机帮助。
为请求过滤策略创建一个或多个搜索数据隐藏规则。
$ dpconf create-search-data-hiding-rule -h host -p port policy-name rule-name \ [rule-name ...] |
查看搜索数据隐藏规则的属性。
$ dpconf get-search-data-hiding-rule-prop policy-name rule-name |
搜索数据隐藏规则的默认属性如下所示:
attrs : - rule-action : hide-entry target-attr-value-assertions : - target-dn-regular-expressions : - target-dns : - |
通过设置步骤 2 中列出的一个或多个属性来配置搜索数据隐藏规则。
$ dpconf set-search-data-hiding-rule-prop -h host -p port policy-name rule-name \ property:value [property:value ...] |
可以使用以下规则操作之一:
不返回目标条目。
返回目标条目,但过滤掉指定的属性。
返回目标条目,但过滤掉未指定的属性。
此规则可应用于以下条目:
具有指定 DN 的条目
具有指定 DN 模式的条目
具有指定属性名称和属性值对 (attrName#attrValue) 的条目
以下配置定义了用于隐藏 inetorgperson 类型条目的搜索数据隐藏规则。
$ dpconf set-search-data-hiding-rule-prop -h host1 -p port my-policy my-rule \ target-attr-value-assertions:objectclass#inetorgperson |
以下示例包含请求过滤策略和搜索数据隐藏规则。当请求过滤策略与搜索数据隐藏规则相结合时,将限制对数据的访问,如下所示:
不允许执行以下类型的操作:添加、删除、扩展、修改和重命名。
只能访问 ou=people,dc=sun,dc=com 子树。
inetorgperson 类型以外的条目是由搜索操作返回的。
allow-add-operations : false allow-bind-operations : true allow-compare-operations : true allow-delete-operations : false allow-extended-operations : false allow-inequality-search-operations : true allow-modify-operations : false allow-rename-operations : false allow-search-operations : true allowed-comparable-attrs : all allowed-search-scopes : base allowed-search-scopes : one-level allowed-search-scopes : subtree allowed-subtrees : ou=people,dc=sun,dc=com description : myRequestFilteringPolicy prohibited-comparable-attrs : none prohibited-subtrees : none |
attrs : - rule-action : hide-entry target-attr-value-assertions : objectclass:inetorgperson target-dn-regular-expressions : - target-dns : - |