Skip Headers
Oracle® Application Server Developer's Guide for Microsoft Office Interoperability
10g Release 3 (10.1.3.1.0)

Part Number B28947-01
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
View PDF

6 Securing Smart Documents and Web Services

This chapter demonstrates how you can configure smart documents to invoke enterprise Web services in a secure way. Communication from the smart document through the Web Services Proxy to the Web service and back must be secured. This requires configuration of the Web Service, the Web Service proxy, and the smart document. Additionally, it is important to digitally sign the manifest file that references the DLL file used by the smart document.

This chapter contains the following sections:

6.1 Overview

Smart documents greatly enhance the user experience of working with Microsoft Office documents. They allow automatic data entry in documents, access external data automatically and place it appropriately in a document. Smart documents can provide contextual help during the preparation of complicated documents, enabling information sharing across systems and applications.

Smart documents can communicate with Web services. If the Web service provides non-sensitive data, there is no need for securing the communication between the smart document and the Web service, but if the Web service provides sensitive and confidential data, security is a must. This chapter describes the necessary steps that must be performed to secure the communication between smart documents and Web services.

More information about smart documents and how they can be used in specific business cases is available in Chapter 4, "Creating Smart Documents That Interact with Self-Service Business Processes" and Chapter 5, "Completing Forms and Entering Data Using Microsoft Office".

6.2 Prerequisites

In order to perform the tasks outlined in this chapter, you must install the following applications and files:

6.3 Step-by-Step Procedures

You can use Oracle JDeveloper to expose an existing Java implementation as a Web service that provides access to confidential or restricted information. This Web service can be secured so that smart documents can safely communicate with it.

An example scenario could be the Star Loan Company that has exposed a Web service on its site to receive loan applications from people. The loan application, which is invoked by a smart document form requires a few confidential pieces of information from an applicant, like Social Security number, Annual Income, and so on. When an applicant fills an application form and submits it to Star Loan Company, this transfer of information must be secured. A security implementation between smart documents and Web services addresses this situation appropriately.

In this chapter, we secure the sample Web service developed in Section 5.3.1, "Developing a Smart Document to Retrieve and Update Enterprise Information", as well as a smart document solution that uses a secure Web services proxy.

To develop this secure solution, perform the following steps:

6.3.1 Copying the Demonstration Files

Unzip the demonstration support ZIP file to C:\ on your computer. Refer to Table 6-1, "Example Smart Document Files" for more details.

6.3.2 Creating and Deploying the Web Service

Create a Web Service by performing the steps outlined in Section 5.3.1.1, "Developing a Web Service in Oracle JDeveloper".

6.3.3 Creating the Smart Document DLL

