Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Package the data service file (.dbs file) and the security policy file into a Composite Application (CApp). See the instructions in Packaging Artifacts into Composite Applications.

    Warning

    Once you create the CApp project, note that the information about each of the projects and artifacts that you packaged into the CApp will be listed (under Dependencies in the Composite Application Project POM Editor).

    Be sure to set the server role to Enterprise Service Bus for the security policy file as shown below

  2. Add your WSO2 EI product instance to the Tooling environment and deploy the CApp in the server. See the instructions in Deploying Composite Applications in the Server.
  3. Start the ESB profile. The data service and the security policy is now deployed in WSO2 EI.

Filtering content by user role (Optional)

When you work with data services, you can control access to sensitive data for specific user roles. This facility is called Role-based content filtering. It filters data where specific data sections are only accessible to a given type of users. Follow the instructions given below to add role-based filtering for output elements in your data service. 

  1. Open the data service file in WSO2 EI tooling.
  2. Add an output element to your data service:
    1. Right-click the data service and click Add Query to add a new query.
      Image Added
    2. Right-click the query and click Add Output Mapping to add an output mapping.
      Image Added
    3. Right-click the output mapping and go to Add Output Mapping → Add Element to add an element.
      Image Added
  3. Add the user roles as a comma-separated list in the Allowed User Roles field for the output element as shown below.
    Image Added

Creating a custom validator

...