9

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

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

4

3 回答 3

10

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 中的<Subject>元素变为<Attributes Category="urn:oasis:names:tc:xacml:1.0:subject-category:access-subject">XACML 3.0。资源、环境和操作类别也是如此。

这种结构上的变化简化了处理请求的处理模型,并且可以很容易地使用自定义的特定于应用程序或特定于域的类别来扩展模型,而不会与模式验证发生冲突。

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

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

于 2011-11-01T22:04:54.407 回答
3

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

“XACML 2.0 和 XACML 3.0 之间的区别”

简而言之...

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

  • 义务表达式:您的义务陈述可以有动态部分
  • 引入有效地将义务推广到更广泛范围的建议
  • 引入XACML v3.0 管理和委派配置文件 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 还举办了一个关于主题的网络研讨会:“使用 XACML 3.0 进行基于策略的访问控制”

最后,我在“#XACML 3.0 中的增强和新特性”中总结了新特性。

于 2011-11-03T10:07:55.890 回答
1

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

XACML 3.0 的新功能

于 2012-07-17T04:47:02.900 回答