3 Advanced Features : Using Security

Using Security
The drivers support the following security features:
■
Authentication is the process of identifying a user.
■
Data encryption is the conversion of data into a form that cannot be easily understood by unauthorized users.
For current information, refer to the security matrix on the Progress DataDirect Web site:
http://www.datadirect.com/products/security/documentation/securitymatrix.htm
Authentication
On most computer systems, a password is used to prove a user's identity. This password often is transmitted over the network and can be intercepted by malicious hackers. Because this password is the one secret piece of information that identifies a user, anyone knowing a user's password can effectively be that user. Authentication methods protect the identity of the user.
The drivers support the following authentication methods:
■
User ID/password authentication authenticates the user to the database using a database user name and password.
■
Kerberos is a trusted third-party authentication service. The drivers support both Windows Active Directory Kerberos and MIT Kerberos implementations for DB2, Oracle, and Sybase. For Microsoft SQL Server, the driver supports Windows Active Directory Kerberos only.
■
Client authentication uses the user ID of the user logged onto the system on which the driver is running to authenticate the user to the database. The database server relies on the client to authenticate the user and does not provide additional authentication.
■
NTLM authentication is a single sign-on OS authentication method.
Table 3-4 and Table 3-5 describe the authentication methods supported by the drivers.
User ID/
Password
X
X
X
X2
X

1
For DB2, Oracle, and Sybase, the drivers support the Windows Active Directory KDC and MIT Kerberos KDC. For Microsoft SQL Server, the driver supports the Windows Active Directory KDC only.

2
Supported for Microsoft SQL Server 2000 and higher.

User ID/
Password
See the appropriate driver chapter for details about configuring authentication. See “Required Permissions for the Java 2 Platform” for information about granting permissions for Kerberos authentication.
Data Encryption Across the Network
If your database connection is not configured to use data encryption, data is sent across the network in a format that is designed for fast transmission and can be decoded by interceptors, given some time and effort. For example, text data is often sent across the wire as clear text. Because this format does not provide complete protection from interceptors, you may want to use data encryption to provide a more secure transmission of data. For example, you may want to use data encryption in the following scenarios:
■
■
■
NOTE: Data encryption may adversely affect performance because of the additional overhead (mainly CPU usage) required to encrypt and decrypt data.
The drivers support the following encryption methods:
■
Database-specific encryption (DB2 for Linux/UNIX/Windows and DB2 for z/OS only). DB2 defines its own encryption protocol. See “Data Encryption” for information about configuring DB2 encryption.
■
Secure Sockets Layer (SSL). SSL is an industry-standard protocol for sending encrypted data over database connections. SSL secures the integrity of your data by encrypting information and providing client/server authentication.
Table 3-6 and Table 3-7 describe the data encryption methods supported by the drivers.
X
X
X

1
Supported for V9.1 Fixpack 2 and higher for Linux/UNIX/Windows.

2
Supported for DB2 V9.1 for z/OS.

3
Supported for DB2 V5R4 and higher for iSeries.

4
Supported for Microsoft SQL Server 2000 and higher.


1
By default, all communication using the Salesforce driver is SSL-encrypted.

SSL Encryption
SSL works by allowing the client and server to send each other encrypted data that only they can decrypt. SSL negotiates the terms of the encryption in a sequence of events known as the SSL handshake. The handshake involves the following types of authentication:
■
SSL server authentication requires the server to authenticate itself to the client.
■
SSL client authentication is optional and requires the client to authenticate itself to the server after the server has authenticated itself to the client.
NOTE: DB2, MySQL, and Oracle are the only databases supported by the drivers that support SSL client authentication.
The version of SSL that is used and which SSL cryptographic algorithm is used depends on which JVM you are using. Refer to your JVM documentation for more information about its SSL support.
See the appropriate driver chapters for details about configuring SSL.
SSL Server Authentication
When the client makes a connection request, the server presents its public certificate for the client to accept or deny. The client checks the issuer of the certificate against a list of trusted Certificate Authorities (CAs) that resides in an encrypted file on the client known as a truststore. Optionally, the client may check the subject (owner) of the certificate. If the certificate matches a trusted CA in the truststore (and the certificate’s subject matches the value that the application expects), an encrypted connection is established between the client and server. If the certificate does not match, the connection fails and the driver throws an exception.
To check the issuer of the certificate against the contents of the truststore, the driver must be able to locate the truststore and unlock the truststore with the appropriate password. You can specify truststore information in either of the following ways:
■
java -Djavax.net.ssl.trustStore=C:\Certificates\MyTruststore
and
java -Djavax.net.ssl.trustStorePassword=MyTruststorePassword
This method sets values for all SSL sockets created in the JVM.
■
TrustStore=C:\Certficates\MyTruststore
and
TrustStorePassword=MyTruststorePassword
Any values specified by the TrustStore and TrustStorePassword properties override values specified by the Java system properties. This allows you to choose which truststore file you want to use for a particular connection.
Alternatively, you can configure the drivers to trust any certificate sent by the server, even if the issuer is not a trusted CA. Allowing a driver to trust any certificate sent from the server is useful in test environments because it eliminates the need to specify truststore information on each client in the test environment. If the driver is configured to trust any certificate sent from the server, the issuer information in the certificate is ignored.
SSL Client Authentication (DB2, MySQL, and Oracle)
If the server is configured for SSL client authentication, the server asks the client to verify its identity after the server has proved its identity. Similar to SSL server authentication, the client sends a public certificate to the server to accept or deny. The client stores its public certificate in an encrypted file known as a keystore.
The driver must be able to locate the keystore and unlock the keystore with the appropriate keystore password. Depending on the type of keystore used, the driver also may need to unlock the keystore entry with a password to gain access to the certificate and its private key.
The drivers can use the following types of keystores:
■
Java Keystore (JKS) contains a collection of certificates. Each entry is identified by an alias. The value of each entry is a certificate and the certificate’s private key. Each keystore entry can have the same password as the keystore password or a different password. If a keystore entry has a password different than the keystore password, the driver must provide this password to unlock the entry and gain access to the certificate and its private key.
■
PKCS #12 keystore contains only one certificate. To gain access to the certificate and its private key, the driver must provide only the keystore password. The file extension of the keystore must be .pfx or .p12.
You can specify this information in either of the following ways:
■
java -Djavax.net.ssl.keyStore=C:\Certificates\MyKeystore
and
java -Djavax.net.ssl.keyStorePassword=MyKeystorePassword
This method sets values for all SSL sockets created in the JVM.
NOTE: If the keystore specified by the javax.net.ssl.keyStore Java system property is a JKS and the keystore entry has a password different than the keystore password, the KeyPassword connection property must specify the password of the keystore entry. For example:
KeyPassword=MyKeyPassword
■
KeyStore=C:\Certficates\MyKeyStore
and
KeyStorePassword=MyKeystorePassword
NOTE: If the keystore specified by the KeyStore connection property is a JKS and the keystore entry has a password different than the keystore password, the KeyPassword connection property must specify the password of the keystore entry. For example:
KeyPassword=MyKeyPassword
Any values specified by the KeyStore and KeyStorePassword properties override values specified by the Java system properties. This allows you to choose which keystore file you want to use for a particular connection.