【发布时间】:2014-07-03 07:51:44
【问题描述】:
我尝试了来自http://www.webfarmr.eu/2011/08/xacml-102-xpath-and-xacml/ 的第一个示例,“XPath used in a single XACML request”部分。以防万一这里是 XACML 政策:
<?xml version="1.0" encoding="UTF-8"?><xacml3:Policy xmlns:xacml3="urn:oasis:names:tc:xacml:3.0:core:schema:wd-17" PolicyId="xpath-target-single-req" RuleCombiningAlgId="urn:oasis:names:tc:xacml:3.0:rule-combining-algorithm:deny-overrides" Version="1">
<xacml3:Description/>
<xacml3:PolicyDefaults><xacml3:XPathVersion>http://www.w3.org/TR/1999/REC-xpath-19991116</xacml3:XPathVersion></xacml3:PolicyDefaults>
<xacml3:Target>
<xacml3:AnyOf>
<xacml3:AllOf>
<xacml3:Match MatchId="urn:oasis:names:tc:xacml:1.0:function:string-equal">
<xacml3:AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">Gulliver's travels</xacml3:AttributeValue>
<xacml3:AttributeSelector Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false" Path="/book/title/text()"/>
</xacml3:Match>
<xacml3:Match MatchId="urn:oasis:names:tc:xacml:1.0:function:integer-greater-than">
<xacml3:AttributeValue DataType="http://www.w3.org/2001/XMLSchema#integer">18</xacml3:AttributeValue>
<xacml3:AttributeDesignator AttributeId="age" Category="urn:oasis:names:tc:xacml:1.0:subject-category:access-subject" DataType="http://www.w3.org/2001/XMLSchema#integer" MustBePresent="false"/>
</xacml3:Match>
</xacml3:AllOf>
</xacml3:AnyOf>
</xacml3:Target>
<xacml3:Rule Effect="Permit" RuleId="allow-read">
<xacml3:Description/>
<xacml3:Target/>
</xacml3:Rule>
</xacml3:Policy>
当我使用“策略管理”页面中的“尝试”选项并评估我的 XACML 请求时,响应会返回许可决定。请注意,该政策尚未发布。
在我发布策略之后,启用它并使用“工具”->“XACML”菜单中的“尝试”选项。结果是“不适用”。
我在“策略管理”和“策略视图”中都没有任何其他策略。
包含 XPath 表达式的 XACML 策略是否需要一些额外的配置?提供的场景有什么问题?
编辑: 在日志中发现这条消息:
[2014-07-03 11:13:25,021] INFO {org.wso2.balana.finder.AttributeFinder} - Failed to resolve any values for /book/title/text()
【问题讨论】:
标签: xpath wso2 wso2is xacml xacml3