Skip to content

License and truststore

Every connector needs a valid license. Connectors that use a secure (TLS) connection to IBM i also need a truststore. This page describes the storage options for both files and how to configure them.

License management

InfoConnect for Kafka requires a valid license. Contact us to request a free trial license or to purchase a long-term license. The Infoview sales team provides a license file as400-license.lic that entitles you to work with specific IBM i servers.

You can store the license in various internal and shared locations. Set as400.license.protocol to the protocol that matches the location, then configure the parameters for that protocol. All parameters are required.

Protocol Parameter Configuration key
FILE Path as400.license.path
FILE Filename license.fileName
S3 S3 bucket path s3.bucket
S3 Filename license.fileName
S3 S3 region s3.region
S3 Access key s3.accessKey
S3 Secret key s3.secretKey
S3_IAM S3 bucket path s3.bucket
S3_IAM Filename license.fileName
S3_IAM S3 region s3.region
FTP Host ftp.host
FTP Directory path ftp.dir.path
FTP Filename license.fileName
FTP Username ftp.username
FTP Password ftp.password
CLASSPATH Filename license.fileName
HTTP HTTP Host http.url
HTTP HTTP Directory http.dir.path
HTTP Filename license.fileName
HTTP HTTP Username http.username
HTTP HTTP Password http.password
HTTPS HTTPS Host https.url
HTTPS HTTPS Directory https.dir.path
HTTPS Filename license.fileName
HTTPS HTTPS Username https.username
HTTPS HTTPS Password https.password
BROKER License Topic license.licenseTopic
DIRECT License Text license.licenseText
AZURE_STORAGE Azure Blob Connection String azblob.connectionString
AZURE_STORAGE Azure Blob Container Name azblob.containerName
AZURE_STORAGE Filename license.fileName

Truststore management

The IBM i connector requires the truststore file info400new.truststore when the secure connection property is set to true. The truststore enables access to specific IBM i systems over a TLS connection. You can load the truststore with several protocols, including HTTP, HTTPS, FTP, S3, FILE, and CLASSPATH. Configure the connector settings for the protocol you choose.

Truststore section of the connector configuration with Secure Connection set to true

Configure the following parameters for the chosen protocol. All parameters are required.

Protocol Parameter Configuration key
FILE Path as400.tlsFile.path
FILE Filename truststore.fileName
S3 S3 bucket path s3.bucket.tls
S3 Filename truststore.fileName
S3 S3 region s3.region.tls
S3 Access key s3.accessKey.tls
S3 Secret key s3.secretKey.tls
S3_IAM S3 bucket path s3.bucket.tls
S3_IAM Filename truststore.fileName
S3_IAM S3 region s3.region.tls
FTP Host ftp.host.tls
FTP Directory path ftp.dir.path.tls
FTP Filename truststore.fileName
FTP Username ftp.username.tls
FTP Password ftp.password.tls
CLASSPATH Filename license.fileName
HTTP HTTP Host http.url.tls
HTTP HTTP Directory http.dir.path.tls
HTTP Filename truststore.fileName
HTTP HTTP Username http.username.tls
HTTP HTTP Password http.password.tls
HTTPS HTTPS Host https.url.tls
HTTPS HTTPS Directory https.dir.path.tls
HTTPS Filename truststore.fileName
HTTPS HTTPS Username https.username.tls
HTTPS HTTPS Password https.password.tls
BROKER Truststore Topic truststore.truststoreTopic
AZURE_STORAGE Azure Blob Connection String azblob.connectionString.tls
AZURE_STORAGE Azure Blob Container Name azblob.containerName.tls
AZURE_STORAGE Filename truststore.fileName.tls

Storing the license and truststore in a topic

Follow these steps to store the license and the truststore certificate in a Kafka topic.

Step 1: Encode the files as base64

Generate a base64 string for each file with the command line. Copy each string to a text file, because you need it in step 3.

For the license file:

base64 -w 0 path/to/license/<license-file-name>

Sample command:

base64 -w 0 /usr/license/as400-license_new.lic

The output is a base64 string. The value depends on the content of the license file.

QxMTViODZlYTlkMDE1ZWE0ZTI1YTg5MzFhNDI0YjUzYjc1YmUwNDE1OGJjODRkMgphZGJlMTM3MTRhYjJhYTE0NjQxOWRmYzVlNDRjNWMyZDdmNTMzNTBhNDJhMWE5MTQ0NDRmN

For the truststore file:

base64 -w 0 path/to/truststore/<truststore-file-name>

Sample command:

base64 -w 0 /usr/truststore/info400new.truststore

The output is a base64 string. The value depends on the content of the truststore file.

Step 2: Create the topic

Create the topic that stores the license and truststore:

bin/kafka-topics.sh --create \
    --bootstrap-server <broker-address> \
    --topic <license-truststore-topic-name> \
    --partitions 1 \
    --replication-factor 3 \
    --config cleanup.policy=compact \
    --config retention.ms=-1

Step 3: Produce the license and truststore to the topic

You can store the license and the truststore in the same topic. Use one of the following ways to produce the base64 strings to the topic.

Using the Kafka console producer

Run the producer:

kafka-console-producer --bootstrap-server localhost:9092 \
                       --topic <license-truststore-topic-name> \
                       --property parse.key=true \
                       --property key.separator=":"

At the prompt, enter one message for the license and one for the truststore:

"license":<base64-encoded-license-string>
"truststore":<base64-encoded-truststore-string>

Using Confluent Control Center

  1. Open the topic and select the Messages tab.
  2. Select Produce a new message to this topic.

    Messages tab of the license and truststore topic with the Produce a new message to this topic link highlighted

  3. For the license, enter the base64 license string as the value and "license" as the key.

    Produce message form with the base64 license string as the value and the key license

  4. For the truststore, enter the base64 truststore string as the value and "truststore" as the key.

    Produce message form with the base64 truststore string as the value and the key truststore

Note

The key of the record must be "license" for the license and "truststore" for the truststore.

Step 4: Configure the connector

In the connector configuration:

  • Set "as400.license.protocol": "BROKER" and "as400.tls.protocol": "BROKER".
  • Set the license topic: "license.licenseTopic": "<license-topic-name>".
  • Set the truststore topic: "truststore.truststoreTopic": "<truststore-topic-name>".

Sample configuration:

{
  //other properties are removed for brevity
  "as400.license.protocol": "BROKER",
  "as400.tls.protocol": "BROKER",
  "license.licenseTopic": "<license-topic-name>",
  "truststore.truststoreTopic": "<truststore-topic-name>"
}