Showing posts with label OWSM. Show all posts
Showing posts with label OWSM. Show all posts

Monday, 28 March 2016

Creating the composite (Client) by configuring OWSM Client Policy to Invoke Sevice


Create this composite by following the step by step procedure from this post Click Here
and for the Hello World service which is configured with OWSM Service Policy please visit the post Click Here



Give the URL of the deployed Hello World service in the WSDL URL tab and name it as InvokingHelloWorldProject.



Click OK and join BPEL with the web service created.





I. Configuring OWSM Client Policy for the InvokingHelloWorldProject Service

Right Click on the service --> Configure WS Policies



Click on Add(+) button and Select oracle/wss_username_token_client_policy from Server Security Policies



Click OK



Click on Edit Policy which is highlighted below



Give Override Value in csf-key as TestKey which is the name of the key configured in em console (for detailed steps Click Here) and Click OK.

Finally the composite will look as below



Double click on BPEL

1) Add Invoke and join that to Partner Link (InvokingHelloWorldProject)
2) Add two assigns (one before invoke and after invoke as shown below)



Assign1:



Assign2:



Now Deploy and Test.

Testing the client

Request:



Response:



Launch Flow Trace:



Thank You!!!!


Happy Learning!!!!

Testing the Hello World Service which is configured with OWSM Service Policy

For the Hello World service which is configured with OWSM Service Policy please visit previous post Click Here

Test 1: 

Invoking the service without selecting any security policy as shown below.



Then we will get SOAP Fault from server:Invalid Security: error in processing the WS-Security error.



Test 2:

Before invoking the service we will perform following steps along with Input Request.

1) Select oracle/wss_username_token_client_policy policy inside OWSM Security Policies and
2) Provide the proper username and password which is used to connect to the server.



Click on Test Web Service button



Now we will get the proper response as shown above.

Example:

Input: Shankar
Output: Hello Shankar

Thank You!!!!


Happy Learning!!!!

Configure OWSM Policy to the domain in em console and to the Service

Use Case: Configure OWSM Policy inside the domain in em console and to the service to provide security.

To create Hello World Service please visit this post Click Here

I. Configure OWSM in em console for the particular domain.

login in to http://localhost:7001/em and follow the below steps 

Inside WebLogic Domain Right Click on your specific domain --> Security --> Credentials  



Here we need to follow two steps

a) Create Map b) Creating Key based on Map

Create Map:

Click on Create Map



Map Name should be oracle.wsm.security (Standard Name). 

Note: If you give other than oracle.wsm.security name this policy won't work.



Map Created Successfully



Create Key:

Click on Create Key and give the following details

1. Select the Map which is created earlier
2. Give the Key Name (It's User Choice)
3. Give User Name, Password, Confirm Password
4. Description (Optional)



and Click OK



Now we will see the created Key as above.

II. Configuring OWSM Policy for the created Hello World service



Click on Add(+) button



Select oracle/wss_username_token_service_policy from Server Security Policies



Click OK



Click on Edit Policy which is highlighted below



Give Override Value as TestKey and Click OK



Now the composite will look like below



Now its ready to deploy and test.

Thank You!!!!


Happy Learning!!!!