具有单一规则和多个资源和操作的XACML策略

时间:2014-03-05 11:16:02

标签: wso2is xacml xacml3 xacml2

您好我正在使用XACML 3.0政策,我的方案是:

策略基于多个资源,单个规则将包含与该特定资源相对应的多个资源和操作,如下面的方案中所述:

策略:

Resources: firstname lastname email

的Rule1:

 Action: 

 firstname : {create, read}
 lastname  : {delete, update, create}
 email     : {read} 

,此用户组允许的角色组为admin。

Rule1的角色:

admin

如何实现此策略以及请求格式的外观如何。

1 个答案:

答案 0 :(得分:0)

您可以创建策略,将目标作为资源和操作的组合,将rule1与具有许可效果的组合一起创建为管理员。

如果您想同时对多个资源执行操作,那么在这种情况下,您可以选择多个决策配置文件,您可以在单个响应中发送单个请求以获取多个资源的策略决策。

政策的伪代码如下:

Policy1 Start
-Target Start
--(Resource is firstname) and ((action is create) or (action is read))
OR
--(Resource is lastname) and ((action is delete) or (action is update) or (action is   create))
OR
--(Resource is email) and (action is read)
-Target End

-Rule1 with effect Permit
--Role is admin
-Rule1 End

-Policy1 End