Configure MQTT Client Certificate Authentication
Overview
This tutorial explains how to configure MQTT client certificate authentication between Chariot, MQTT Engine, and MQTT Transmission using TLS/SSL client certificates. You will generate certificates and keys, configure two-way SSL authentication, update the Chariot truststore, and configure MQTT Engine and MQTT Transmission to authenticate using client certificates.
This tutorial covers client certificate authentication only. TLS/SSL must already be configured on the Chariot MQTT Server to provide secure MQTT communication.
⚠️ Available in Chariot v2.3.1 and newer.
Prerequisites
The following components are required:
-
Ignition installed with:
- MQTT Engine
- MQTT Transmission
-
Chariot MQTT Server v2.3.1 or newer
-
OpenSSL command line tools
-
Java
keytool
OpenSSL
Install the OpenSSL command line tool and ensure the OpenSSL executable is available in the system PATH.
Keytool
keytool is included with standard Java distributions.
Chariot includes a Java runtime located at:
<chariot_install_dir>/lib/runtime/jdk11.0.12_7/bin
Add the keytool directory to the system PATH if necessary.
❗ Restart any open command windows after updating environment variables.
Generate Certificates and Keys
The first step is to generate the certificate hierarchy for Chariot, MQTT Engine, and MQTT Transmission.
Create the following folder structure on your local drive to hold the certificates:
chariotcerts/
├── ca/
└── certs/
├── engine/
└── transmission/
The Root Certificate Authority (CA) is the highest level of authority in the certificate hierarchy. It is responsible for issuing signed certificates, including the MQTT Engine and MQTT Transmission client certificates. When the Root CA issues a certificate, it signs the certificate with its private key. Chariot can then verify the authenticity of client certificates using the Root CA's public key.
Note: This tutorial covers client-based authentication using certificates. It does not cover setting up TLS/SSL on the MQTT Server, which is required to encrypt communication between MQTT clients and the MQTT Server. See Secure Chariot MQTT Server Communication Using SSL/TLS for information about configuring TLS/SSL.
The following certificates and keys will be generated:
- Root CA certificate and private key
- MQTT Engine client certificate and private key
- MQTT Transmission client certificate and private key
Generate the Root CA Certificate
-
Generate a private key file (
ca.key) for the Root CA.The
-des3option protects the private key with a passphrase. You may choose the passphrase when prompted.openssl genrsa -des3 -out ca/ca.key 4096⚠️ If you set a passphrase for the Root CA private key, make note of it. The passphrase will be required during subsequent certificate-generation steps.
-
Generate a self-signed Root CA certificate (
ca.crt):openssl req -new -x509 -key ca/ca.key -days 3650 -out ca/ca.crtThis command generates a self-signed X.509 certificate named
ca.crtthat is valid for 3650 days (10 years) using the RSA private keyca.key. You will be prompted for the passphrase associated withca.key. -
Complete the certificate fields using the appropriate organization and domain information.
The certificate request uses a Distinguished Name (DN). Some fields can be left blank, and some fields provide default values.
An example Root CA creation is shown below:
$ openssl req -new -x509 -key ca/ca.key -days 3650 -out ca/ca.crtEnter pass phrase for ca/ca.key:You are about to be asked to enter information that will be incorporatedinto your certificate request.What you are about to enter is what is called a Distinguished Name or a DN.There are quite a few fields but you can leave some blankFor some fields there will be a default value,If you enter '.', the field will be left blank.-----Country Name (2 letter code) [AU]:USState or Province Name (full name) [Some-State]:KSLocality Name (eg, city) []:StilwellOrganization Name (eg, company) [Internet Widgits Pty Ltd]:Cirrus Link SolutionsOrganizational Unit Name (eg, section) []:SupportCommon Name (e.g. server FQDN or YOUR name) []:CLS Example Root CAEmail Address []:$
After completing this step, the following files should exist:
chariotcerts/
├── ca/
│ ├── ca.crt
│ └── ca.key
Note: Depending on the version of OpenSSL being used, additional
.srlfiles may be created. These files contain the unique serial number for a signed certificate. They are not used directly by the modules and are not included in the certificate hierarchy shown above.
Generate the MQTT Engine Client Certificate
-
Generate the MQTT Engine private key:
openssl genrsa -out certs/engine/engine.key 4096 -
Generate a Certificate Signing Request (CSR) for MQTT Engine:
openssl req -new -key certs/engine/engine.key -out certs/engine/engine.csrComplete the certificate request fields using the appropriate information.
An example CSR creation is shown below:
$ openssl req -new -key certs/engine/engine.key -out certs/engine/engine.csrYou are about to be asked to enter information that will be incorporatedinto your certificate request.What you are about to enter is what is called a Distinguished Name or a DN.There are quite a few fields but you can leave some blankFor some fields there will be a default value,If you enter '.', the field will be left blank.-----Country Name (2 letter code) [AU]:USState or Province Name (full name) [Some-State]:KSLocality Name (eg, city) []:StilwellOrganization Name (eg, company) [Internet Widgits Pty Ltd]:Cirrus Link SolutionsOrganizational Unit Name (eg, section) []:SupportCommon Name (e.g. server FQDN or YOUR name) []:EngineDeviceEmail Address []:Please enter the following 'extra' attributesto be sent with your certificate requestA challenge password []:An optional company name []:$ -
Sign the MQTT Engine client CSR using the Root CA:
openssl x509 -req -in certs/engine/engine.csr -CA ca/ca.crt -CAkey ca/ca.key -CAcreateserial -out certs/engine/engine.crt -days 365This command signs
engine.csrwith the Root CA certificate (ca.crt) and Root CA private key (ca.key) and creates an X.509 certificate namedengine.crtthat is valid for 365 days (1 year).You will be required to enter the passphrase associated with
ca.key.
Generate the MQTT Transmission Client Certificate
-
Generate the MQTT Transmission private key:
openssl genrsa -out certs/transmission/transmission.key 4096 -
Generate a Certificate Signing Request (CSR) for MQTT Transmission:
openssl req -new -key certs/transmission/transmission.key -out certs/transmission/transmission.csrComplete the certificate request fields using the appropriate information.
An example CSR creation is shown below:
$ openssl req -new -key certs/transmission/transmission.key -out certs/transmission/transmission.csrYou are about to be asked to enter information that will be incorporatedinto your certificate request.What you are about to enter is what is called a Distinguished Name or a DN.There are quite a few fields but you can leave some blankFor some fields there will be a default value,If you enter '.', the field will be left blank.-----Country Name (2 letter code) [AU]:USState or Province Name (full name) [Some-State]:KSLocality Name (eg, city) []:StilwellOrganization Name (eg, company) [Internet Widgits Pty Ltd]:Cirrus Link SolutionsOrganizational Unit Name (eg, section) []:SupportCommon Name (e.g. server FQDN or YOUR name) []:TransmissionDevice1Email Address []:Please enter the following 'extra' attributesto be sent with your certificate requestA challenge password []:An optional company name []:$ -
Sign the MQTT Transmission client CSR using the Root CA:
openssl x509 -req -in certs/transmission/transmission.csr -CA ca/ca.crt -CAkey ca/ca.key -CAcreateserial -out certs/transmission/transmission.crt -days 365This command signs
transmission.csrwith the Root CA certificate (ca.crt) and Root CA private key (ca.key) and creates an X.509 certificate namedtransmission.crtthat is valid for 365 days (1 year).You will be required to enter the passphrase associated with the Root CA private key.
Certificate Structure
After completing the certificate generation steps, the directory structure should resemble the following:
chariotcerts/
├── ca/
│ ├── ca.crt
│ └── ca.key
└── certs/
├── engine/
│ ├── engine.crt
│ ├── engine.csr
│ └── engine.key
└── transmission/
├── transmission.crt
├── transmission.csr
└── transmission.key
The certificates and keys in this directory are used to configure client certificate-based authentication between Chariot and the MQTT Engine and MQTT Transmission modules.
Set Up SSL Connections Using Two-Way Authentication
The following sections configure SSL connections between the MQTT Engine and MQTT Transmission clients and the Chariot MQTT Server.
The configuration consists of two parts:
-
Server-side configuration
- Enable SSL on Chariot and add the server-side certificates and keys.
- Add the MQTT Engine and MQTT Transmission client certificates to the Chariot truststore.
- Set the Chariot client authentication policy to
required.
-
Client-side configuration
- Add the MQTT Engine certificate and private key to the Chariot connection on the MQTT Engine side.
- Add the MQTT Transmission certificate and private key to the Chariot connection on the MQTT Transmission side.
Server-Side Configuration
Set Up SSL on Chariot
-
Navigate to Main Menu → General → Certificates.
-
Upload the following certificate components:
File Type Where to Get the File CA Chain Provided by your Certificate Authority Private Key The key generated when creating the CSR submitted to your Certificate Authority Certificate The server certificate provided by your Certificate Authority after the CSR was submitted -
Select Setup SSL after uploading the files.


