Preparing OSB server to work with SSL

In this recipe, we will configure the OSB to use SSL. The WebLogic server standard installation already comes with a default certificate and keystore, but in this recipe we will use the custom keystore that we created in Chapter 11, Handling Message-level Security Requirements.

Getting ready

We will need access to Eclipse OEPE, soapUI client, and the server.jks and client.jks files.

How to do it...

First, we will configure the OSB server to use the server.jks keystore we created earlier.

In WebLogic console, perform the following steps:

  1. Click on Environment in the tree on the left and select Servers | AdminServer(admin) on the detail view.
  2. Navigate to the Configuration | Keystores tab.
  3. Click Change and change the value to Custom Identity and Custom Trust for the Keystores field.
  4. Enter ./config/fmwconfig/server.jks into the Custom Identity Keystore field.
  5. Enter JKS into the Custom Identity Keystore Type field.
  6. Enter welcome into the Custom Identity Keystore Passphrase field.
  7. Enter welcome into the Confirm Custom Identity Keystore Passphrase field.
  8. Enter ./config/fmwconfig/server.jks into the Custom Trust Keystore field.
  9. Enter JKS into the Custom Trust Keystore Type field.
  10. Enter welcome into the Custom Trust Keystore Passphrase field.
  11. Enter welcome into the Confirm Custom Trust Keystore Passphrase field.
  12. Click Save.
    How to do it...

    Next, we have to configure the SSL identity of the server.

  13. Click on Environment in the tree on the left and select Servers | AdminServer(admin).
  14. Navigate to the Configuration | SSL tab.
  15. Enter serverKey into the Private Key Alias field.
  16. Enter welcome into the Private Key Passphrase field.
  17. Enter welcome into the Confirm Private Key Passphrase field and click Save.
  18. Click on the Advanced link.
  19. Select None for Hostname Verification.
  20. Click Save.
    How to do it...

    Next, we will configure the Admin Server in order to enable HTTPS traffic.

  21. Click on Environment in the tree on the left and select Servers | AdminServer(admin).
  22. Navigate to the Configuration | General tab.
  23. Check the option SSL Listen Port Enabled.
  24. Leave the SSL Listen Port on the default of 7002.
  25. Click Save.
    How to do it...

    Next we need to create a PKICredentialProvider in the WebLogic security realm.

  26. Click Security Realm in the tree on the left and select myRealm.
  27. Navigate to the Providers | Credential Mapping tab.
  28. Click New.
  29. Enter PKICredentialMapper into the Name field.
  30. Select PKICredentialMapper from the Type drop-down listbox.
  31. Click OK.
  32. Click on the new PKICredentialMapper.
  33. Navigate to the Configuration | Provider Specific tab.
  34. Enter JKS into the Keystore Type field.
  35. Enter ./config/fmwconfig/server.jks into the Keystore File Name field.
  36. Enter welcome into the Keystore Pass Phrase field.
  37. Enter welcome into the Confirm Keystore Pass Phrase field.
  38. Click Save.
    How to do it...
  39. Restart the server.

How it works...

Due to the fact that OSB uses the WebLogic security framework for SSL transport security, the whole configuration takes place in the WebLogic console. First, we need to configure the server to activate the SSL traffic. For the OSB cookbook, we use a development installation with the OSB installed on the Admin Server. If the OSB Server is installed on its own Managed Server, which will be the case in a production environment, then SSL needs to be enabled on all Managed Servers, where it is required. After that we configure the PKICredentialMapper on WebLogic for using key pair or certificate credential mappings.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset