|
JSSE providers follow general JCE guidelines, and are pluggable into the provider-based JCA architecture. As a result, they may be configured in the java.security file, or added in code just like other security providers. Consequently, if a JCE provider, implementing the same algorithms as a JSSE one, is configured higher (i.e. it has a lower ordinal number -- see JCE Providers Configuration) in the crypto providers list than the JSSE provider, JSSE operations will use the JCE provider's implementations instead of the built-in ones. Note, however, that the JSSE cryptography algorithm implementations are private and not available for public usage. Also, as a departure from the usual provider model due to export restrictions, the default SSLSocketFactory and SSLServerSocketFactory cannot be replaced.
In JDK 1.4.2, Sun provides a reasonably good reference JSSE implementation named "SunJSSE," whose features are highlighted below. For the complete list, check the JSSE guide.
API and implementations of SSL 3.0 and TLS 1.0 algorithms.
Stream-based I/O classes: SSLSocket and SSLServerSocket.
One-way and mutual authentication. Certificate management is required and key and trust stores on both client and server should be set up appropriately.
Implementation of HTTPS. Actually, JSSE services can be applied to many application-level protocols, such as RMI, FTP, LDAP, etc.
Internal implementations for some cryptography algorithms.
Read-only implementation of PKCS#12 keystore, in addition to the default Java KeyStore (JKS).
Key and trust store management. For easier control, JSSE defines several system properties to control behaviors of appropriate classes from the command line.
The following properties (all starting with javax.net.ssl) may be specified on the command line or set in code: keyStore, keyStorePassword, keyStoreType, trustStore, trustStorePassword, and trustStoreType. For example:
java -Djavax.net.ssl.trustStore=AppTrustStore SecureApp
Java applications using RMI communication are pretty much limited to using JSSE for protection. Sun is working on separate specifications for secure RMI, which will include authentication, confidentiality, or integrity mechanisms, but they are not going to be available any time soon -- the JSR 76 "RMI Security for J2SE" was rejected in February 2001. Custom solutions are possible (such as subclassing SSLServerSocket), but they are non-trivial.
The J2EE specification promotes usage of SSL/TLS across all of its components by mandating support for the following ciphers:
TLS_RSA_WITH_RC4_128_MD5
SSL_RSA_WITH_RC4_128_MD5
TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA
SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA
TLS_RSA_EXPORT_WITH_RC4_40_MD5
SSL_RSA_EXPORT_WITH_RC4_40_MD5
TLS_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA
SSL_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA
In most cases, cipher suites will be either SSL_RSA_WITH_RC4_128_SHA or SSL_RSA_WITH_RC4_128_MD5 (or their TLS equivalents), as they are currently the strongest commonly used SSL ciphers.
The servlet specification defines the transport-guarantee element in the deployment descriptor, which is used to require a certain level of call protection from the servlet container. Possible values are: NONE, INTEGRAL, and CONFIDENTIAL, and can be specified in the /WEB-INF/web.xml file. The names for the constraints are pretty self-descriptive, and implementation interpretation is left at the vendor's discretion. However, the servlets have an option to programmatically reject a HTTP connection if the HttpRequest.isSecure method shows that the connection is not secure. Below is an example of specifying the transport guarantee element:
<security-constraint>
<user-data-constraint>
<transport-guarantee>
CONFIDENTIAL
</transport-guarantee>
</user-data-constraint>
</security-constraint>
EJBs do not have an option to determine connection's security settings. EJB specifications, however, require passive support for remote calls' security; i.e., if a call is made using a secure connection, EJB server also uses a secure connection for further calls. Remote EJB calls use the IIOP protocol, with support for SSL 3.0 and TLS 1.0 support mandated by EJB 2.0 and J2EE specifications.
Note: Besides IIS, .NET does not offer any standard means for communication protection at the platform level, while Java has a complete solution in this space. |
|