Chapter 5 Using SSL in Java Clients
The Java Secure Socket Extension (JSSE) is a set of Java packages that implements SSL and Transport Layer Security, which enables data encryption, server authentication, message integrity, and client authentication. JSSE is a client-side feature, which can be used with EAServer when it has been configured for SSL communication. For more information on SSL, see Chapter 12, "Managing Keys and Certificates".
Setting up your JSSE environment
security.provider.2=com.sun.net.ssl.internal.ssl.Provider
keytool -import -file eas.crt -keystore /JDK/jre/lib/security/ [cacerts | jssecacerts] -trustcacertsTo simplify things, use the default certificate store cacerts; the password is "changeit".
set classpath=%JAGUAR%\java\lib\easclient.jar; \ %JAGUAR%\java\lib\easj2ee.jar;%classpath% java -Djava.protocol.handler.pkgs= com.sun.net.ssl.internal.www.protocol ClientApp
iiops://localhost:9001, or iiops://<host_name>:9001
http://<host_name>:8080/jssehtml/yourAppClient.htmlWhere yourAppClient.html is your HTML applet client.
iiops://<host_name>:9001
as
the connection parameter, and click Connect.
Sybase recommends using a Web browser that supports the Java Plug-in 1.3.1 or higher and the Java Plug-in Converter 1.3.1 or higher
Direct IIOP connections using JSSE are not supported.
Tunnelling IIOP through HTTPS (JSSE socket) using HTTP GET requests
IIOP is contained within the HTTP packets.
Property | Vale |
---|---|
org.omg.CORBA.ORBClass | com.sybase.CORBA.ORB |
com.sybase.CORBA.https | true |
com.sybase.CORBA.useJSSE | true |
com.sybase.CORBA.forceSSL | true |
Tunnelling IIOP through HTTPS (JSSE socket) using HTTP POST requests
IIOP is contained within the HTTP packets.
Property | Vale |
---|---|
org.omg.CORBA.ORBClass | com.sybase.CORBA.ORB |
com.sybase.CORBA.https | true |
com.sybase.CORBA.useJSSE | true |
com.sybase.CORBA.forceSSL | true |
com.sybase.CORBA.HttpUsePost | true |
Tunnelling IIOP through an HTTPS connect (JSSE socket) using HTTP GET requests
IIOP is contained within the HTTP packets.
Property | Vale |
---|---|
org.omg.CORBA.ORBClass | com.sybase.CORBA.ORB |
com.sybase.CORBA.https | true |
com.sybase.CORBA.WebProxyHost | <web_proxy_host_name> |
com.sybase.CORBA.WebProxyPort | <web_proxy_port> |
com.sybase.CORBA.useJSSE | true |
com.sybase.CORBA.forceSSL | true |
Tunnelling IIOP through an HTTPS connect (JSSE socket) using HTTP POST requests
IIOP is contained within the HTTP packets.
iiops://<host_name>:9001.
Property | Vale |
---|---|
org.omg.CORBA.ORBClass | com.sybase.CORBA.ORB |
com.sybase.CORBA.https | true |
com.sybase.CORBA.HttpUsePost | true |
com.sybase.CORBA.WebProxyHost | <web_proxy_host_name> |
com.sybase.CORBA.WebProxyPort | <web_proxy_port> |
com.sybase.CORBA.useJSSE | true |
com.sybase.CORBA.forceSSL | true |
The first time you connect may take a while because JSSE goes through an SSL authentication process.
When using an unsigned JAR, your code runs with the default Security Manager plug-in, which is fairly restrictive. To improve performance, you can edit Java's default security policy file using the instructions in Sun's security documentation. To enable EAServer's ORB to work in an unsigned environment:
permission java.util.PropertyPermission "*", "read"
permission java.util.PropertyPermission "javaplugin.proxy.config.*", "read"
keytool -import -file <file_name> -keystore [cacerts | jssecacerts]The password for the cacerts keystore is "changeit".
With a signed applet, you do not need to set permissions at the plug-in level. A signed JAR file describes the type of permissions it requires.
You can find a sample JDK 1.3 security file in jdk13/jre/lib/security/java.security.
If you cannot load an HTML applet from your Web browser:
If necessary, use the Java Plug-in console for debugging; set to debug level 5. If you reset the debug level, refresh the HTML applet.
Copyright © 2002 Sybase, Inc. All rights reserved. |