How To
Summary
This document provides information on how to configure TLS/HTTPS secure communications with the IBM i DB2 QSYS2 HTTP Functions utilizing the IBM i Web Service Client and IBM i System TLS.
Environment
IBM i 7.3, 7.4, 7.5 OS
Steps
There are 2 options to configure the IBM i Db2 QSYS2 HTTP Functions to utilize HTTPS with the remote URL.
1) IBM Recommended Method - Obtain the remote HTTPS URL Certificate Authority (CA) public certificates and import them into your IBM Digital Certificate Manager (DCM) for i *SYSTEM Certificate store. This configuration method utilizes and recognizes TLS certificate validation when executing the HTTPS URL.
2) Less secure method (recommended for development and testing environments only) - Enable the sslTolerate=true HTTP Option on the IBM i Db2 QSYS2 HTTP Function to tolerate or ignore soft TLS validation errors (including certificate errors). This method does not require obtaining and importing the remote HTTPS URL's Certificate Authority (CA) certificates. WARNING: Since soft TLS validation errors are ignored, this is a less secure connection method due to the decreased security validation. However, the data exchanged between the IBM i and remote HTTPS URL is still encrypted via TLS but the remote HTTPS certificates are not validated.
==============================
Option 1: Import the Remote HTTPS URL's Certificate Authority Certificates
1) |
Grant the IBM i User Profile executing the QSYS2 HTTP Function *R (Read) authority to the /QIBM/UserData/ICSS/Cert/Server/DEFAULT.KDB file or the keystore specified on the sslCertificateStoreFile HTTP option. It is recommended you create and assign an IBM i authorization list to your certificate store file. Then, add the individual user profiles with *R (Read) authority to grant access as needed.
|
2) |
Obtain the CA certificate(s) from the remote HTTPS URL
There are 3 primary ways to do this: a) Enter the HTTPS URL into your web browser's address bar and view the TLS certificate currently used on the connection. Then, follow the instructions on Extracting a CA Root Certificate from a Digital Certificate. b) Use the QMGTOOLS/GETSSL utility. c) Follow the steps on How to extract CA certificates for the remote port 443 instead of 990. |
3) |
If you do not have both the Root and Intermediate Certificate Authorities in-hand, you may need to extract one or both from the digital certificate obtained for the remote HTTPS URL.
|
4) |
Upload the Root Certificate Authority first and then the Intermediate Certificate Authority to the IFS of your IBM i.
|
5) |
Import the Root Certificate Authority first and then the Intermediate Certificate Authority certificate into your Digital Certificate Manager *SYSTEM certificate store.
|
==============================
Option 2: Set the sslTolerate=true HTTP Option
This will allow soft TLS validation errors to be tolerated and ignored, which includes certificate errors. No TLS certificates are required to be imported into your Digital Certificate Manager (DCM) *SYSTEM certificate store. This is only recommended for development and test environments.
Example:
VALUES CAST(QSYS2.HTTP_GET('https://google.com','{"sslTolerate":"true"}') AS VARCHAR(2048) CCSID 37)
Additional TLS options can be found here: https://www.ibm.com/docs/en/i/7.5?topic=functions-http-get-http-get-blob#rbafzscahttpget__HTTP_options
Related Information
Document Location
Worldwide
[{"Type":"MASTER","Line of Business":{"code":"LOB68","label":"Power HW"},"Business Unit":{"code":"BU070","label":"IBM Infrastructure"},"Product":{"code":"SWG60","label":"IBM i"},"ARM Category":[{"code":"a8m3p000000F98WAAS","label":"IBM i Db2-\u003EQSYS2 HTTP Functions"}],"ARM Case Number":"","Platform":[{"code":"PF012","label":"IBM i"}],"Version":"7.3.0;7.4.0;7.5.0"}]
Was this topic helpful?
Document Information
More support for:
IBM i
Component:
IBM i Db2->QSYS2 HTTP Functions
Software version:
7.3.0, 7.4.0, 7.5.0
Operating system(s):
IBM i
Document number:
7104487
Modified date:
19 November 2024
UID
ibm17104487
Manage My Notification Subscriptions