Broadcast on Broadcast off
The Documentation for Project Zero has moved. Please update your bookmarks to: http://www.projectzero.org/documentation/
Table of
Contents...
Hide

Project Zero Developer’s Guide

Concepts and components
Basic concepts overview
Event processing
Writing Java handlers
Writing Groovy handlers
Firing events
Global Context
Global Context reference
Application directory layout
Virtualized directories
Assemble
PHP
Features and configuration
Configuration
Debugging
Dependencies
Packaging
Application classpath
Logging and tracing
RESTful resources
RESTful documentation
File serving
Response rendering
Validators and validation
HTTP error handling
Calling a remote resource
Using the Connection API
Sending an email using EmailConnection
Configuring destinations
Configuring protocols
Configuring connection handlers
Creating a connection handler
Creating a custom protocol transport
Simple logging connection handlers
Protocol reference
Client programming with Dojo
Runtime options
Deployment modifications
HTTP configuration
SSL configuration
Proxy configuration
Extending the CLI
Security considerations
Authentication
OpenID authentication
Extending security
Security tokens
CSRF prevention support
Extending token support
Leveraging TAI
User service
File based user service
LDAP user service
Extending user service
Security Utilities
Leveraging XOREncoder
Extensions
Atom support
RSS support
JSON support
XMLEncoder
REST to SOAP extension
URIUtils
Developer Web tools
Database setup tools
Configuring data access
Common query patterns
Advanced query patterns
Update patterns
Local database transactions
Extending data access
Configuration vendor differences
PHP data access
Resource model
Configuring ZRM
Resource model declaration
Programmatic model API
HTTP REST API
A ZRM mini tutorial
Active content filtering support
Default filters
Custom filters
Runtime management
Management commands
Zero socket opener
Other extension modules
Amazon E-commerce service
Flickr service
WeatherZero forecast service
Wikipedia service
Reference
Zero command line interface
JavaDoc - Public API
JavaDoc - Public SPI
JavaDoc - All Classes

 

SSL configuration

In addition to the HTTP protocol, a Project Zero application can also be enabled for communicating with clients over HTTPS. This function is enabled by adding a [/config/https] section to your zero.config file. The following sections of this article provide information about SSL configuration:

SSL configuration reference

The following table lists the parameters and values required to enable HTTPS:

Key Description Optional
port The port number for connecting over HTTPS to the application. Enables processing of other HTTPS parameters. No
keyStore The location of the key store file containing the private SSL keys and certificates for the application. No
keyStorePassword The password for accessing the key store. XOR strings are allowed. See Leveraging XOREncoding for more information. No
keyStoreType The type of file used for the key store. See the Key store types section for more information. No
trustStore The location of the trust store file containing the public SSL keys and certificates for the application. Yes
trustStorePassword The password for accessing the trust store. XOR strings are allowed. See Leveraging XOREncoding for more information. No, if trustStore is set
trustStoreType The type of file used for the key store. See the Key store types section for more information. No, if trustStore is set

Key stores and trust stores

When configuring HTTPS, a key store must be defined. The key store must contain the private keys the Project Zero application will use when negotiating a new HTTPS connection with a client.

Trust stores normally contain the public keys used by the server to negotiate a connection with a client. If a trust store is not defined, then the public keys must also be stored within the defined key store. The defined key store is used as both the source for the private and public encryption keys.

Most application development and testing occurs with privately created and signed encryption keys in which only the keyStore values are necessary. When a certificate is obtained from a commercial certificate authority, they supply both the key store and trust store files.

Key store types

Project Zero uses the JSSE (Java Secure Socket Extension) implementation provided by the runtime JDK. Therefore, Project Zero supports all of the key types of the underlying JSSE implementation. JSSE became a standard extension to J2SE in Java 2 Standard Edition 5.0.

The exact key types supported by the JSSE implementation vary between JDK vendors, however the most common key types are JKS (Java Key Store) and PKCS12 (Personal Information Exchange Syntax Standard).

For more information on the key types supported by a specific JDK, see the JSSE documentation of the vendor.

The following JSSE documentation links show documentation provided by some vendors:

Example SSL configuration

The following an example is from a zero.config file that is ocated in module myApp, in which HTTPS has been enabled.

/config/https/port = 8443
/config/https/keyStore = "config/myKeyStore.p12"
/config/https/keyStorePassword = "<xor>JTotMA=="
/config/https/keyStoreType = "PKCS12" 

In this example, there is no trust store and only a key store is used. The password for the key store has been encoded using the XOR encoder command. For more information on the XOR encoder command, see the Leveraging XOREncoding article.

After adding this configuration to an application, the application can be accessed over HTTPS using the following URL:

https://localhost:8443/

Creating an SSL certificate

There are many tools for creating and managing SSL certificates and keys. Any tools that support the creation of certificates in which the types match the supported types of the underlying JDK JSSE implementation can be used.

Two of the most common SSL key management tools for Java developers are IBM's IKeyman and Sun's keytool, both of which are distributed with their respective JDKs.

For examples of creating certificates and keys with these tools, see the following articles:

r17 - 08 Feb 2008 - 04:03:26 - steveims
Syndicate this site RSS ATOM
Copyright 2007 © IBM Corporation | Privacy | Terms of Use | About this site