Explainer
Securing ctrlX MQTT data paths to AWS or GCP
Short answer
Yes — Node-RED plus Mosquitto can carry ctrlX Data Layer values under X.509 authentication and TLS 1.2, but each of the three connections (publisher to broker, device to broker, uploader to cloud) needs its own trust and client-certificate configuration. DeviceBridge joins only when the chosen AWS or GCP service's protocol calls for it.
On this page
- Does Node-RED plus Mosquitto satisfy the X.509 and TLS 1.2 requirement?
- Which connections make up the data path?
- Do I need DeviceBridge to upload to AWS or GCP?
- What does X.509 authentication require on each connection?
- How should the Mosquitto broker accept the local clients?
- Should the policy allow only TLS 1.2, or 1.2 and newer?
- How do you verify the whole path before production data flows?
- Questions asked
Node-RED plus Mosquitto satisfies the customer's X.509 and TLS 1.2 requirement — connection by connection, not as an architecture. Three links carry the data: the Data Layer publisher into Mosquitto, the designated device subscribing to that broker, and the uploader to the AWS or GCP service. TLS protects one connection between two endpoints, so encryption on any one link proves nothing about the next. The Bosch DeviceBridge app is not automatically part of the answer: it earns a place only when the chosen cloud service's protocol needs the integration it provides. The sections below follow the path in commissioning order — the hops, the protocol decision, the certificate checks, the Mosquitto listener, the TLS version floor, and the nine checks that prove the chain.
Does Node-RED plus Mosquitto satisfy the X.509 and TLS 1.2 requirement? #
Yes — the architecture can meet an X.509 plus TLS 1.2 policy, but the apps prove nothing by themselves: each of the three connections needs its own certificate trust and client-authentication settings, and DeviceBridge is needed only when the chosen cloud service's protocol demands it.
The app list is a component list, not a security result. What the customer's sentence means in engineering terms is concrete: every MQTT connection in scope authenticates the server against a trusted CA, presents a client certificate the receiver actually validates, and negotiates TLS 1.2 or newer. Nothing in installing Node-RED, the Cedalo Mosquitto app or DeviceBridge produces those three properties; each is a setting on a specific listener or client.
The broker stays regardless. The customer explicitly requires a local MQTT broker, so the tempting shortcut of doing everything from Node-RED as a plain cloud client deletes a component that was specified. Decision: keep Node-RED plus Mosquitto as the local path, and budget the configuration effort per connection — three times, not once.
Which connections make up the data path? #
Three connections carry the data: Node-RED publishing Data Layer values to Mosquitto, the designated device subscribing to that broker, and one uploader connection from the controller side to the cloud service, each with its own initiator, address and port.
| Connection | Initiator | Receiver | What to record |
|---|---|---|---|
| Local publication | Node-RED (Data Layer client) | Mosquitto | Broker address and TLS listener port |
| Device delivery | Designated device | Mosquitto | Same listener, reached from the device's network |
| Cloud upload | Selected uploader | AWS or GCP service | Service hostname, protocol and port |
Check reachability from the component that initiates each connection — routing, name resolution, firewall — before touching certificates. A connection that works from an engineering workstation proves nothing about the route and trust the controller-side applications have. Record the real endpoints rather than deriving them from the cloud provider's name.
Nothing in the requirement pins the broker and uploader to the controller. The pair runs as apps on the ctrlX CORE, or the same Mosquitto and Node-RED run on a fanless industrial mini PC beside the panel; the trust model is identical and only addressing and firewall rules move.
Do I need DeviceBridge to upload to AWS or GCP? #
No, not automatically: AWS and GCP are platforms rather than protocols, so the receiving service's protocol decides — a plain MQTT broker or an HTTP REST endpoint is reachable from Node-RED's own client nodes over TLS, and DeviceBridge stays only where its integration covers a requirement those clients cannot.
Name the receiving service first and read its connection specification — protocol, endpoint, certificate requirements, authorization — then match the uploader to it:
| Cloud interface | Upload path | DeviceBridge needed? |
|---|---|---|
| MQTT broker such as AWS IoT Core | Node-RED MQTT client with a TLS profile | No |
| MQTT broker | Mosquitto bridge from the local broker | No, if the bridge satisfies the certificate requirements |
| HTTP REST endpoint | Node-RED HTTP request node | No |
| Service integration the app covers | DeviceBridge | Yes |
The credential type follows the service: AWS IoT Core authenticates each MQTT device with an X.509 certificate, while GCP's current ingestion endpoints such as Pub/Sub verify the uploader with Google-issued service credentials — the same two-way check, a different credential. A working pattern for the MQTT case is bridging a device stream into AWS IoT Core: one client, one certificate, one topic mapping. Decision: one upload path, chosen by protocol. Two active uploaders publish duplicate records to the same store.
What does X.509 authentication require on each connection? #
Two checks per connection: the client validates the receiving endpoint's server certificate against a trusted CA and hostname, and the receiver requests and validates the connecting client's certificate — encryption alone proves neither.
An X.509 server certificate lets a client authenticate the endpoint it dialed. Client-certificate authentication is the reverse check: the receiver asks for, and validates, the connecting client's identity. Traffic can be encrypted while neither check is enforced, which is why a connection that simply works over TLS is not compliance.
| Setting | What it does | Required check |
|---|---|---|
| Trusted CA certificates | Validate the peer's chain | Chain terminates at an approved anchor |
| Server identity | Bind the connection to the endpoint | Configured hostname matches the certificate |
| Client certificate and key | Present the application's identity | Receiver validates and authorizes it |
| TLS version policy | Control permitted versions | Handshake meets the TLS 1.2 floor |
| System time | Evaluate validity dates | Controller and receiver clocks are correct |
Certificate acceptance and topic authorization are separate decisions in Mosquitto: the chain check admits the client, the access-control configuration decides what it may publish and subscribe. A cloud client certificate does nothing for the local broker, and a secured local broker does nothing for the upload.
How many certificates and keys does the path need? #
Nine objects under your own CA, plus whatever credential set the cloud service issues: 3 + 3 + 3 = 9, counted as the broker's server certificate, key and CA, and the same trio for each of the three clients.
- Broker host: server certificate, its private key, the CA certificate — 3 objects.
- Node-RED publisher: client certificate, private key, CA certificate — 3 objects.
- Designated device: the same trio — 3 objects.
- Cloud uploader: the credential set the service itself defines.
This is an illustrative inventory with one issuing CA inside the plant; substitute your own names and count the cloud set from the service's connection page. Decision: one client certificate per application, always — the nine objects above are the minimum for this architecture.
How should the Mosquitto broker accept the local clients? #
Configure the broker before the first client connects: one TLS listener — port 8883 in Mosquitto's documented TLS setup — that requires client certificates, with publication and subscription rights assigned per client identity and topic.
Use the installed broker app's documented certificate import, then:
- Load the server certificate, its private key and the chain into the broker.
- Point the listener's client-certificate requirement at the CA that signed your clients, so a client without a valid certificate is refused.
- Assign publish and subscribe rights per client identity and topic prefix.
- Close or equally secure every other listener; one unauthenticated port undoes the whole policy.
- Give Node-RED and the designated device the broker endpoint, the CA to trust, and their own certificate and key.
The node-red-contrib-ctrlx-automation node set reads the Data Layer values into the flow that publishes; the designated device subscribes with its own identity. The listener, CA and access-control sequence is the one walked through when running a secure Mosquitto lab broker with Node-RED, and it carries over unchanged.
Should the policy allow only TLS 1.2, or 1.2 and newer? #
Treat the requirement as a floor unless the customer says otherwise: allow TLS 1.2 and later, and record the negotiated version from the handshake or the broker's connection log for every client before production data flows.
Read 'TLS 1.2 encryption' in a customer specification as a minimum: no connection below 1.2. Allow TLS 1.2 and TLS 1.3 on the listener and the clients; the newer version costs nothing and keeps the path valid as old protocol versions are retired. If the document says 'TLS 1.2 only', or an auditor insists on exactly that, restrict the listener to 1.2 alone and record it as the exception it is.
Verify the negotiated version, not the configured one: read the broker's connection log or capture one handshake per client and confirm the version and the accepted identity there.
How do you verify the whole path before production data flows? #
Run nine checks: for each of the three connections, one positive connect, one rejected connect without the client certificate, and one log entry proving the negotiated TLS version and accepted identity.
That is 3 × 3 = 9:
- Positive: each valid client connects, subscribes or publishes as designed.
- Negative: the same attempt without the client certificate is refused — on the broker listener and on the cloud endpoint.
- Evidence: the broker log or handshake capture shows the negotiated TLS version and the accepted client identity.
Add a tenth check on the designated device: a subscription outside its assigned topics is refused, proving the access-control configuration is enforced and not merely present. On the cloud hop, the failure patterns in fixing X.509 certificate auth to Azure IoT Hub over MQTT carry over to any certificate-authenticated cloud broker.
One rule while doing all of this: never clear peer verification or the client-certificate requirement to make a failing handshake connect, because that removes exactly the control the customer is paying for. When the nine checks pass, the path meets the requirement as written.
Questions asked
Can one client certificate serve the publisher, the device and the uploader?
It can connect, and it is the wrong call. Separate certificates mean the broker log shows which application published, and revoking one application's access — a decommissioned device, a rebuilt uploader — is one reissue instead of three. Shared identities also make topic permissions blunt, because the access rules cannot tell the clients apart.
How often do the certificates on this path need renewing?
If you issue one-year leaf certificates and renew 30 days early, the first renewal lands at day 335 — 365 minus 30 — for each of the three client certificates and the broker's server certificate. Put all four dates plus the CA expiry on the maintenance calendar; an expired certificate fails the handshake at the worst possible time.
What does a wrong controller clock do to these connections?
Every certificate carries a validity window, and each end checks it against system time. A controller clocked before a certificate's start date, or past its end date, fails the handshake with a validity error even though the trust chain is correct. Point the controller and the broker host at the same time source before debugging certificates.
Does moving the broker and uploader off the controller change the security design?
No. The same listener, trust anchors and per-client permissions apply wherever Mosquitto and Node-RED run; only the addresses, routes and firewall rules change. What does change is custody: the box that runs the broker holds its private key, so it joins the same patching, backup and access-control regime as the controller.