Sun ONE logo    
Client Certificate Authentication Sample Application



Client Certificate Authentication Sample Application


This document describes how to use the Client Certificate Authentication sample application in conjunction with Sun ONE Web Server.

This sample application document contains the following sections:



Overview

The Client Certificate Authentication sample application is a collection of simple applications that demonstrate the use of the Java Servlet and JavaServer Pages (JSP) specifications.

The following instructions describe how to manually deploy the application. You may want to experiment by modifying and redeploying the sample.


Precompilation Tasks

Before you begin to compile and deploy the code, there are some housekeeping tasks that must be performed.


  1. For information about installing and managing the certificate, see the Sun ONE Web Server Administrator's Guide (Chapter 6, "Using Certificates and Keys").
    After installing the server and client certificates, you can build, deploy, and run the sample.



  2. Check whether the signer of the certificate you installed on the server is one of the approved signers on the browser.

On the Netscape browser:

On the Internet Explorer browser:

Compiling and Assembling the Sample Application



To compile and assemble the sample application:
  1. Go to <install_root>/plugins/java/samples/webapps/security/client-cert/src
    Execute the command ant.
     
    The default target 'default' will be executed to build the WAR file.
     
  2. Deploy the application.
    After you have created the sample application from scratch, you can proceed to Deploying the Sample Application. Step 3 is optional.
  1. To clean the web application project area (optional), execute the following command:

    ant clean

Deploying the Sample Application

To deploy the sample application:

  1. Go to the src directory of the sample:
    <install_root>/plugins/java/samples/webapps/security/client-cert/src
     
  2. Run ant using the deploy task:
    ant deploy
If you want to verify the registration of the application, proceed to Verifying Deployment. Otherwise, proceed to Running the Sample Application.

Verifying Deployment

As an optional step, you can use the Sun ONE Web Server Deploy Tool to verify that the application has been registered. Otherwise, proceed directly to Running the Sample Application.

  • Go to the src directory of the sample:
    <install_root>/plugins/java/samples/webapps/security/client-cert/src
  • Execute the following command:
    ant list_apps
    You will see the webapps-certificatebased-security module displayed as one of the listed components.
    Running the Sample Application

    You can run the application through the following URL:

    https://<Web_Server_hostname>:<port>/webapps-certificatebased-security


    Troubleshooting




    Copyright © 2003 Sun Microsystems, Inc. All rights reserved.