Create the smart document DLL using Microsoft Visual Studio .Net 2003, by performing the following steps:

  1. Open Microsoft Visual Studio .Net 2003.

  2. Create a new Visual C# Class Library project. Click File, New, and then Project.

  3. In the New Project dialog box, select Visual C# Projects and then Class Library. Use the project name SecureDoc.

  4. Right-click the project (SecureDoc) and select Add Reference.

  5. In the Add Reference dialog box, add the following DLL files:

    • System.dll

    • System.data.dll

    • System.Web.dll

    • System.Web.Services.dll

    • System.Windows.Forms.dll

    • System.Drawing.dll

    • System.XML.dll

  6. Add references to the Microsoft.Office.Interop.SmartTag.dll and Microsoft.Office.Interop.Word.dll files. These DLLs are located in the Global Assembly Cache (GAC) and therefore you cannot browse to them in the Add Reference dialog box. You can add these DLLs by performing the following steps:

    1. Close the SecureDoc project in Microsoft Visual Studio .Net 2003.

    2. Using a text editor, open the SecureDoc project file (SecureDoc.csproj), in the location where you saved your project in the preceding steps.

    3. Add the following lines to the file, within the <References> tag, for example:

      <Reference    Name = "Microsoft.Office.Interop.Word"
          AssemblyName = "Microsoft.Office.Interop.Word"
          HintPath = "..\..\..\..\..\WINDOWS\assembly\GAC\Microsoft.Office.Interop.Word\11.0.0.0__71e9bce111e9429c\Microsoft.Office.Interop.Word.dll"
      />
      
      <Reference
          Name = "Microsoft.Office.Interop.SmartTag"
          AssemblyName = "Microsoft.Office.Interop.SmartTag"
          HintPath = "..\..\..\..\..\WINDOWS\assembly\GAC\Microsoft.Office.Interop.SmartTag\11.0.0.0__71e9bce111e9429c\Microsoft.Office.Interop.SmartTag.dll"
      />
      
      
    4. Save and close the file.

    5. Open the SecureDoc project in Microsoft Visual Studio .Net 2003.

  7. Enable Web Services Enhancements for this Visual Studio project, by performing the following steps:

    1. In the Solution Explorer pane, right-click SecureDoc, and select WSE Settings 2.0.

    2. In the resulting dialog box, click the General tab, and select Enable this project for Web Service Enhancements.

    3. Click OK.

      This adds Microsoft.Web.Services2.dll to your reference list.

  8. Generate the secure Web service proxy, by adding a Web reference to your EmpService Web service created using Oracle JDeveloper in Section 5.3.1.1, "Developing a Web Service in Oracle JDeveloper". To do this, perform the following steps:

    1. In the Solution Explorer pane, right-click References, and select Add Web Reference.

    2. In the Add Web Reference dialog box, enter the WSDL of the EmpService Web service. This is the URL of the WSDL file, shown at the end of the Web service creation in Oracle JDeveloper. You must append ?WSDL to this URL.

    3. Change the Web reference name to SecureWS, and click Add Web Reference.

    4. Double-click the SecureWS link in the Solution Explorer pane, and expand SecureDoc.SecureWS. You should see a file MyWebService1Wse.

  9. Create a class that implements the ISmartDocument interface. Right-click the project (SecureDoc), and click Add, and then Add Class. Name the class as SecureSmartDocument.cs. Copy the contents from Section A.6, "Contents of the SecureSmartDocument.cs File" into this file and save it.

  10. Build the project. A DLL file is created in the project_path/bin/debug directory.

  11. Copy the DLL file to the SecureSmartDocUtoken and SecureSmartDocX509 demonstration support folders on your computer, for example, C:\microsoft-interoperability-guide-demo-support\securingsmartdocs\SecureSmartDocUtoken\.

6.3.4 Attaching the XML Schema and the Expansion Pack to the Smart Document

To attach the XML schema and the XML expansion pack to the smart document that you copied in Section 6.3.1, "Copying the Demonstration Files", perform the following steps:

  1. Open the example document (SecureSmartDocument.doc) in the demonstration support folder on your computer, for example, C:\microsoft-interoperability-guide-demo-support\securingsmartdocs\SecureSmartDocUtoken\SecureSmartDocument.doc.

  2. From the Microsoft Word menu bar, click Tools, and then click Templates and Add-Ins.

  3. In the Templates and Add-ins dialog box, select the XML Schema tab.

  4. Click Schema Library.

  5. If there are schemas already attached, then select them and click Delete Schema.

  6. Click Add Schema, and select SecureDocument.xsd from the demonstration support folder, for example, C:\microsoft-interoperability-guide-demo-support\securingsmartdocs\SecureSmartDocUtoken. Name the schema SecureDoc, and click OK.


    Note:

    Alternatively, you can create a new XSD file, copy the code from Section A.5, "Contents of the SecureDocument.xsd File" into it, and save it as SecureDocument.xsd. You can then add this schema.

  7. Click OK.

  8. Select Show XML tags in the document in the XML Structure pane.

  9. Place the cursor just below the banner image, and select the report element from the XML Structure pane. When prompted, click Apply to Entire Document.

  10. Select the text Enter Name and click the name element in the XML Structure pane. The document should now look as shown in Figure 6-1.

    Figure 6-1 XML Structure of SecureSmartDocument.doc

    Description of Figure 6-1 follows
    Description of "Figure 6-1 XML Structure of SecureSmartDocument.doc"

  11. Save the document.

