And another thing...
Tim Quinn's Blog

Thursday Jan 26, 2006

Earlier I referred to a signed jar that is part of the GlassFish project's Java Web Start support. When the Java Web Start client downloads a signed jar, it prompts the user to accept (or reject) the certificate that was used to sign the jar file. This is true of one of the GlassFish jars that supports launching app clients using Java Web Start. The current GlassFish build creates a self-signed certificate that might make end-users nervous.

If you have a certificate backed by an authority, then you can use it to create a replacement signed jar that's functionally identical to the one in the GlassFish build but bears the name of your enterprise—which your end-users will probably feel more comfortable trusting. Thanks to Vince for his entry that nudged me to get this entry written.

(The process I'm about to describe will work just fine, although we would like to make it a little easier for you to do this. Stay tuned for any breaking news.)

After you build or install GlassFish, look in the lib subdirectory below the installation directory. Note the two files appserv-jwsacc.jar and appserv-jwsacc-signed.jar. The second is the first but signed with the GlassFish self-signed cert. If you have your own cert in a keystore, you can follow these steps to prepare your owned copy of the signed jar:

  1. cd to the lib subdirectory of the GlassFish installation directory.

  2. Copy the current signed jar to a safe alternate name.

  3. Use the jarsigner utility (part of Java SE) to sign the jar file with your cert, supplying the arguments relevant for your keystore in place of the terms in italics (all of this would be on a single line):

    jarsigner 
    -keystore your-keystore-filepath
    -storepass password-for-the-keystore
    -keypass password-for-your-secret-key
    -signedjar appserv-jwsacc-signed.jar
    appserv-jwsacc.jar alias-for-your-cert

Now, the Java Web Start client software will prompt your end-users to accept your own certificate when they launch an app client.

This is a good place to look for more information about managing keystores and certificates.

Comments:

Post a Comment:
  • HTML Syntax: NOT allowed