我有两家保单店。一个是简单策略存储(SPS),另一个是管理策略存储(APS)。针对访问策略的简单访问请求正在正常工作。但是,当我根据以下策略(APS)评估行政请求时(我只显示了一个组件策略);
<Target>
<AnyOf>
<AllOf>
<Match MatchId="urn:oasis:names:tc:xacml:1.0:function:string-equal">
<AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">shibli</AttributeValue>
<AttributeDesignator AttributeId="urn:oasis:names:tc:xacml:1.0:subject:subject-id" Category="urn:oasis:names:tc:xacml:3.0:attribute-category:delegate" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="true"/>
</Match>
</AllOf>
</AnyOf>
</Target>然后,这将产生以下错误;
<Response xmlns="urn:oasis:names:tc:xacml:3.0:core:schema:wd-17"><Result><Decision>Indeterminate</Decision><Status><StatusCode Value="urn:oasis:names:tc:xacml:1.0:status:missing-attribute"/><StatusMessage>Couldn't find AttributeDesignator attribute</StatusMessage><StatusDetail>
<MissingAttributeDetail AttributeId="urn:oasis:names:tc:xacml:1.0:subject:subject-id" DataType="http://www.w3.org/2001/XMLSchema#string" Category="urn:oasis:names:tc:xacml:1.0:subject-category:access-subject" ></MissingAttributeDetail>
</StatusDetail></Status></Result></Response>.更新:,这是我的要求;
"<Attributes Category=\"urn:oasis:names:tc:xacml:3.0:attribute-category:delegate\">\n"+
"<Attribute AttributeId=\"urn:oasis:names:tc:xacml:1.0:subject:subject-id\" IncludeInResult=\"false\">\n"+
"<AttributeValue DataType=\"http://www.w3.org/2001/XMLSchema#string\">"+issuer+"</AttributeValue>\n"+
"</Attribute>\n"+
"</Attributes>\n"+任何人都可以指引我!
提前感谢
诚挚的问候,
发布于 2015-02-19 16:19:53
这个错误是正常的。您的策略期望具有以下属性:
标志MustBePresent设置为true,这意味着如果缺少属性(即没有值),则将返回Indeterminate。
对您的请求的答复包括:
注意类别值是如何不同的。这意味着您实际上并不是在评估您在第一个代码段中向我们展示的策略,如果是的话,那么它还包含一个具有必需的subject id属性的部分。
为了继续下去,你最好出示你发送的请求。此外,请确保部署了正确的策略。
发布于 2015-03-20 12:35:25
我通过将管理策略和访问策略放置到两个不同的文件夹中来解决这个问题。我认为Balana不能阅读不同类型的策略,这些策略都在同一个文件夹中。
https://stackoverflow.com/questions/28606160
复制相似问题