To secure data in transit, Db2 Warehouse
supports Secure Sockets Layer (SSL).
About this task
Db2 uses port 50001 for SSL connections, and
port 50000 for non-SSL connections. Both connection types are accepted in the default configuration,
but you can enforce the use of SSL by enabling Enforce database connections with
SSL on the page of the web console. The certificates that are required for SSL connections can
be managed in two ways. You can use the default certificate authority (CA) or specify your own
certificate.
Procedure
-
Decide whether to use the default CA or specify your own server certificate in one of the
following ways.
- By default, during a fresh deployment of or during the first update to version v11.5.4.0-CN2 or
later, a new CA is generated. This certificate is used to sign the certificate of the Db2 server.
- Alternatively, from version v11.5.4.0-CN2, you can specify your own server certificate, key, and
CA to be used instead. To specify your own server certificate, from version v11.5.4.0-CN2, use the
configuration options for the SSL_* environment variable. For information, see
Configuring Db2 Warehouse and Configuration options.
If the certificate authority expires within 180 days, you get the message
Root CA
certificate will expire on expiration date.
-
Extract the certificate authority.
The certificate authority is copied to the host
volume/db2/ssl_keystore/rootCA.pem directory. (From inside the container, the
name of the directory is /mnt/blumeta0/db2/ssl_keystore/rootCA.pem.)
You can copy the file to the /tmp directory or download it from the web
console in one of the following ways:
- Copy the file directly from the host volume directory or use the docker/podman
cp command.
For
example:
docker cp dashDB:/mnt/blumeta0/db2/ssl_keystore/rootCA.pem /tmp
podman cp dashDB:/mnt/blumeta0/db2/ssl_keystore/rootCA.pem /tmp
- From the web console, select .
Note: The name of the file for the current CA in use is always the same, whether it is
self-generated or specified by yourself.
-
Trust the CA certificate.