简体   繁体   中英

Wso2 bulk PDP query

Is there some option in wso2 PDP for making a single request for a sum of resources?

I think that having something like that can really improve the performance instead of asking the PDP every time. It would be great if I could make a single request and get all the access rights for a single user.

So i found that there is an endpoint /entitled-attribs . You can find it in the docs .

So the description says Get entitled attributes for a given set of parameters.

You can post other parameters as well but by posting something like :

{
    "subjectName":"somename"
}

you can get a response of the resources and the actions that the user can do :

{
"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
}

And from here on we can just parse this response depending on our needs.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM