Sun GlassFish Mobility Platform 1.1 Developer's Guide for Client Applications

Chapter 3 Client Security Architecture

This chapter contains an overview of the Sun GlassFishMobility Platform client security features and describes how the Secure MusicDB application implements these features.

This chapter covers the following topics:

Client security must perform the following tasks:

Best Practices for Secure Client Applications

Developers of secure client applications should observe the following rules to obtain the best possible level of client security:

Authentication on the Client Device

There are two forms of authentication on the client device:

The Sun GlassFish Mobility Platform client library provides an API to validate an arbitrary length alphanumeric PIN against a PIN derivative stored on the device. The library also maintains a count of validation attempts (even across restarts of the application). If a threshold of failed attempts is exceeded (specified by the client application), data destruction and device lockout can occur.

Storing the PIN derivative and a count of validation attempts on the device is an obvious weakness in the security architecture, as this data could be easily subverted. Therefore, it is recommended that users follow the best practices outlined above to improve the overall security of the system.

Supplying the correct PIN allows users to access the application and perform local operations, but users will not be able to synchronize with the gateway unless they supply the proper username/password credentials for the gateway.

Authentication Implementation

Let:

	S = alphanumeric secret (random key sequence entered exactly once by user)
	S' = md5sum( S )
	P = alphanumeric PIN (entered by user every time)
	P' = md5sum( P )
	cipherText = encrypt( S, P' )
	persist { S', cipherText } on the device

Upon subsequent logins:

	P = PIN
	P' = md5sum( P )
	plainText = decrypt( cipherText, P' )
	if ( md5sum( plainText ) == S' )
		success
	else
		failure

Data Encryption

Data at rest on the mobile device is encrypted by using a digest of the PIN as the encryption key. There are four locations in the Sun GlassFish Mobility Platform client library where encryption and decryption must occur. In these locations, the library will invoke encrypt/decrypt callback methods that perform the tasks.

Transport-layer Security

Since data streaming in the SyncML protocol is simply base64 encoded XML and is therefore not secure, it is assumed that HTTPS will be used to provide transport-layer security.

Data Destruction

The Sun GlassFish Mobility Platform client library keeps track of how many times client applications attempt to validate a PIN against the PIN derivative stored on the device (even across application restarts). If the application exceeds the threshold specified by the application developer, the client library will erase all of the Sun GlassFish Mobility Platform records on the mobile device and prevent any further attempts to validate the PIN.

Lockout

The Sun GlassFish Mobility Platform client library keeps track of how much time has lapsed since the last synchronization attempt with the gateway. At the beginning of each synchronization, the client library calculates how much time has elapsed. If the time since the last synchronization exceeds the threshold specified by the application developer, then all Sun GlassFish Mobility Platform records can be erased from the device.

The library also maintains a count of validation attempts (even across restarts of the application). If a threshold of failed attempts is exceeded, both data destruction and lockout can occur.

Poison Pill

A Sun GlassFish Mobility Platform administrator can remotely trigger the destruction (wiping) of all the data on a particular device.

Data Fading

The client security implementation keeps track of how much time has elapsed since the last successful synchronization. The client application may specify a maximum quiet period after which the application may decide to activate the data destruction feature.

Secure MusicDB Java ME Application Security Features

The Secure MusicDB application demonstrates most of the security features described in this document: