WSO2 ESB supports securing unsecured web services. In this post I'm going to explain how you can secure a web service with WSO2 ESB, using it as an integration layer.
You may have heard of proxy services. A proxy service is a virtual service hosted within an ESB. Simply a proxy service wraps a back-end web service hosted in an application server. A proxy service receives messages that have been sent to a specific endpoint (back-end service) defined in the proxy service configuration. Before forwarding the messages to the relevant endpoint the proxy service can process them if needed, using mediators.
These back-end services may no be secured always. In such a case those unsecured services can be made secured by using the ESB as integration layer. To do that what we need to do is creating a secure proxy service with WS-Security enabled with a specified security policy.
Here are the simple steps to follow to secure a web service.
- Open the ESB Management Console.
- Create a Proxy Service by clicking on the Services -> Add -> Proxy Service ->Pass Through Proxy in the Main tab. (Here I've selected Pass Through Proxy since I just need to forward messages to the endpoint without performing any processing on them)
- Give a name for the Proxy Service and specify the target endpoint. Here I've given the web service URL which is hosted within the Axis2 server.
- Then you will be redirected to the List of Services.
- You will see the proxy service is shown as 'Unsecured'. Click on 'Unsecured'.
- You will be prompted to Enable Security. Select Yes. Then select the UsernameToken as the Basic Scenario.
- Click Next. Select user group and Finish.
- Now the proxy service is security enabled. You can see the endpoint starting with https:// service dashboard of the proxy service.
References :
No comments:
Post a Comment