4 min read

Signature Verification by Oracle WSM

Oracle Web Services Manager can actually validate the signature in the incoming i.e. request SOAP message. By using Oracle WSM to validate the signature, organizations can actually centralize the policy enforcement and also the public key management. As organizations deploy more web services that are accessed by other divisions and business partners, managing the signature verification process might become tedious, as with each new consumer, the certificate information should be maintained. Oracle WSM can address such issues by centralizing those operations. This section  will describe how to configure Oracle WSM policy to validate the signature of the SOAP request message.

In order to view the policy, you can click on Policy Management and then Manage Policies. This will bring you to the screen with the gateway information and a hyperlink for policies (see the following screen capture).

Oracle Web Services Manager

 

You can then click on Policies to see all the policies and you will see theVerifyAndSign policy too that is created by default.

Oracle Web Services Manager

A default policy is attached to the service. We can now click Edit to edit the  policy. When you click Edit, you will see the policy steps as shown in the  following screenshot.

Oracle Web Services Manager

In this section, we want to configure the Request pipeline to validate the signature of the incoming SOAP message. In order to validate the signature, click Add Step Below to add the Verify Signature policy step as shown in the following screenshot.

Oracle Web Services Manager

Once you click OK, the verify signature policy step is added, but that policy step should be configured. If you click on the Configure button on the verify signature policy step, it will take you to the screen where you can configure the verify signature policy information as shown in the following screen capture.

Oracle Web Services Manager

In the previous screenshot, I configured Verify Signature policy steps with:

  • Location of the key store
  • Key store type as PKCS12
  • Password of the key store
  • Public key alias in the key store
  • Set Remove Signatures to true to remove the digital signature after the signature validation
  • Enforce Signing is set to true to make sure that the incoming requests are signed

In order to generate a PKCS12 key store from certifcate that is installed already in Microsoft certifcate services, you should frst export the certifcate (with or without private key) and then import that certifcate in FireFox (Advanced option) and then export back to PKCS12.

Once the verify signature policy has been configured and saved (Commit Policy), the policy would enforce that any request for the time service with the particular service ID be digitally signed.

Signature Generation by Oracle WSM

In the last section, we discussed how to digitally sign a web service request by Microsoft .NET application and how to validate the signature by Oracle WSM. In this section, we will discuss how to digitally sign the web service response message. In the earlier section, we discussed how to register the service and how to attach the verify signature policy step to the request pipeline.

In order to digitally sign the response message, the response pipeline of the policy should be modified to include the sign message policy step. The policy with the request pipeline that is already configured to verify signature would look like:

Oracle Web Services Manager

Now we have to add the step in the Response pipeline to actually sign the response message. In order to add the policy step, click on Add Step Below and then select the Sign Message policy step. Once the Sign Message policy step is added, it can then be configured, as shown in the following screenshot, to include the appropriate key store location for the public key to digitally sign the message.

Oracle Web Services Manager

In the previous figure, the location of the key store that has the private key, along with the Keystore password, alias and part of message to be signed are specified.

Once the policy is created, it would look like:

Oracle Web Services Manager

In the previous screenshot, the Response pipeline has two log steps—one to log the message before digitally signing and one to log the message after digitally signing the message. In this sample, we are using the same WSEQuickStartServer certificate to sign the message.

Once the policy is saved, the response message will be digitally signed. The client application (Microsoft .NET) can be configured to validate the signature.

LEAVE A REPLY

Please enter your comment!
Please enter your name here