To attach the XML expansion pack to the smart document that you created in the preceding steps, perform the following steps:

6.3.4.1 Attaching the XML Expansion Pack

To attach the XML expansion pack, perform the following steps:

  1. Create an XML file called ManagedManifest.xml, and add the code from Example A-3, "ManagedManifest.xml for Chapter 6" to this file. Alternatively, you can use the ManagedManifest.xml file provided in the securingsmartdocs\SecureSmartDocUtoken demonstration folder.

  2. Attach the XML expansion pack to the document. To do this, perform the following steps:

    1. From the Microsoft Word menu bar, click Tools, and then click Templates and Add-Ins.

    2. In the Templates and Add-ins dialog box, select the XML Expansion Packs tab.

    3. Click Add and select ManagedManifest.xml from the demonstration support folder, for example, C:\microsoft-interoperability-guide-demo-support\securingsmartdocs\SecureSmartDocUtoken\ManagedManifest.xml.

6.3.4.2 Enabling Manifest Security Check

To enable manifest security check of the smart document manifest file, perform the following steps:

  1. Digitally sign the XML Expansion Pack with a trusted certificate using the XML Expansion Pack Signing Utility that comes with the Microsoft Office Smart Document SDK.

  2. Create a trusted certificate for signing using the makecert utility, by running the following command:

    makecert -r -n "CN=mansign" -sv mansign.pvk mansign.cer
    
    

    makecert.exe is part of the Microsoft Visual Studio .Net 2003 installation. You can skip Step 2 through Step 6 if you have an existing trusted certificate.

  3. Copy the certificate file (mansign.cer) and the private key file (mansign.pvk) to the demonstration support files directory, for example, C:\microsoft-interoperability-guide-demo-support\securingsmartdocs\certs.

  4. Install the certificate in the personal store by performing the following steps:

    1. Right-click the .cer file and select Install Certificate. The Certificate Import Wizard is displayed.

    2. Click Next.

    3. In the Certificate Store wizard dialog box, select Place all certificates in the following store and browse to the Personal store, and click OK.

    4. Click Next, and then click Finish.

  5. Verify that your certificate was stored successfully. See "Step 3: Checking If Your Certificate Was Stored Successfully". In the last step, verify that a certificate with the alias mansign exists.

  6. To make this certificate trusted, perform the following steps:

    1. In Windows, click Start, and then click Run.

    2. Enter mmc, and click OK. This starts the Microsoft Management Console (MMC) tool.

    3. Click Console Root, Certificates, and then click Trusted Root Certification Authorities.

    4. Right-click Certificates, All Tasks and click Import.

    5. In the Certificate Import Wizard, select mansign.cer.

    6. Click Next and then click Finish.

6.3.4.3 Signing the Manifest Using XMLSign.exe

