0
votes

I am working on WSO2 API Manager - 3.1.0 with KM as WSO2 Identity Server. I had configured some XACML policies inside IS to be applied on any API request, but to evaluate those i need to add the EntitlementService in the in-sequence of the request which contains the details as mentioned below:

  1. remoteServerURL(URL of Identity Server)
  2. remoteServerUserName(credentials to login into IS default is admin)
  3. remoteServerPassword(credentials to login into IS default is admin)

As I am using multi tenant environment and the application which will subscribe the api's will be SAAS Enabled how I can implement Entitlement Service Mediation for these type of applications.

1

1 Answers

0
votes

Create an XML file named EntitlementMediator.xml and add the following sequence:

<?xml version="1.0"?>
   <sequence name="EntitlementMediator" xmlns="http://ws.apache.org/ns/synapse">
   <entitlementService xmlns="http://ws.apache.org/ns/synapse" callbackClass="org.wso2.sample.handlers.entitlement.APIEntitlementCallbackHandler" remoteServicePassword="admin" remoteServiceUserName="admin" remoteServiceUrl="https://localhost:9444/services"/>
</sequence>

Add remoteServiceusername, remoteServicepassword and remoteServiceUrl of your IS server. localhost:9444 is the IP and port of IS whereas username and password are the IS carbon.super credentials.