0
votes

In Wso2 admin panel there is a policy import functionality found at /carbon/entitlement/import-policy.jsp. There you can upload a XACML policy file. The form then POSTS to /fileupload/entitlement-policy.

I want this so that i can automate wso2 setup.I am trying to manually post to this endpoint but cant seem to make it

Is it possible to use this functionality programmatically? How can i use this endpoint to post my policy?

1

1 Answers

0
votes

Did you mean, you want to automate the set-up of adding a new policy to WSO2 IS and then publish it automatically via calling an endpoint other than manually doing it from the UI ?

Yes, you can do that. But not from the above endpoint.

  • For that we have an SOAP service called EntitlementPolicyAdminService. By calling this secured admin service you can add policies, update policies, publish policies to the PDP too. You can use this admin service for automation. For the implementation details you can read [1].

  • WSo2 IS also have a REST service to evaluate XACML request against the published policies. This endpoint is https://localhost:9443/api/identity/entitlement/decision/ You also can use this when evaluating XACML requests in your automation set-up. For more details you can read [2]

[1]https://docs.wso2.com/display/IS550/Entitlement+with+APIs

[2] https://docs.wso2.com/display/IS550/Entitlement+with+REST+APIs