To sign the manifest using XMLSign.exe, perform the following steps:

  1. Navigate to the C:\Program Files\Microsoft Office 2003 Developer Resources\Microsoft Office 2003 Smart Document SDK\Tools directory.

  2. Run the following command:

    xmlsign.exe -c mansign.cer -v mansign.pvk ManagedManifest.xml
    
    

    Where ManagedManifest.xml is the XML expansion pack of your smart document. XMLSign.exe is part of the Microsoft Office 2003 Smart Document SDK.

  3. Use the sn utility to compile the managed Smart Document assembly with a Strong Name, which consists of a simple text assembly name, a version number, culture information, public key, and a digital signature. Run sn as shown here:

    sn -k PSS_SmartDoc.snk
    
    

    sn.exe is part of the Microsoft Visual Studio .Net 2003 installation.

  4. In the AssemblyInfo.cs file of the SecureDoc visual project, set the AssemblyKeyFile attribute to point to the Strong Name key, as shown here:

    [assembly: AssemblyDelaySign(false)] [assembly: AssemblyKeyFile("C:\demos\certs\PSS_SmartDoc.snk")]  [assembly: AssemblyKeyName("")]
    
    

    Provide the absolute path to the PSS_SmartDoc.snk file.

  5. Rebuild your smart document project.

  6. Digitally sign the strong-named assembly, using the signcode utility. To do this, perform the following steps:

    1. Create an SPC file for signing, using cert2spc.exe, as follows:

      Cert2spc mansign.cer mansign.spc
      
      
    2. Using the signcode utility located at C:\Program Files\Microsoft.NET\SDK\v1.1\Bin, sign the smart document DLL, as follows:

      signcode /spc mansign.spc /v mansign.pvk C:/microsoft-interoperability-guide-demo-support/securingsmartdocs/SecureSmartDocUtoken/SecureDoc.dll
      
      

      Where SecureDoc.dll is the assembly for the secured document. signcode.exe is part of the Microsoft Visual Studio .Net 2003 installation.

6.3.5 Securing Communication Between the Smart Document and the Web Service

This section describes how you can secure communication between smart documents and Web services. This chapter describes two methods for securing communication between smart documents and Web services - Username token and X.509 token. This section contains the following subsections:

6.3.5.1 Securing the Web Service Proxy and the Web Service Using Username Token

You can use the username token to propagate user credentials to the Web service. If you choose this approach, users must perform authentication by entering their user name (optional) and password before using the Web service from within the smart document. The following two sections describe the steps to configure username token authentication:

6.3.5.1.1 Securing the Client Side

When giving access to confidential information, you must ensure that users are authenticated when they access a secure Web service. An authentication dialog box must be displayed to the user for entering valid credentials. To secure the client side, perform the following steps:

  1. Open Microsoft Visual Studio .Net 2003.

  2. Create a username token dialog class and add it to the visual project created in Section 6.3.3, "Creating the Smart Document DLL". Select the SecureDoc project in the Solution Explorer pane, and click Add, Add Class, and name it UsernameTokenDialog.cs.

  3. Copy the contents from Section A.7, "Contents of the UsernameTokenDialog.cs File" into this file.

  4. Integrate the smart document with the Web service proxy and pass the user name and password extracted in the previous step.

    In Microsoft Visual Studio .Net 2003, add the code shown in Example 6-1 to the onTextboxContentChange() method in your smart document class created in Section 6.3.3, "Creating the Smart Document DLL".

    Example 6-1 Code to Add to the onTextboxContentChange() Method (Username Token)

    {
     
       if (Value.Length > 0) 
       {
          String subName = Environment.UserName;
     
          UsernameTokenDialog dialog = new UsernameTokenDialog();
          String uname = null;
          String pwd = null;
     
          dialog.setDefaultUsername(subName);
    
          if (dialog.ShowDialog() == DialogResult.OK) 
          {
             uname = dialog.getUsername();
             pwd = dialog.getPassword();
          }
    
          if (uname == null || pwd == null) 
          {
             System.Windows.Forms.MessageBox.Show("Missing username / password ");
          } 
          else 
          {
    
             SecureDoc.SecureWS.MyWebService1Wse proxy = new SecureDoc.SecureWS.MyWebService1Wse();
     
             UsernameToken utoken = new UsernameToken(uname, pwd, PasswordOption.SendPlainText);
    
             // Add the UsernameToken token to the SOAP message.
             proxy.RequestSoapContext.Security.Tokens.Add(utoken);
     
             String res = proxy.getAddress(uname);
    
             Console.WriteLine("response : " + res);
             Console.ReadLine();
     
             System.Windows.Forms.MessageBox.Show(res);
     
             String result = res;
     
             Microsoft.Office.Interop.Word.Range objRange = (Microsoft.Office.Interop.Word.Range)Target;
             objRange.InsertAfter(result);
    
          }
       }
    }
    
    
  5. Rebuild the project to generate an updated DLL, and copy it to C:\microsoft-interoperability-guide-demo-support\securingsmartdocs\SecureSmartDocUtoken.

