Friday, May 31, 2013

Configure OSB Business Service to Call an External HTTPS Service

This writing shows the specific steps on how to configure an OSB business service to make an external HTTPS service call.
1.      Let’s start with the HTTPS site that you need call from OSB. You can retrieve the certificate(s) of the web site with Firefox. Follow the 7 steps (red marked circles on the screen shots) listed in the two screen shots (I used a bank site as an example)
Remember to repeat the 7 steps for each of certificate in the hierarchy in the 2nd screen shot. After these, you should have 3 certificate files. One for the site, one is intermediate CA, and finally a root CA.
·        You can harvest certificate files from IE or Chrome, the exported file maybe in “.cer” format. Although you can import those “.cer” file into the key store successfully, I was told that it may not work. So you need to make sure your certificate file output in PEM format!
2.      Import certificates into DemoTrust  (or you designed trust store) store
keytool -import -keystore C:\Oracle\Middleware\wlserver_10.3\server\lib\DemoTrust.jks  -storepass DemoTrustKeyStorePassPhrase -trustcacertificates -file  certX.crt -alias certX 
where “certX.crt” is the certificate file.
·        There are two key stores in WSL.
The “trust key store” is for storing external certificates that you “trust”, so WSL can talk to them.
The “identity key store” keeps both public/private key that identifies you, so external parties can identify you.
You can find your key store locations from “Environment->Servers”, click on your server, for example, osb_server1 in the sample screen below:

3.      What if the certificate is a wildcard certificate like *
WLS doesn’t support wildcard certificate out of box. For WLS version before 10.3.6, you need to apply a patch. For 10.3.6, you need to follow this link
Steps summary: login to WLS console, go to environment, servers, then OSB server, click on configuration, then SSL, then advanced, set custom host verifier, then set the custom verifier class to “”.
4. If the target service also require WS-name token, then you need to attach the wss-user-token-client-policy to the business service. Check the “security” tab, and make sure you have the matching create “basic.credentials” by default. Or you can use “overrides” to set a different credential, such as “idm.credentials”, technically you can name it anything, you need to make sure “idm.credentials” exits on “em” (under "weblogic domain", your domain name, right click, then select Security, Credentials) console just like “basic.crentials”.

1 comment:

  1. Hi I'm trying to connect to IDCS from OSB.I've creted the Business Service.Have followed the steps suggested in this post.I've also configured HostNamr VErifier to "Custom HostName Verification" and Custom Hostname Verifier as "" in the weblogic console.
    After these setting the error am getting is "The invocation resulted in an error: .".Apparently There are no errors logged in the log files.Can you please help me in resolving this.