MQTT
Messagingsystem_type: "mqtt"Publish and subscribe to MQTT topics through QuantaSeal's PQC-encrypted IoT messaging proxy.
Overview#
The MQTT connector proxies MQTT 3.1.1 / 5.0 publish and subscribe operations. Broker credentials are sealed in QuantaVault. Supports TLS brokers (mqtts://) and plain MQTT over TCP.
https://api.quantaseal.io/api/v2/proxy/outboundAuth header:
X-API-Key: qs_live_…Prerequisites#
- 1An MQTT broker (Mosquitto, HiveMQ, AWS IoT Core, etc.)
- 2Broker hostname, port, username, and password (or client certificate)
- 3A QuantaSeal API key
Configuration#
Follow these steps to connect MQTT to QuantaSeal. You can configure integrations via the Admin Console or directly via the API.
- 1
Obtain broker hostname, port, username, and password.
- 2
Seal: POST /api/v2/vault/seal with credential_type: custom_kv and values: {hostname, port, username, password}.
- 3
Create integration with system_type: mqtt, config: {topic, qos: 1}.
Authentication Types#
Seal hostname, port, username, and password as custom_kv. For certificate-based auth, also include client_cert and client_key.
All credential types are sealed in QuantaVault with ML-KEM-768 + AES-256-GCM and wrapped by your tenant AWS KMS CMK before storage. See the Vault API reference for the full list of credential types and seal/unseal endpoints.
Available Operations#
QuantaSeal enforces a default-deny operation policy. Only operations listed in your integration's allowed_operations array will be permitted. Add operations when creating or updating the integration.
| Operation | Description |
|---|---|
publish | Publish a message to a topic. |
subscribe | Subscribe to a topic and receive messages. |
Code Example#
Every proxy call returns a HybridCryptoEnvelope - the response is ML-KEM-768 key-encapsulated, AES-256-GCM encrypted, and signed with ML-DSA-65 + HMAC-SHA-512. Verify both signatures before trusting the decrypted payload.
curl -X POST https://api.quantaseal.io/api/v2/proxy/outbound \
-H "X-API-Key: qs_live_your_key_here" \
-H "Content-Type: application/json" \
-d '{"integration_id":"int_MQTT001","operation":"publish","payload":{"topic":"sensors/temperature","message":"22.5","qos":1}}'client.encryption.decrypt(envelope). Both the ML-DSA-65 signature and the HMAC-SHA-512 signature must pass - QuantaSeal uses a bitwise & check, not short-circuit and.Troubleshooting#
CONNACK refused - bad credentials
Verify username/password in the vault entry match the broker's ACL. Rotate via POST /api/v2/vault/rotate/{id}.