Note: Use the certificate components created when configuring Secure Chariot MQTT Server Communication Using SSL/TLS.
Enable Secure MQTT
-
Navigate to Main Menu → MQTT → Server Configuration → Configuration.
-
Enable Enable Secure.

- Select Update to save the configuration.
Update the Chariot Truststore
By default, Chariot includes an empty truststore named clientcerts.jks located at:
<chariot_install_dir>/security/clientcerts.jks
-
View the current truststore contents:
keytool -list -v -keystore <chariot_install_dir>/security/clientcerts.jksThe truststore password can be found in:
<chariot_install_dir>/conf/com.cirruslink.chariot.systemThe password is specified by the
trustStorePasswordparameter.A new truststore will contain no entries before the client certificates are imported.
-
Import the Root CA certificate:
keytool -importcert -file ca/ca.crt -keystore <chariot_install_dir>/security/clientcerts.jks -alias CACertificateWhen prompted:
Trust this certificate? [no]:Enter:
yes -
Import the MQTT Engine certificate:
keytool -importcert -file certs/engine/engine.crt -keystore <chariot_install_dir>/security/clientcerts.jks -alias EngineDeviceWhen prompted to trust the certificate, enter
yes. -
Import the MQTT Transmission certificate:
keytool -importcert -file certs/transmission/transmission.crt -keystore <chariot_install_dir>/security/clientcerts.jks -alias TransmissionDevice1When prompted to trust the certificate, enter
yes. -
Verify that the Root CA, MQTT Engine, and MQTT Transmission certificates appear in the truststore.
After importing the certificates, the truststore should contain three entries.
Configure the Chariot Client Authentication Policy
-
Using a text editor, edit the following configuration file:
<chariot_install_dir>/conf/com.cirruslink.chariot.server -
Set
clientAuthPolicytorequired:clientAuthPolicy="required" -
Save the configuration file.
❗ Restart the Chariot service after saving the configuration changes.
Client-Side Configuration
Configure MQTT Engine
-
In Ignition, navigate to Config → MQTT Engine → Servers → Certificates.
-
Add the following certificates:
Friendly Name Certificate Filename File Description File Location EngineCertificate engine.crtMQTT Engine Certificate chariotcerts/certs/engineEngineKey engine.keyMQTT Engine Private Key chariotcerts/certs/engine

