In this scenario, you can configure an IBM® MQ
Managed File Transfer (MFT) Db2®
database logger to connect to a Db2 database by using
TLS. This process establishes a secure communication between the MFT database logger and the Db2 database.
Procedure
-
Prepare the truststore TLS certificate and the keystore TLS certificate in the Public Key
Cryptography Standards #12 (PKCS12) format. Save these certificate files as
trust.p12 and key.p12 in the following directory:
/var/mqm/mqft/config/QM1/loggers/LOGGER0/.
- Create the jcc.properties file in the directory as
/var/mqm/mqft/config/QM1/loggers/LOGGER0/. Add the following properties to the
Db2 JCC properties file:
# SSL/TLS Section
db2.jcc.sslConnection=true
db2.jcc.sslTrustStoreLocation=/var/mqm/mqft/config/QM1/loggers/LOGGER0/trust.p12
db2.jcc.sslTrustStorePassword=YourTrustStorePassword
db2.jcc.sslKeyStoreLocation=/var/mqm/mqft/config/QM1/loggers/LOGGER0/key.p12
db2.jcc.sslKeyStorePassword=YourKeyStorePassword
db2.jcc.sslKeyStoreType=pkcs12
- Set correct permissions to secure the jcc.properties file, the
trust.p12 certificate file, and the key.p12 certificate
file by using the following commands:
chmod 600 /var/mqm/mqft/config/QM1/loggers/LOGGER0/trust.p12
chown mqm:mqm /var/mqm/mqft/config/QM1/loggers/LOGGER0/trust.p12
chmod 600 /var/mqm/mqft/config/QM1/loggers/LOGGER0/key.p12
chown mqm:mqm /var/mqm/mqft/config/QM1/loggers/LOGGER0/key.p12
chmod 600 /var/mqm/mqft/config/QM1/loggers/LOGGER0/jcc.properties
chown mqm:mqm /var/mqm/mqft/config/QM1/loggers/LOGGER0/jcc.properties
- Configure the JVM properties by setting the MFT BFG_JVM_PROPERTIES
environment variable to include the Db2 JCC
properties file:
BFG_JVM_PROPERTIES= "-Ddb2.jcc.propertiesFile=/var/mqm/mqft/config/QM1/loggers/LOGGER0/jcc.properties"
export BFG_JVM_PROPERTIES
- Restart the MFT logger to apply the
configuration.
- Verify the configuration by checking the MFT logger logs for any SSL/TLS connection errors and
confirm that the connection to the Db2 database is
established by using TLS.
Note: You can further customize the SSL/TLS configuration by adding more properties to the
jcc.properties file as needed. For production environments, you need to make
sure that your TLS certificates are securely managed.