2

Is it possible to create XACML policy and upload in WSO2 identity server(PDP) programmatically?

I want to create and upload policy in WSO2 identity server(PDP) but i do not want to use WSO2 Management Console screen for creating and uploading policies. I want to use my own screen.

If it is possible, Please let me know sample example also.

Thanks

Community
  • 1
  • 1
Abhishek
  • 315
  • 5
  • 18

1 Answers1

2

You can upload your policies through SOAP web service exposed through following WSDL, there is a method for adding addPolicy/addPolicies

https://localhost:9443/services/EntitlementPolicyAdminService?wsdl

Above service is an admin service, and it's hided by default, you have to enable it to use.

  1. Open carbon.xml file which can be found at /repository/conf directory and set following property to “false”

    <HideAdminServiceWSDLs>false</HideAdminServiceWSDLs>
    
  2. Then restart server and access above url from your browser to see the WSDL

  3. You can find the sample client from here, this is for Identity Server 5.0.0

Abimaran Kugathasan
  • 31,165
  • 11
  • 75
  • 105