About cookies on this site Our websites require some cookies to function properly (required). In addition, other cookies may be used with your consent to analyze site usage, improve the user experience and for advertising. For more information, please review your options. By visiting our website, you agree to our processing of information as described in IBM’sprivacy statement. To provide a smooth navigation, your cookie preferences will be shared across the IBM web domains listed here.
When implemented, CLI client will automatically pick up the certificate when there is only one. This RFE is prioritized for the next release after 11.5.9.
Based on discussions with different IBM parties, adding the below information to further clarify this requirement:
High-level requirement:
Enhance the Db2 Runtime Client driver with the functionality to auto-select an appropriate certificate, e.g. certA, from the list of available certificates, e.g. [certA, certB, certC], for client certificate authentication.
This enables the use of client certificates in large environments. Furthermore it aligns the behavior with the Db2 JDBC driver.
Requirement:
The Db2 Runtime Client currently supports SSL client authentication using certificates. It does this by utilizing a sslClientLabel (aka Friendly Name). This sslClientLabel needs to be set for the certificate and it needs to be set in the db2dsdriver.cfg configuration file.
This approach works on a technical level, but it requires individual configuration for every user. Furthermore, the required configuration changes break existing behavior of other applications. It is not manageable and not feasible for large, existing PKI environments.
In order to overcome this limitation the Db2 Runtime Client driver shall be enhanced with the functionality to auto-select an appropriate certificate from the list of available certificates (aligned with the behavior of the Db2 JDBC driver).
I.e. If no sslClientLabel is configured in the driver configuration, or if a specific keyword is set (e.g. SSLClientLabel = DB2_LOOKUP), then the Db2 Runtime Client driver shall pick one of the certificates that is currently available for authentication purposes.
The list of certificates as provided by gsk8capicmd_64.exe -cert -list -db mscng might be a suitable approach.
Java driver uses JDK for ssl implementation and Non-Java driver uses IBM gskit library for ssl implementation. JDK supports separate keystore and truststore. Hence it is possible to use keystore for storing client certificate and truststore for storing server cerificate. So JDK knows that the certificate present in keystore is the client certificate that need to be send during connection, hence no need to specify the clientlabel from a jdbc application.
But GSKit does not have separate trust store and keystore. There is only one keydb for storing both client certificate and server certificate. Hence it is mandatory for the non-jdbc application to identify the client certificate that need to be picked from keydb during connection using clientlabel keyword.
There are 2 possible solutions for your scenario. You could try one of the below.
1) Provide the same client label name(Eg:test) for all the users while adding/importing the certificate to the keydb. This way, all users can use the same db2dsdriver.cfg file where clientlabel will point to the same label name(Eg:test).
2) If there is a default friendly name(label) for the certificate added/imported to the keydb and If this default friendly name(label) is same for all users, you can specify this default friendly name(label) as clientlabel in db2dsdriver.cfg file and use the same db2dsdriver.cfg for all users.
Below is an example of a certificate with sample friendly name in keydb
- "cn=test user##13:0:0:94:5c:b2:1f:c3:cc:3a:7d:39:63:0:0:0:0:94:5c##CN=IBM Issuing CA,DC=IBM,DC=com"
The string before ## is the default friendly name. ie. cn=test user
You can use the below command to list certificates/label names
gsk8capicmd_64 -cert -list -db GSK_MS_CERTIFICATE_STORE