Case: Creating CSF key in Oracle SOA 11g
Usage: credentials for HTTP basic authentication can be used, updated run time and managed easily
In the world of integration projects, it is very common to invoke the 3rd party web service into your web service
i.e. when your service is acting as a caller service and calling service will accept your request only upon authenticating your identity then we can pass the credentials in different ways.
CSF Key, also know as Credentials Store Factory - Key, One of the best way of sending credentials in the header along with your actual request in Oracle SOA is using CSF Key.
Case:
Most of the web service providers expect authentication before addressing your request.
Example, in one of my projects we need to invoke Fusion Customer Hub web service which is https secured service expecting both certificate on your server and basic http authentication credentials.
Creating CSF key:
Creating CSF Key is quite easy.
Login to Oracle SOA EM console -- http://servername:port/EM
Expand the Weblogic Domain in left side panel.
Right click on SOA11TEST_domain (your SOA domain)
Select Security/Credentials as shown below.
Which will open a new window in the right side panel as shown below.
You can click on "Create Key" option to create a new CSF key and if you want to see existing CSF key's click on "oracle.wsm.security"
After click on "Create key" select "oracle.wsm.security" as shown below.
You can give values as below.
key (key name) -- which we will use in our code to refer this key values while invoking the web service.
User Name -- Give required username which is provided by service provider.
Password -- Give required password which is provided by service provider.
confirm password and give description about the key and purpose.
And click on "Ok".
Ex:-
Now you are ready with CSF Key.
How to Use:
During development of caller web service in Jdeveloper.
On the SCA Composite window
After creating partner link for the web service you are planing to invoke (calling web service partner link)
You can right click on the partner link where you have to pass the credentials, which will open the window as shown below and select the Security policy as shown below by clicking "+" sign at the Security section level.
Upon completion of adding the owsm security policy click on edit option (pencil icon) which is just next to the '+' sign you used above. Shown below.
Click on "ok" and "ok" on both the windows which will enable the WSM policy and also adds the CSF key credentials as shown below.
How to check if it is properly added or not.
Go to SCA Composite as shown below and go to respective reference XML tags to show if the policy and key added properly or not.
Which will completes the steps to create CSF key in Oracle SOA server and how to use it in your code.
And once after the CSF key is created in future though the credentials changed you can go to EM console and you can edit the corresponding CSF key with new credentials which will be ready available run time.
No comments:
Post a Comment