6.3.5.1.2 Securing the Web Service on the Server Side

To secure the Web service on the server side, perform the following steps:

  1. Open the Web service generated using Oracle JDeveloper.

  2. Right-click MyWebService1 and select Secure Web Service. This displays a wizard.

  3. Select authentication option as Text Password.

  4. Select the Authentication tab under Security, and select Expect Username token to Authenticate.

  5. In the Application Navigator, right-click the MyWebService1 node, and select Run. Oracle JDeveloper automatically deploys the service to its embedded OC4J container.

  6. Copy the URL in the console window, paste it in the Address field in a new Internet Explorer window, and press Enter.

    The resulting page displays the running Web service.

  7. Add a user entry in the system-jazn-data.xml file by performing the following steps:

    1. Stop the embedded OC4J server by clicking Run, Terminate, and then Embedded OC4J Server.

    2. Navigate to the JDEV_HOME/Jdev/mywork/MSOffice directory and open the MSOffice-jazn-data.xml file for editing.

    3. Enter the following user entry under the <users> tag:

      <user>
          <name>jcooper</name>
          <display-name>Smart document user </display-name>
          <description>Smart document user</description>
          <credentials>!password</credentials>
      </user>
      

      Note:

      The user name and password should be the same username and password that the client sends.

  8. Restart the OC4J Server.

  9. Select MyWebService1 and click Run.

6.3.5.2 Securing the Web Service Proxy and the Web Service Using X.509 Token

You can use X.509 token for propagating the user credentials to the Web service. If you choose this approach, a Public Key Infrastructure (PKI) trust has to be set up before exchanging the X.509 token. The following sections describe the steps to configure X.509 token authentication:

6.3.5.2.1 Generating and Deploying Public and Private Keys

Public Key Infrastructure (PKI) enables an organization to secure its communications and business transactions by using digital certificates that are exchanged between authenticated users and trusted resources. A private key is required for the current user that is used to sign the client message, and a public key is required that is used by the OC4J Web service for verifying signature and asserting identity. The procedure for deploying PKI to secure smart documents includes the following high-level steps:

Step 1: Creating X.509 Certificate and Corresponding Private Key File

To create an X.509 certificate and corresponding private key (pvk) file, perform the following steps:

  1. Run the makecert utility as follows:

    makecert -r -n %alias% -sv  %pvkfilename%  %cerfilename%
    
    

    where alias is the alias of your certificate. For example, if the identity of the user logging in to the Windows system is jcooper, then create a certificate with alias CN=jcooper.

    For example:

    makecert -r -n "CN=jcooper" -sv  jcooper.pvk jcooper.cer
    
    
  2. In the Create Private Key Password dialog box, specify and confirm the password as oc4jnetsign, and click OK.

  3. Create the SPC file needed to create the PFX file by running the following command:

    Cert2spc.exe jcooper.cer jcooper.spc
    
    

    This creates a jcooper.spc file.

  4. Create the P12 file from the PVK and SPC files by running the following command:

    Pvkimprt.exe -pfx jcooper.spc jcooper.pvk
    
    
  5. In the Enter Private Key Password dialog box, enter the oc4jnetsign password, and click OK.

  6. The Certificate Export Wizard is displayed, which starts creating the PFX file from the certificate and the associated private key for this. Click Next.

  7. Click Yes to export the private key with the certificate.

  8. In the Export File Format wizard dialog box, shown in Figure 6-2, ensure that the Enable strong protection option is not selected, and click Next.

    Figure 6-2 Export File Format

    Description of Figure 6-2 follows
    Description of "Figure 6-2 Export File Format"

  9. In the Password wizard dialog box, enter the password that you specified earlier (oc4jnetsign), confirm the same, and click Next.

  10. In the File to Export wizard dialog box, shown in Figure 6-3, specify the file name as oc4jnetp12.pfx and store it in the C:\microsoft-interoperability-guide-demo-support\securingsmartdocs\SecureSmartDocX509\Certificate folder. Click Next.

    Figure 6-3 File to Export

    Description of Figure 6-3 follows
    Description of "Figure 6-3 File to Export"

  11. In the Certificate Store wizard dialog box, select Place all certificates in the following store. Click Browse and select Personal.

  12. In the Completing the Certificate Export Wizard dialog box, click Finish.

