Configuring TLS for the communication between primary and standby HADR servers
Transport Layer Security (TLS) is supported between the HADR primary and standby servers on environments that do not use IBM® Db2® pureScale®.
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 Configuring TLS support in a Db2 instance. 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. In particular, if SSL_VERSIONS is set to TLS 1.3 on any host, it is required that SSL_VERSIONS is set to TLS 1.3 on all hosts. This requirement is related to the use of certificates with SHA1 signature algorithms and it is not required if you are using SHA256 or later.
- HADR peers that are
running Db2 11.5.8 and later 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. While TLS 1.2 continues to be the default version,
setting the SSL_VERSIONS value to TLS 1.1 or earlier resolves to TLS 1.2. This
behavior is different in client/server TLS, where TLS 1.1 is the default and lowest
version.
For more information about SSL_VERSIONS, see ssl_versions - Supported SSL versions at the server configuration parameter..
- TLS 1.3 deprecates the use of SHA1 certificates unless it is for backwards compatibility. For this reason, SHA1 certificates are deprecated for HADR TLS when TLS 1.3 is enabled. SHA1 certificates continue to be supported in 11.5.8 when TLS 1.3 is enabled, but might not be supported in a future release. 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.
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. GSKit is automatically included when you install a Db2 database server product.
On UNIX and Linux operating systems, the GSKit libraries are located in sqllib/lib/gskit. On Linux platforms, the 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 GSKit installed in a global location to start the instance. If a global copy of GSKit does exist, keep the version of the global GSKit at the same version of the local GSKit.
For information about the 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 |