![]() |
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
Compiling and Assembling the Sample Application
Deploying the Sample Application
Running the Sample Application
Troubleshooting
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.
- 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.
Check whether the signer of the certificate you installed on the server is one of the approved signers on the browser.
Click the security button. A new window should pop up from the left column.
Click on the signers.
On the Internet Explorer browser:
Click Tools -> Internet Options, and then click the Content tab.
Click Trusted Root Certification Authorities and check whether the CA exists from where you obtained the server certificate.
Compiling and Assembling the Sample Application
To compile and assemble the sample application:
- Go to <install_root>/plugins/java/samples/webapps/security/client-cert/src
- Deploy the application.
- After you have created the sample application from scratch, you can proceed to Deploying the Sample Application. Step 3 is optional.
- To clean the web application project area (optional), execute the following command:
ant clean
Deploying the Sample Application
To deploy the sample application: 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: Execute the following command: 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
Close all browser instances before you try logging in again; if you are using Netscape, you must also close the email session. Otherwise, it will pick up the session information from the previous logins and grant you access.
If you encounter problems when running the application, review the log files at <install_root>/<server-instance>/logs/errors to determine what went wrong.
Copyright © 2003 Sun Microsystems, Inc. All rights reserved.