Here’s the complete solution addressing all three focus areas:
TLS Certificate Renewal Process:
First, obtain the complete certificate chain from your MQTT broker, including the root CA and any intermediate certificates. Export these to PEM format if they’re not already.
Verify the certificate chain is valid:
openssl verify -CAfile ca-chain.pem broker-cert.pem
If verification succeeds, you have a valid chain. If it fails, you’re missing intermediate certificates.
Trust Store Update:
Import the new CA certificate chain into the Integration Services trust store:
keytool -import -trustcacerts -alias mqtt-broker-ca \
-file ca-chain.pem \
-keystore /opt/cisco-iot/integration/config/truststore.jks \
-storepass changeit
If you had previously imported the old certificate, remove it first:
keytool -delete -alias mqtt-broker-ca-old \
-keystore /opt/cisco-iot/integration/config/truststore.jks
Verify the import:
keytool -list -keystore /opt/cisco-iot/integration/config/truststore.jks
Restart the Integration Services module:
sudo systemctl restart cisco-iot-integration
MQTT Secure Connection Configuration:
Update your MQTT integration configuration to ensure proper TLS settings:
- In the Integration Services configuration file (/opt/cisco-iot/integration/config/mqtt-broker.properties), verify:
mqtt.broker.url=ssl://mqtt-broker.yourdomain.com:8883
mqtt.tls.version=TLSv1.2
mqtt.tls.verify.hostname=true
mqtt.connection.timeout=30
mqtt.keepalive.interval=60
-
Ensure hostname verification is enabled. The broker certificate’s CN or SAN must match the hostname in your connection URL. If you’re using an IP address, add it to the certificate’s SAN field.
-
For mutual TLS (if applicable), also update the client keystore:
keytool -importkeystore \
-srckeystore client-cert.p12 -srcstoretype PKCS12 \
-destkeystore /opt/cisco-iot/integration/config/keystore.jks \
-deststoretype JKS
- Test the connection using mosquitto_pub/sub to verify broker accessibility:
mosquitto_pub -h mqtt-broker.yourdomain.com -p 8883 \
--cafile ca-chain.pem -t test/topic -m "test" \
--tls-version tlsv1.2
Ongoing Certificate Management:
Implement automated certificate monitoring:
- Set up alerts for certificates expiring within 30 days
- Use Let’s Encrypt or similar for automatic renewal where possible
- Document the renewal process including all trust store locations
- Test certificate renewal in a staging environment first
- Keep certificate renewal history for audit purposes
After following these steps, your Integration Services module should successfully reconnect to the MQTT broker with the new certificates. Monitor the integration logs for successful TLS handshake messages confirming the connection is established.