Refreshing the SSL certificate used by Data Virtualization after the Cloud Pak for Data self-signed certificate is updated

When the Cloud Pak for Data self-signed certificate is updated, the SSL certificate that is used by Data Virtualization must be refreshed to maintain connectivity to the service.

About this task

By default, the Cloud Pak for Data self-signed certificate is updated once every 60 days, and the certificate is set to expire 90 days from the issue date. You must rotate the SSL certificate that is used by Data Virtualization to establish TLS encryption of client JDBC connections.

Procedure

  1. Log in to Red Hat® OpenShift® Container Platform as a cluster administrator.
    oc login OpenShift_URL:port
  2. Change to the project where Data Virtualization pods are installed.
    oc project project-name
  3. Log in to the Data Virtualization head pod.
    oc rsh c-db2u-dv-db2u-0 bash
  4. Switch to the Data Virtualization database instance owner db2inst1.
    su - db2inst1
  5. Run the following commands to verify that the Data Virtualization certificate has expired.
    cd /mnt/blumeta0/db2/ssl_keystore
    gsk8capicmd_64 -cert -details -db bludb_ssl.kdb -stashed -label CN=zen-ca-cert | grep "Not After"

    Confirm that the notAfter date is not in the past. This test indicates that the Data Virtualization has expired.

  6. Stop the Data Virtualization instance and do an ipclean process.
    db2 force application all && db2 deactivate db BIGSQL && bigsql stop && rah 'ipclean -a'
  7. Optional: If you are on Cloud Pak for Data 4.0.2, run the following steps.
    1. Edit the /db2u/scripts/include/db2_ssl_functions.sh file with sudo vi.
    2. In the rotate_ssl_certs() function, change the line is_rootca_changed && return 0 to is_rootca_changed.
      Before
      rotate_ssl_certs()
      {
          is_rootca_changed && return 0
      ・・・・
      After
      rotate_ssl_certs()
      {
          is_rootca_changed
      ・・・・
    3. Save and quit.
  8. Reconfigure Data Virtualization to pick up the changes to the Cloud Pak for Data certificate by running the following command.
    source /db2u/scripts/include/db2_ssl_functions.sh && rotate_ssl_certs
  9. Start the Data Virtualization instance.
    bigsql start
  10. Reactivate the database.
    db2 activate db BIGSQL