1

每当我在 WSO2 身份服务器中上传策略时,我都会收到“策略上传失败。无效的权利策略。根据 XACML 架构,策略无效”消息。我有 wso2is-5.1.0 版本。我从这个 WSO2教程中得到了这个 XACML 策略。

XACML 策略是:

<Policy xmlns="urn:oasis:names:tc:xacml:3.0:core:schema:wd-17"  PolicyId="Entitlement_Filter_Sample_Policy" RuleCombiningAlgId="urn:oasis:names:tc:xacml:1.0:rule-combining-algorithm:first-applicable" Version="1.0">
      <Target/>
      <Rule Effect="Permit" RuleId="Rule1">
        <Target>
          <AnyOf>
            <AllOf>
              <Match MatchId="urn:oasis:names:tc:xacml:1.0:function:string-equal">
                <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">/Entitlement_Sample_WebApp/protected.jsp</AttributeValue>
                <AttributeDesignator AttributeId="urn:oasis:names:tc:xacml:1.0:resource:resource-id" Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="true"></AttributeDesignator>
              </Match>
              <Match MatchId="urn:oasis:names:tc:xacml:1.0:function:string-equal">
                <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">GET</AttributeValue>
                <AttributeDesignator AttributeId="urn:oasis:names:tc:xacml:1.0:action:action-id" Category="urn:oasis:names:tc:xacml:3.0:attribute-category:action" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="true"></AttributeDesignator>
              </Match>
              <Match MatchId="urn:oasis:names:tc:xacml:1.0:function:string-equal">
            <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">admin</AttributeValue>
                <AttributeDesignator AttributeId="urn:oasis:names:tc:xacml:1.0:subject:subject-id" Category="urn:oasis:names:tc:xacml:1.0:subject-category:access-subject" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="true"></AttributeDesignator>
              </Match>
            </AllOf>
          </AnyOf>
        </Target>
      </Rule>
    </Policy>

我无法了解 XACML 政策中的问题。

4

2 回答 2

0

我成功地将您在问题中粘贴的策略导入到 Axiomatics Policy Administration Point。这是一个有效的 XACML 3.0 策略,假设 WSO2 支持 XACML 3.0,它应该可以正常工作。

公理策略管理点中的策略概述

于 2016-06-14T14:28:59.423 回答
0

您的 XACML 策略是正确的。我能够将它上传到 WSO2 IS 5.1.0。查看附加的 XACML 策略的屏幕截图

在此处输入图像描述

您是否尝试过“在 XML 选项中写入策略”?查看将策略复制粘贴到 xml 库后是否遇到相同的错误。

于 2016-07-06T11:43:35.380 回答