Abstract
Following on from our recent article on InformixHQ network encryption, an update-to-date quick start guide for secure connections to Informix Dynamic Server (IDS) would also be useful, preventing network traffic from being exposed in plain text. This is generally known as SSL (Secure Sockets Layer), though strictly speaking it has been replaced by TLS (Transport Layer Security). A script is provided to run all the commands required to create server and client certificate keystores, and the remaining few steps are documented.
Content
Examples in this article were produced in a Rocky 9 container installed from Docker Hub using the following commands in Windows PowerShell with Docker Desktop already running:
Full option names are given for readability and documented here.
The port ranges above are for:
- SSH
- Informix HQ
- TCP listeners
- Mongo
- REST
- MQTT
Essential commands were then performed in the Docker console:
IDS Developer Edition 14.10.FC12W12 from IBM Fix Central was then installed.
Assuming your IDS instance is already running with a standard unencrypted TCP listener, the minimum simplest steps to enable SSL connections will now be described.
The main relevant IBM documentation pages for this are:
Configuring a server instance for secure sockets layer connections
Configuring a client for SSL connections
If you copied $INFORMIXDIR from another host instead of running the IDS installer, you must do this first as “root” to set up the correct IBM Global Security Kit:
Remaining commands in this guide should be run as user “informix”.
You then need to create server and client SSL keystores each containing one certificate. The following script does all of that, which you must run with a single argument containing a password which will be used for both keystores:
- Certificates are labelled with the instance name $INFORMIXSERVER by default.
- You can change that by editing the first declaration in the script.
- PKCS 12 without PQC are the cryptography standards expected by IDS.
- The certificate will expire in around 20 years (20 x 365 days).
At least in current versions, you do not need to set Informix configuration parameter SSL_KEYSTORE_LABEL as we have only one certificate in a server keystore (multiple instances require separate keystores):
Add an entry for your SSL instance alias in $INFORMIXDIR/etc/sqlhosts or the path name in environment variable $INFORMIXSQLHOSTS if set, for example:
| sqlhosts | |||
|---|---|---|---|
| informix_ssl | onsocssl | *localhost | sqlexec-ssl |
- The first column is your preferred listener name conforming to Informix unquoted identifier
- The second is “onsocssl” for native IDS connections or “drsocssl” for DRDA.
- The third specifies the network interface, with an asterisk prefix denoting all.
- The fourth is the port number or name from /etc/services, the standard entries being:
| services | ||
|---|---|---|
| sqlexec | 9088/tcp | # IBM Informix SQL Interface |
| sqlexec-ssl | 9089/tcp | # IBM Informix SQL Interface - Encrypted |
Append your new alias to DBSERVERALIASES in $INFORMIXDIR/etc/$ONCONFIG. Separate with a comma from any existing contents. In our example, this is as follows:
| onconfig (mandatory) | |
|---|---|
| DBSERVERALIASES | informix_ssl |
To avoid restarting the instance, you can start the new listener thread with:
If not configured otherwise, Informix will start one SSL poll thread and one encryption VP automatically once SSL is in use. If you need to increase that on larger systems, you will probably want the same number of poll threads as you currently have for normal connections (assume 2 for this example), and a matching number of encryption VPs:
| onconfig (optional) | |
|---|---|
| NETTYPE | socssl,2,200,NET |
| VPCLASS | encrypt,num=2 |
To increased the number of VPs without restarting the instance:
You should now be able to connect via SSL:
The real purpose is when clients are on a separate host. If the applications connect via Informix Client SDK, simply copy the following recursively into $INFORMIXDIR on that machine:
Edit the path in the first file above if $INFORMIXDIR is not the same as on the database server.
For other APIs, refer to specific documentation, for example JDBC.
Some clients like AGS Server Studio require no set up at all: it detects whether SSL applies on the specified port, and downloads the required certificate automatically. However, if an Informix instance’s certificate changes, you will need to delete the following file on Windows for the new certificate to be downloaded:
Conclusion
Configuring Informix for network encryption is tricky, but this article should make it easier.
Caveats
Beware that there is a CPU overhead for encryption VPs with SSL connections: this should be tolerable on most systems, but we know of SSL implementations on large busy systems that had to be rolled back.
There have regularly been significant changes in this area over the years. While everything in this article should work on current versions, it might need adjustment for older or newer systems.
The “ssl_setup.sh” script and some other commands will not work without modification for IDS running on Windows, but WSL might help.
Disclaimer
Suggestions above are provided “as is” without warranty of any kind, either express or implied, including without limitation any implied warranties of condition, uninterrupted use, merchantability, fitness for a particular purpose, or non-infringement.
Contact Us
If you have any questions or would like to find out more about this topic, please contact us.