Step 2: Installing the Private Key Certificate

To install the private key certificate in the Windows key store, perform the following steps:

  1. Right-click oc4jnetp12.pfx and click Install PFX. This displays the Certificate Import Wizard.

  2. Click Next. The File to Import wizard dialog box shows the oc4jnetp12.pfx file already selected, as shown in Figure 6-4.

    Figure 6-4 File to Import

    Description of Figure 6-4 follows
    Description of "Figure 6-4 File to Import"

  3. Click Next.

  4. In the Password wizard dialog box, enter the password that you specified when creating the certificate (oc4jnetsign), and then click Next.

  5. In the Certificate Store wizard dialog box, specify the certificate store to be Personal, and click Next.

  6. In the Completing the Certificate Import Wizard dialog box, click Finish.

Step 3: Checking If Your Certificate Was Stored Successfully

To check if your certificate was stored successfully, perform the following steps:

  1. In Windows, click Start, and then click Run.

  2. Enter mmc, and click OK. This starts the Microsoft Management Console (MMC) tool.

  3. Click Console, and then click Add/Remove Snap-in.

  4. In the Standalone tab, click Add.

  5. In the Add Standalone Snap-in dialog box, shown in Figure 6-5, double-click Certificates.

    Figure 6-5 Add Certificates Snap-In

    Description of Figure 6-5 follows
    Description of "Figure 6-5 Add Certificates Snap-In"

  6. In the Certificates snap-in dialog box, select My user account, and then click Finish.

  7. In the Add Standalone Snap-in dialog box, click Close.

  8. In the Add/Remove Snap-in dialog box, click OK.

  9. Click Console Root, Certificates, Personal and then Certificates. In this example, the alias name should be jcooper.

Step 4: Using X.509 Certificate Tool for Viewing the Certificate

To see the key identifier of a particular certificate, you must use the X.509 Certificate Tool that is installed along with Web Service Enhancements 2.0. To view the certificate, perform the following steps:

  1. Start the X.509 Certificate Tool. Click Start, Programs, Microsoft WSE 2.0, and then X509 Certificate Tool.

  2. Specify Personal as the Store Name.

  3. Click Open Certificate, and select jcooper.

Step 5: Importing the Public Key Certificate for Verifying Signature

To import the public key certificate from oc4jnet12.pfx to a Java keystore for verifying the signature, use the keytool utility as follows:

keytool -import -alias jcooper -file jcooper.cer -keypass jcooper -keystore myks.jks -storepass password

6.3.5.2.2 Securing the Client Side

