![]() |
|||
In the Java Web Server, security is based on the concept of realms. A realm defines protected resources on the server, users authorized to access the protected resources, and the mechanism (if any) by which those users will be authenticated. The Java Web Server provides several security realms. The certificateRealm, available only under the Secure Web Service, authenticates clients (users) through the use of client certificates--referred to as client authentication.
This document discusses the basic steps required to set up client authentication between a client and the Java Web Server. Some of those steps are performed on the client side, some are performed on the server side, as indicated below:
If your browser supports client authentication, it will provide a mechanism by which you can request a client certificate--typically, this mechanism is a form.
- Complete a certificate request following your browser's instructions. The browser will create a private key (data) and a public key (data) pair.
- Submit the request. The private key will be stored in the browser. The public key will be sent to the certificate signing authority, along with identifying information from your certificate request.
- Install the public certificate the certificate issuing authority will generate based on the public key you provided. (Follow the instructions provided with your browser for installing the public certificate.) It is this public certificate the browser will present when requested for client authentication by the server.
Note that certificate requests and the resulting certificate are specific to the type of browser from which the request was generated. For instance, the certificate generated by a Netscape Navigator certificate request form cannot be used in an Internet Explorer browser.
The Java Web Server needs the public copy of the client's public certificate, which it will store and use to validate requests received under that client's username.
- The client should forward a copy of the public certificate received from the certificate signing authority to the Java Web Server administrator.
Because the public certificate can be hard to extract from some browsers, clients may find it easier to provide the username under which they requested their client certificate and the name of their certificate issuing authority to the Java Web Server administrator.
The administrator can then search the certificate issuing authority's website using the username as the search string. This search should find a copy of the public version of the client certificate. Click on download and save it to a known location, possibly under the admin/ directory of the Java Web Server.
Note that the certificate must be in X.509 format. If it is in some other format, you will need to use some utility (such as SSLeay) to convert it to the X.509 format before proceeding to the next step.
The Java Web Server must store a copy of the client's public certificate. It is this certificate that will be used to authenticate submissions appearing to be sent by that user.
- Place the client certificate into the Java Web Server. The procedure for doing this is the same as the the general procedure for adding a user to a realm--in this case, the certificateRealm.
For instructions on completing the User screen, see the Administration Tool: Users online document.
- Log into the Administration Tool
- Select the Secure Web Service, then click the Manage button.
- On the resulting panel, click the Security button then select Users.
- On the Users panel, fill in the username. In the certificate field, simply type in the URL for the client certificate. (This can be http protocol for a remote location or the file protocol for a local location.)
Once a copy of the client's certificate is stored in the Java Web Server, the server must be told to use it for client authentication.
- Activate client authentication in the Java Web Server. This is an option available through the Administration Tool.
For a description of the screen where client authentication can be enabled, see the Administration Tool: Site Setup online document.
We mentioned at the beginning of this document that the resources being discussed are protected by Secure Sockets Layer (SSL) with HTTP -- this combination is referred to as the HTTPS protocol.
- Having completed the forgoing steps, the user can request any of the protected resources using an URL of the following form:
https://hostname:port/relative path to resource
For example:
https://www.sun.com:443/docs/membersonly.htmlThe request triggers the following chain of actions: the server responds to the client's request by requesting the client's certificate from the browser; the browser sends the requested certificate; the server compares the proffered certificate against the copy it has stored; if the two certificates match, access to the resource is granted -- if not, access is denied.
Top
java-server-feedback@java.sun.com
|
Copyright © 1999
Sun Microsystems, Inc. All Rights Reserved. |