2017-07-26 51 views
0

在wso2 PDP中是否有一些选项可用于对资源总和进行单个请求?Wso2批量PDP查询

我认为有这样的事情可以真正提高性能,而不是每次询问PDP。如果我能够提出一个请求并获得单个用户的所有访问权限,那将是非常好的。

回答

0

所以我发现有一个终点/entitled-attribs。你可以在docs找到它。

所以描述说Get entitled attributes for a given set of parameters.

您可以张贴等参数很好,但通过发布这样的:

{ 
    "subjectName":"somename" 
} 

,你可以得到的资源和动作,用户可以做的回应:

{ 
"entitledResultSetDTO": { 
    "entitledAttributesDTOs": [ 
     { 
      "resourceName": "SomeResource_Name", 
      "action": "some_action_on_the_resource", 
      "environment": null, 
      "allActions": false, 
      "allResources": false, 
      "attributeDTOs": [] 
     }, 
     { 
      "resourceName": "SomeOtherResource_Name", 
      "action": "some_other_action_on_the_resource", 
      "environment": null, 
      "allActions": false, 
      "allResources": false, 
      "attributeDTOs": [] 
     } 
    ], 
    "advanceResult": false, 
    "message": null, 
    "messageType": null 
} 

从这里开始,我们可以根据我们的需要来解析这个响应。