NOTE:
The information referenced below is specific to the out-of-the-box Strategy drivers. For 3rd party ODBC drivers, the relevant vendor's documentation should be consulted.
If there is no requirement to validate the certificate that is sent by the database server. Set EncryptionMethod=1 and ValidateServerCertificate=0.
odbc.ini example:
[Postgres]
ApplicationUsingThreads=1
AlternateServers=
Description=Strategy ODBC Driver for PostgreSQL Wire Protocol
FailoverPreconnect=0
FetchTWFSasTime=1
Driver=<driver_path>/MYpsqlXX.so
ConnectionRetryDelay=3
EnableDescribeParam=1
InitializationString=
FetchRefCursors=1
Database=database_name
QueryTimeout=0
HostName=ip_address
FetchTSWTZasTimestamp=1
ReportCodePageConversionErrors=0
FailoverMode=0
EncryptionMethod=1
TrustStore=
LoadBalancing=0
ConnectionRetryCount=0
ExtendedColumnMetaData=0
ValidateServerCertificate=0
XMLDescribeType=-10
LoginTimeout=15
TransactionErrorBehavior=0
FailoverGranularity=0
PortNumber=5432
HostNameInCertificate=
If there is requirement to validates the certificate that is sent by the database server. Set EncryptionMethod=1, ValidateServerCertificate=1, TrustStore=truststore_directory\filename. Specify TrustStorePassword and HostNameInCertificate if available.
odbc.ini example:
[Postgres]
ApplicationUsingThreads=1
AlternateServers=
Description=Strategy ODBC Driver for PostgreSQL Wire Protocol
FailoverPreconnect=0
FetchTWFSasTime=1
Driver=<driver_path>/MYpsqlXX.so
ConnectionRetryDelay=3
EnableDescribeParam=1
InitializationString=
FetchRefCursors=1
Database=database_name
QueryTimeout=0
HostName=ip_address
FetchTSWTZasTimestamp=1
ReportCodePageConversionErrors=0
FailoverMode=0
EncryptionMethod=1
TrustStore=truststore_directory\filename
TruststorePassword=truststore_password
LoadBalancing=0
ConnectionRetryCount=0
ExtendedColumnMetaData=0
ValidateServerCertificate=1
XMLDescribeType=-10
LoginTimeout=15
TransactionErrorBehavior=0
FailoverGranularity=0
PortNumber=5432
HostNameInCertificate=host_name
Below are the details for the parameters:
"EncryptionMethod" : specifies how the driver encrypts data that is sent between the driver and the database server. Generally, users have at least the following options:
"ValidateServerCertificate" : determines whether the driver validates the certificate that is sent by the database server when SSL encryption is enabled (Encryption Method=1). When using SSL server authentication, any certificate sent by the server must be issued by a trusted Certificate Authority (CA).
Truststore information is specified using the Trust Store and Trust Store Password options.
Truststore: The directory that contains the truststore file and the truststore file name to be used when SSL is enabled (Encryption Method=1) and server authentication is used. The truststore file contains a list of the valid Certificate Authorities (CAs) that are trusted by the client machine for SSL server authentication. If you do not specify a directory, the current directory is used.
TruststorePassword: The password that is used to access the truststore file when SSL is enabled (Encryption Method=1) and server authentication is used. The truststore file contains a list of the Certificate Authorities (CAs) that the client trusts.
HostNameInCertificate: A host name for certificate validation when SSL encryption is enabled (Encryption Method=1) and validation is enabled (Validate Server Certificate=1). This option provides additional security against man-in-the-middle (MITM) attacks by ensuring that the server the driver is connecting to is the server that was requested.
In order for the data to be encrypted using SSL on a UNIX/Linux environment, the odbc.ini file needs to be modified and the the "EncryptionMethod" parameter needs to be set to 1 and ValidateServerCertificate=0. Shown below is an example of the entry that needs to be added in the odbc.ini file when the database is PostgreSQL:
If server certificate need to be validated, set EncryptionMethod=1, ValidateServerCertificate=1 and specify TrustStore information. Specify TrustStorePassword and HostNameInCertificate if available.
For further information and details on specific encryption values that can be used for different databases, refer to the Strategy Installation and Configuration Guide found under Product Manuals.