-
Navigate to Config → MQTT Engine → Servers → Settings.
-
Configure the Chariot server URL using SSL:
ssl://<FQDN>:8883Replace
<FQDN>with the FQDN of the Chariot Server. -
Assign the uploaded certificates to the Chariot connection.
-
Select Save Changes to save the configuration.
⚠️ The connection URL must use
ssl://. If a non-secure connection is specified, the connection will not succeed.

Configure MQTT Transmission
-
In Ignition, navigate to Config → MQTT Transmission → Servers → Certificates.
-
Add the following certificates:
Friendly Name Certificate Filename File Description File Location TransmissionCertificate transmission.crtMQTT Transmission Certificate chariotcerts/certs/transmissionTransmissionKey transmission.keyMQTT Transmission Private Key chariotcerts/certs/transmission

-
Navigate to Config → MQTT Transmission → Servers → Settings.
-
Configure the Chariot server connection to use SSL.
-
Assign the uploaded certificates to the Chariot connection.
-
Select Save Changes to save the configuration.
⚠️ The connection URL must use SSL. If a non-secure connection is specified, the connection will not succeed.

Configure Anonymous Client Connections
Chariot MQTT Server still requires MQTT account credentials to authenticate incoming client connections, even when client certificates are used to establish a TLS/SSL session.
If clients will not send an MQTT username and password, anonymous connections must be enabled.
-
Navigate to Main Menu → MQTT → Server Configuration → Configuration.
-
Enable Allow Anonymous.

By default, an anonymous client connection is allowed to publish and subscribe on # unless an Anonymous MQTT Credential has been selected.
An MQTT account credential can be selected for anonymous connections to apply its Publish and Subscribe ACLs to all anonymous connections.
-
To configure an Anonymous MQTT Credential, navigate to Main Menu → MQTT → MQTT Accounts → Credentials.
-
Select the MQTT Account Credential to use for anonymous connections.
Note: A password must be configured for the MQTT Credential, but Chariot does not use the password to authenticate anonymous connections.
Verify Connectivity
MQTT Engine
-
From the Ignition left-hand menu, navigate to Config → MQTT Engine → Servers.
-
Verify that the server Status displays Connected.

MQTT Transmission
-
From the Ignition left-hand menu, navigate to Config → MQTT Transmission → Servers.
-
Verify that the Status displays x of x.
This indicates the number of configured transmitters that are connected.

If a transmitter does not appear as connected, verify that the transmitter has a valid Sparkplug ID. The Sparkplug ID can be configured through the Group and Edge ID or through the TagPath.
If the transmitter still does not appear as connected, review the MQTT Transmission troubleshooting guide for assistance.
Chariot
-
In the Chariot MQTT Server Web UI, navigate to Main Menu → MQTT → Client Status → Clients.
-
Verify that the number of active MQTT clients is displayed.
The active client count should be 2 or 3, depending on the MQTT Transmission RPC Client configuration.

- Select the option to display additional client details if more information is needed for troubleshooting or verification.
