Network client security
The Derby Network
Client allows you to select a security mechanism by specifying a value for
the securityMechanism property.
You can set the securityMechanism
one of the following ways:
Security mechanisms supported by the Derby Network Client
- When you are using the DriverManager interface, set securityMechanism in
a java.util.Properties object before you invoke the form
of the getConnection method, which includes the java.util.Properties parameter.
- When you are using the DataSource interface to create
and deploy your own DataSource objects, invoke the DataSource.setSecurityMechanism method
after you create a DataSource object.
the security mechanisms that the Derby
Client supports, and the corresponding property value to specify to obtain
this securityMechanism. The default security mechanism is the user id only
if no password is set. If the password is set, the default security mechanism
is both the user id and password. The default user is APP if no other user
Table 1. Security mechanisms
supported by the Derby Network Client
|Security and mechanism
||securityMechanism property value
|User id and password
||ClientDataSource. CLEAR_TEXT_PASSWORD_SECURITY (0x03)
||Default if password is set
|User id only
||ClientDataSource. USER_ONLY_SECURITY (0x04)
||Default if password is not set
|Encrypted user id and encrypted password
||ClientDataSource. ENCRYPTED_USER_AND_ PASSWORD_SECURITY
||Encryption requires a JCE implementation that supports
the Diffie-Helman algorithm with a prime of 32 bytes.