Friday, November 9, 2012

Securing OSB proxy service

Security is an important aspect in the webservice domain. Let us see how to secure an OSB proxy service using OWSM

Create a OWSM enabled osb domain


Create a proxy service. Add the security policy as shown below

Enable the Header Processing as below

Save and Activate the changes in the osb console.

Now test the service from Test Console without passing the SOAP Header

It will throw an error as shown below

The service cannot be invoked without passing user credentials as part of SOAP Header.


Now lets see how to invoke this secured service from BPEL 

Create a partner link for the above OSB service in the BPEL.

In the composite.xml design view select the partnerlink

Right click on the partner link and select the Configure WS Policies option

Choose the wss_username_token_client_policy for the Security field

In the property inspector window, go to binding property section and click on the add button.


Add two new properties for username and password with appropriate values for the properties

Now the composite.xml will appear like as shown below. 



Deploy and test the BPEL. Now this BPEL will successfully invoke the secured OSB proxy service


No comments:

Post a Comment