Configuring TLS for the communication between primary and standby HADR servers
Transport Layer Security (TLS) can be used to encrypt communication between the primary and standby hosts.
Before you begin
- Configuring TLS on all instances
-
To use TLS for the transmission of transaction logs between HADR primary and standby, you need to configure Transport Layer Security (TLS) on all instances in HADR environment. The procedures are similar to the ones described in TLS configuration of Db2. In particular, the steps that describe how to set up your TLS key database and certificate must be done for all the instances. The steps for configuring the HADR environment by using a self-signed certificate are described in the following section.
Considerations for implementing TLS for HADR:- It is recommended to set SSL_VERSIONS and SSL_CIPHERSPECS configuration parameters to the same values on all HADR hosts.
- Specific cipherspecs may be unavailable depending on the FIPS mode of the HADR server. For more information, see ssl_cipherspecs - Supported cipher specifications at the server configuration parameter.
- HADR
peers can make outbound TLS encrypted connections that support both TLS 1.2 and TLS 1.3. The TLS
version that is chosen for the HADR connection is determined by the value that is set for the
Database Manager configuration parameter SSL_VERSIONS on the HADR peer that is
accepting the connection.
For more information about SSL_VERSIONS, see ssl_versions - Supported SSL versions at the server configuration parameter.
- SHA1 certificates are no longer supported when TLS 1.3 is enabled. In addition, SHA224 certificates are no longer allowed.
- It is possible to implement TLS via a shared key database. For example, the SSL_SVR_KEYDB and SSL_SVR_STASH configuration parameters on all instances are set to a shared location. When implementing TLS via a shared key database, it is important that the shared key database itself is also highly available to avoid having a single point of failure.
- It is also possible to implement TLS on each instance via a separate key database. This can be done either by executing the same set of commands on each instance to set up TLS key database and certificate, or by creating the TLS key database and certificate on the first instance then copy them to the other instance(s).
- When implementing TLS on each instance as a separate key database, it is important to have completed all certificate updates to the key databases on all instances prior to making use of those certifications in Db2®.
- When Db2 is running in STRICT_FIPS mode, all certificates in the certificate chain must have a signature algorithm of SHA256 or stronger. This includes all intermediate and root certificates.
An activated connection concentrator does not inhibit the use of TLS for HADR communications.
- Prior to configuring TLS support, perform the following steps on each primary and standby in the HADR configuration
-
Ensure that the path to the IBM® Global Security Kit (GSKit) libraries appear in the LIBPATH, SHLIB_PATH, or LD_LIBRARY_PATH environment variables on Linux® and UNIX operating systems. IBM Global Security Kit (GSKit) is automatically included when you install a Db2 database server product.
On UNIX and Linux operating systems, the IBM Global Security Kit (GSKit) libraries are located in sqllib/lib/gskit. On Linux platforms, the IBM Global Security Kit (GSKit) is installed locally when Db2 is installed. The GSKit libraries are located in sqllib/lib/gskit or sqllib/lib64/gskit. It is unnecessary to have another copy of IBM Global Security Kit (GSKit) installed in a global location to start the instance. If a global copy of IBM Global Security Kit (GSKit) does exist, keep the version of the global IBM Global Security Kit (GSKit) at the same version of the local IBM Global Security Kit (GSKit).
For information about the IBM Global Security Kit (GSKit) tool GSKCapiCmd, see the GSKCapiCmd User Guide.
About this task
- Configuring TLS support
-
The general steps for configuring TLS support are:
- Create a key database on the primary and each standby instance to manage your digital certificates. These certificates and encryption keys are used for establishing the TLS connections.
- Configure the Db2 instance for TLS support. This step is done by Db2 instance owner.
- Configured TLS for the particular database for which TLS is to be used.
The procedure section details this configuration process for the communication between primary and standby HADR servers.
Restrictions
| Platform | Supported starting in Db2 Version |
|---|---|
| Linux on AMD64 and Intel EM64T | 11.1.1.1 |
| All other platforms | 11.1.3.3 |