To secure the client side, perform the following tasks:

  1. Generate the private key and public key certificate for the Windows user as described in Section 6.3.3, "Creating the Smart Document DLL".

  2. Integrate the smart document with the Web service proxy and pass the certificate created in Section 6.3.3, "Creating the Smart Document DLL".

    In Microsoft Visual Studio .Net 2003, add the code shown in Example 6-2 to the onTextboxContentChange() method in your smart document class created in Section 6.3.3, "Creating the Smart Document DLL":

    Example 6-2 Code to Add to the onTextboxContentChange() Method (X.509 Token)

    {
       if (Value.Length > 0) 
       {
          String subName = Environment.UserName;
    
          SecureDoc.SecureWS.MyWebService1Wse proxy = new SecureDoc.SecureWS.MyWebService1Wse();
    
          X509SecurityToken signtoken = RetrieveTokenFromStoreUsingSubName(subName);
    
          if (signtoken == null) 
          {
             throw new ApplicationException("Unable to obtain Sign security token.");
          }
    
          //Add the X.509 token 
          proxy.RequestSoapContext.Security.Tokens.Add(signtoken);
    
          //Sign the Body
          proxy.RequestSoapContext.Security.Elements.Add(new MessageSignature(signtoken)); 
    
          String res = proxy.getAddress(uname);
          Console.WriteLine("response : " + res);
          Console.ReadLine();
    
          System.Windows.Forms.MessageBox.Show(res);
     
          String result = res;
     
          Microsoft.Office.Interop.Word.Range objRange = (Microsoft.Office.Interop.Word.Range)Target;
          objRange.InsertAfter(result);
       }
    }
    public static X509SecurityToken RetrieveTokenFromStoreUsingSubName(string subName)
    {
       // Open the CurrentUser Certificate Store and try MyStore only
       X509CertificateStore store = X509CertificateStore.CurrentUserStore(X509CertificateStore.MyStore);
       X509SecurityToken token = null;
       try
       {
          if (store.OpenRead())
          {
             String modSubName = "CN="+subName;
             Console.WriteLine("Find certificate with Subject Name : " + modSubName);
             //Find certificate by Subject Name 
             X509CertificateCollection certs = store.FindCertificateBySubjectName(modSubName);
             if (certs.Count > 0)
             {
                // Get the first certificate in the collection
                token = new X509SecurityToken(((X509Certificate)certs[0]));
             }
          }
       }
       finally
       {
          if (store != null) 
          {
             store.Close();
          }
       }
       return token;
    }
    
    
  3. Rebuild the project to generate an updated DLL, and copy it to the demonstration support folder, for example, C:\microsoft-interoperability-guide-demo-support\securingsmartdocs\SecureSmartDocX509.

6.3.5.2.3 Securing the Web Service on the Server Side

To secure the Web service on the server side, perform the following steps:

  1. Open the Web service generated using Oracle JDeveloper.

  2. Right-click MyWebService1 and select Secure Web Service. This displays a wizard.

  3. Select authentication option as X.509 Digital Certificate.

  4. Edit the keystore options and configure it to use myks.jks that was created earlier.

    The keystore password is password.

6.3.5.3 Securing the Web Service using OWSM Gateway

The Web service can also be secured using OWSM Gateway. Refer to the Web Services Manager page on Oracle Technology Network (OTN), at http://www.oracle.com/technology/products/webservices_manager/index.html.

6.3.5.4 Integrating with Oracle Identity Management

This example illustrates integration with system-jazn-data.xml, which is a lightweight XML repository for storing user and role information. If you have Oracle Identity Management (OID/SSO, COREid) and you want to integrate your Web service with Oracle Identity Management, refer to the chapter describing administering Web Services security in Oracle Application Server Web Services Security Guide.

6.3.6 Testing the Smart Document Configuration

This section describes the steps to test the smart document security configuration.

To test the smart document with Username token:

  1. Open the smart document from the demonstration support folder, for example, C:\microsoft-interoperability-guide-demo-support\securingsmartdocs\SecureSmartDocumentUtoken\SecureSmartDocument.doc.

  2. Click Name, and enter your name.

    A username token dialog box is displayed.

  3. Enter password and click OK.

    You should see the address printed on the document.

To test the smart document with X.509:

  1. Open the smart document from the demonstration support folder, for example, C:\microsoft-interoperability-guide-demo-support\securingsmartdocs\SecureSmartDocumentX509\SecureSmartDocument.doc file.

  2. Click Name, and enter your name.

    You should see the address printed on the document.

6.4 Related Documentation

Oracle Application Server Web Services Security Guide