【问题标题】:How does XACML 3.0 differ from XACML 2.0?XACML 3.0 与 XACML 2.0 有何不同?
【发布时间】:2011-11-01 21:41:06
【问题描述】:

我正在考虑将我的客户端应用程序从使用 XACML 2.0 授权服务迁移到使用更新的 XACML 3.0 服务。

在将我的客户端应用程序从发出 XACML 2.0 请求迁移到发出 XACML 3.0 请求时,我会遇到哪些变化或问题?

【问题讨论】:

  • 我一直被问到这个问题,所以我把它作为关于 SO 的常见问题发布在这里。

标签: xacml xacml2 xacml3


【解决方案1】:

XACML 2.0 和 XACML 3.0 对于您的客户端应用程序的最大区别在于,authz 请求中的属性结构在 XACML 3.0 中发生了显着变化。

在 XACML 2.0 中,使用 XML 元素标签将属性组织成主题、资源、环境或操作类别:

<?xml version="1.0" encoding="UTF-8"?>
<Request  xmlns="urn:oasis:names:tc:xacml:2.0:context:schema:os"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="urn:oasis:names:tc:xacml:2.0:context:schema:os  access_control-xacml-2.0-context-schema-os.xsd">
        <Subject>
            <Attribute
                  AttributeId="urn:oasis:names:tc:xacml:1.0:subject:subject-id"
                  DataType="http://www.w3.org/2001/XMLSchema#string">
                <AttributeValue>Julius Hibbert</AttributeValue>
            </Attribute>
        </Subject>
        <Resource>
            <Attribute
                  AttributeId="urn:oasis:names:tc:xacml:1.0:resource:resource-id"
                  DataType="http://www.w3.org/2001/XMLSchema#anyURI">
                <AttributeValue>http://medico.com/record/patient/BartSimpson</AttributeValue>
            </Attribute>
        </Resource>
        <Action>
            <Attribute
                  AttributeId="urn:oasis:names:tc:xacml:1.0:action:action-id"
                  DataType="http://www.w3.org/2001/XMLSchema#string">
                <AttributeValue>read</AttributeValue>
            </Attribute>
        </Action>
        <Environment/>
</Request>

在 XACML 3.0 中,这些类别使用​​ XML 属性而不是 XML 元素标签来表示:

<?xml version="1.0" encoding="utf-8"?>
<Request xsi:schemaLocation="urn:oasis:names:tc:xacml:3.0:core:schema:wd-17 http://docs.oasis-open.org/xacml/3.0/xacml-core-v3-schema-wd-17.xsd" ReturnPolicyIdList="false" CombinedDecision="false" xmlns="urn:oasis:names:tc:xacml:3.0:core:schema:wd-17" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <Attributes Category="urn:oasis:names:tc:xacml:1.0:subject-category:access-subject">
    <Attribute IncludeInResult="false" AttributeId="urn:oasis:names:tc:xacml:1.0:subject:subject-id">
      <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">Julius Hibbert</AttributeValue>
    </Attribute>
  </Attributes>
  <Attributes Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource">
    <Attribute IncludeInResult="false" AttributeId="urn:oasis:names:tc:xacml:1.0:resource:resource-id">
      <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#anyURI">http://medico.com/record/patient/BartSimpson</AttributeValue>
    </Attribute>
  </Attributes>
  <Attributes Category="urn:oasis:names:tc:xacml:3.0:attribute-category:action">
    <Attribute IncludeInResult="false" AttributeId="urn:oasis:names:tc:xacml:1.0:action:action-id">
      <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">read</AttributeValue>
    </Attribute>
  </Attributes>
  <Attributes Category="urn:oasis:names:tc:xacml:3.0:attribute-category:environment" />
</Request>

例如,XACML 2.0 中的 &lt;Subject&gt; 元素在 XACML 3.0 中变为 &lt;Attributes Category="urn:oasis:names:tc:xacml:1.0:subject-category:access-subject"&gt;。资源、环境和操作类别也是如此。

这种结构更改简化了处理请求的处理模型,并可以轻松地使用自定义的特定于应用程序或特定于域的类别来扩展模型,而不会违反架构验证。

XACML 3.0 中定义了新的数据类型和函数,用于策略定义。 AnyURI 数据类型现在不同于字符串数据类型。一些 2.0 组合算法已被弃用,取而代之的是新的 3.0 等效算法,这些算法更精确地定义了不确定状态如何通过策略决策树向上传播。旧的组合算法仍然作为“遗留”工件包含在内。

XACML 2.0 请求和策略可以机械地转换为 XACML 3.0 格式,而不会丢失信息。如果您坚持简单的允许/拒绝响应,则可以将 3.0 响应转换回 2.0 格式。

【讨论】:

    【解决方案2】:

    请查看 OASIS XACML TC wiki 了解官方差异列表:

    "Differences between XACML 2.0 and XACML 3.0"

    简而言之……

    XACML 2.0 和 XACML 3.0 之间的主要区别在于新功能,例如

    • 义务表达式:您的义务声明可以包含动态部分
    • 引入有效地将义务推广到更广泛范围的建议
    • 引入XACML v3.0 Administration and Delegation Profile Version 1.0。迄今为止,Axiomatics 和 ViewDS (http://www.viewDs.com) 是唯一包含委托的完整 XACML 3.0 实现。它是云和联合部署的关键功能。委托模型是瑞典计算机科学研究所 (SICS) 5 年以上研发的成果。

    此信息汇总在 OASIS 的 XACML TC wiki 页面上。 TC 得到了 Oracle、IBM 和 Axiomatics 等领先组织的支持。 XACML 3.0 规范的编辑是 Axiomatics 的 CTO,Erik Rissanen。

    此外,Kuppinger Cole 就该主题举办了一场网络研讨会:"Policy Based Access Control with XACML 3.0"

    最后,我总结了"Enhancements and new features in #XACML 3.0"上的新功能。

    【讨论】:

    • Oasis wiki 有很多关于 Xacml 2.0 与 Xamcl 3.0 差异的信息,但都是关于策略语法和特性的。客户端应用程序大多忽略了该级别的 PDP 内部细节。对于“从 2.0 迁移到 3.0 将如何影响我的客户端代码”的问题,我们需要查看请求和响应的变化。
    【解决方案3】:

    可能是另一个有助于了解 XACML3 功能的有用网页:

    What is new with XACML 3.0

    【讨论】:

      猜你喜欢
      • 2020-04-11
      • 1970-01-01
      • 2019-06-02
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多