我正在考虑将我的客户端应用程序从使用XACML 2.0授权服务迁移到使用更新的XACML 3.0服务。
在将我的客户端应用程序从发出XACML 2.0请求迁移到发出XACML 3.0请求时会遇到哪些更改或问题?
发布于 2011-11-02 06:04:54
您的客户端应用程序的XACML 2.0和XACML 3.0之间最大的区别在于,在XACML 3.0中,authz请求中的属性结构发生了显着变化。
在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>例如,XACML2.0中的<Subject>元素在XACML3.0中变成了<Attributes Category="urn:oasis:names:tc:xacml:1.0:subject-category:access-subject">。资源、环境和操作类别也是如此。
这种结构更改简化了处理请求的处理模型,并使使用特定于应用程序或特定于域的自定义类别扩展模型变得很容易,而不会与模式验证冲突。
XACML 3.0中定义了用于策略定义的新数据类型和函数。AnyURI数据类型现在与字符串数据类型不同。一些2.0组合算法已被弃用,取而代之的是新的3.0等效项,它们更精确地定义了不确定状态如何通过策略决策树向上传播。旧的组合算法仍然包含在“遗留”工件中。
XACML 2.0请求和策略可以机械地转换为XACML 3.0格式,而不会丢失信息。如果您坚持使用简单的允许/拒绝响应,则可以将3.0响应转换回2.0格式。
发布于 2011-11-03 18:07:56
请查看OASIS XACML TC维基获取官方差异列表:
"Differences between XACML 2.0 and XACML 3.0"
简而言之..。
XACML 2.0和XACML 3.0之间的主要区别在于新特性,例如
此信息在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"的新特性。
发布于 2012-07-17 12:47:03
这可能是了解XACML3功能的另一个有用的网页:
What is new with XACML 3.0
https://stackoverflow.com/questions/7973277
复制相似问题