F05B · Session 5B · Chapter 1
From the machine to the platform
Plant data has to travel from a PLC's memory to a screen on a phone without ever letting anyone reach back into the machine. This chapter walks the path layer by layer: drivers and OPC UA, the gateway, MQTT with Sparkplug B, and where CESMII's profiles fit.
35 min3 chapters≈ 110 minutes2 exercises12-question assessment · 80% passes
By the end of this chapter you can
- Name each layer between a controller and your platform, and what each one is responsible for.
- Explain how OPC UA secures a connection and why its security mode matters.
- Explain why MQTT with Sparkplug B sends far fewer messages than polling, and what a death certificate tells you.
- Say what CESMII's Smart Manufacturing Profiles and platform add.
Six layers, each with one job
Session 5 gave every measure one name. This session moves those measures out of the plant and into your platform, safely. The path has six layers. Each layer does one job, and each can be replaced without disturbing the others.
| Layer | Its job | Typical products |
|---|---|---|
| Controllers | Run the machine. Their memory holds the values. | Allen-Bradley, Siemens, Omron, Modbus devices |
| Drivers and OPC UA | Read values and give them names and types | Gateway drivers; OPC UA servers built into newer PLCs [1] |
| Gateway | Templates, aliases, history, alarms and local screens; buffers when links drop | Ignition, Ignition Edge [2] |
| MQTT with Sparkplug B | Publish changes to a broker; consumers subscribe | Mosquitto, HiveMQ, EMQX, Cirrus Link modules [3] [4] |
| DMZ connector | Take what the platform needs and send it out | A small service you own (chapter 2) |
| Your platform | Store, secure and show the data | Supabase and Vercel on your accounts (Session 1) |
OPC UA: named, typed and secured
OPC UA (Open Platform Communications Unified Architecture, published as IEC 62541) is the industrial standard for reading and writing machine data with meaning attached [1]. Instead of a register number, a client browses an address space of named objects: a Filler with a GoodCount of type integer, in units, with a timestamp and a quality flag. Many newer controllers include an OPC UA server; older ones are reached through the gateway's own drivers.
OPC UA also builds security into the protocol. Each application has its own certificate. Before any data flows, the client and server check each other's certificates, agree a security policy, and choose a mode: None, Sign (tamper-evident) or Sign and Encrypt (tamper-evident and private). Then a user or application signs in, and the server applies that user's rights [1] [5].
Knowledge check
The gateway connects to a PLC's OPC UA server with security mode None and anonymous sign-in. What is the risk?
MQTT and Sparkplug B: changes, not polls
Polling asks every device for every value on a timer, whether anything changed or not. MQTT turns this round: the gateway publishes a value to a broker only when it changes, and every consumer that subscribed receives it [3]. This is called report by exception. On a stable process the saving is large.
Plain MQTT says nothing about what a message contains. Sparkplug B, an Eclipse Foundation specification published as ISO/IEC 20237, adds three things industrial systems need [4] [6]:
- A fixed topic shape and a compact binary payload, so every consumer can decode every publisher.
- Birth certificates: when an edge node or device connects, it announces every metric with its name, type and current value.
- Death certificates: the broker publishes a pre-registered message if a node drops off, so consumers mark its data as stale instead of trusting the last value forever.
Knowledge check
A dashboard shows line 3's temperature steady at 61.8 °C for an hour. With Sparkplug B, how would you know the value is real and not just the last one before the gateway lost power?
CESMII: profiles and a shared platform
CESMII, the US Smart Manufacturing Institute, publishes Smart Manufacturing Profiles: open, reusable definitions of a type of equipment and its attributes, so that two vendors' machines can present the same structure [7] [8]. A profile is the industry-wide version of the template you built in Session 5. CESMII also runs the Smart Manufacturing Innovation Platform (SMIP) for members, a shared place to model and exchange data using those profiles [8].
For a small or mid-size plant the practical lesson is simple: before you invent a template for a common machine, look for a published profile or an OPC UA companion specification for it, and reuse its attribute names in your vocabulary.
Where Ignition fits
Ignition is the gateway most often used for this layer in mid-size plants. It is licensed per server, not per tag or per screen, connects to controllers through its drivers or OPC UA, and with Cirrus Link's MQTT modules publishes and consumes Sparkplug B [2] [9]. Its Maker Edition is free for personal, non-commercial use, which makes it a good place to practise; a plant needs a commercial licence [2].
Knowledge check
Before building a template for a common filler, what should you check first?
References
- OPC Foundation: OPC Unified Architecture. https://opcfoundation.org/about/opc-technologies/opc-ua/
- Inductive Automation: Ignition. https://inductiveautomation.com/
- OASIS: MQTT Version 5.0. https://docs.oasis-open.org/mqtt/mqtt/v5.0/mqtt-v5.0.html
- Eclipse Foundation: Sparkplug specification. https://sparkplug.eclipse.org/specification/
- OPC Foundation: Security (security bulletins and guidance). https://opcfoundation.org/security/
- Eclipse Foundation: Sparkplug announced as international standard ISO/IEC 20237. https://www.globenewswire.com/news-release/2023/11/07/2774808/0/en/The-Eclipse-Foundation-Announces-Sparkplug-as-an-International-Standard-for-a-Plug-and-Play-Industrial-IoT.html
- CESMII: Smart Manufacturing Profiles (GitHub). https://github.com/cesmii/SMProfiles
- CESMII, the Smart Manufacturing Institute. https://www.cesmii.org/
- Cirrus Link Solutions: MQTT modules for Ignition. https://cirrus-link.com/mqtt-modules/
F05B · Chapter 2 · Placement
The DMZ connector pattern
IT's first question about any plant connection is "which way does it connect, and what can come back?" This chapter places every piece on the Purdue model and builds the answer IT wants to hear: every connection starts inside and goes out, and nothing from outside ever reaches a machine.
40 min5 Purdue levels2 firewalls0 inbound connections≈ 40 minutes hands-on
By the end of this chapter you can
- Place the gateway, brokers, connector and platform on the Purdue model.
- Describe the DMZ connector pattern and why every connection is outbound.
- Write the firewall allow-list for the pattern, ending in deny all.
- Bridge two MQTT brokers so data can leave but commands cannot come back.
The map IT already uses
The Purdue model sorts plant systems into levels: the physical process and controllers at the bottom (Levels 0 and 1), supervisory control (Level 2), site operations (Level 3), and the business and the internet above (Levels 4 and 5). Between Level 3 and Level 4 sits the industrial DMZ, often called Level 3.5 [1] [2]. ISA/IEC 62443 turns the levels into zones, and every permitted path between zones into a conduit with defined rules [3].
Your platform lives in the cloud, at Levels 4 and 5. That is fine, as long as it never reaches down into the plant. The design question is only: where does each piece go, and which way does each connection start?
The pattern: outbound only
The core rule of an industrial DMZ, in the Cisco and Rockwell Automation reference designs, is that traffic from either side ends in the DMZ: nothing passes straight from the business network to the plant [2]. The DMZ connector pattern applies that rule to a cloud platform:
- The gateway at Level 3 opens a connection out to a broker in the DMZ and publishes the measures the platform needs (MQTT over TLS, port 8883).
- A small connector service in the DMZ subscribes to that broker, buffers what it receives, and sends it out to the platform over HTTPS (port 443), signed in with its own account that can only add readings (Session 7 writes that rule).
- No connection from the office or the internet ever starts inside the plant. The platform has no address to call in on, so it cannot write to the plant even if it is compromised.
When the link goes down
A plant must never depend on the internet to make product. The gateway keeps running the machines' screens, alarms and history locally. The connector stores readings while the platform is unreachable and sends them, in order, when it comes back. Sparkplug B describes the same idea at the edge as store and forward [5].
Knowledge check
A vendor proposes that their cloud service connect directly to the Level 3 gateway to collect data. What does the pattern say?
The firewall rules
Write the rules as an allow-list: each line says exactly which source may reach which destination, on which port, and why. The last line denies everything else. NIST SP 800-82 recommends this default-deny approach for operational technology networks [1].
| # | From | To | Port | Why |
|---|---|---|---|---|
| 1 | Ignition gateway (L3) | DMZ broker (L3.5) | 8883 TCP | Publish measures, TLS with certificates |
| 2 | Connector (L3.5) | DMZ broker (L3.5) | 8883 TCP | Subscribe to the platform's measures |
| 3 | Connector (L3.5) | Platform API (internet) | 443 TCP | Send readings over HTTPS |
| 4 | Connector and broker (L3.5) | Update server (L3.5) | 443 TCP | Patches, staged and tested |
| 5 | Anything | Anything | any | Deny and log |
Notice what is missing: no rule allows anything from the internet or Level 4 into Level 3, and no rule allows the DMZ to reach Level 2 or below.
Bridging brokers: out, never in
Many plants run a broker at Level 3 for local use and a second one in the DMZ. Eclipse Mosquitto, a free open-source broker, can bridge them: the site broker connects out to the DMZ broker and forwards chosen topics in one direction only [6] [7]. The bridge's out keyword is the whole lesson: data leaves; a message published on the DMZ broker never reaches the site broker.
# site.conf — the Level 3 broker (laptop lab: plain ports on this computer only)
listener 1883 127.0.0.1
allow_anonymous true
connection to-dmz
address 127.0.0.1:1884
topic acme/# out 1# dmz.conf — the DMZ broker
listener 1884 127.0.0.1
allow_anonymous trueYou need: A laptop; Eclipse Mosquitto (free, from https://mosquitto.org/download/); three terminal windows
You will run two brokers on your laptop, bridge them one way, and prove which way messages can travel. Nothing here touches the plant.
Outcome: Two bridged brokers on your laptop, with proof that measures flow out and a command published in the DMZ never reaches the site broker.
Knowledge check
Which firewall rule should never appear in this design?
Knowledge check
In the Mosquitto bridge, what does the word out in topic acme/# out 1 do?
References
- NIST SP 800-82 Rev. 3, Guide to Operational Technology (OT) Security. https://csrc.nist.gov/pubs/sp/800/82/r3/final
- Cisco and Rockwell Automation: Converged Plantwide Ethernet, Industrial DMZ design (CPwE IDMZ). https://www.cisco.com/c/en/us/td/docs/solutions/Verticals/CPwE/3-5-1/IDMZ/DIG/CPwE_IDMZ_2_CVD/CPwE_IDMZ_2_Chap2.html
- ISA: ISA/IEC 62443 Series of Standards. https://www.isa.org/standards-and-publications/isa-standards/isa-iec-62443-series-of-standards
- CISA: Industrial Control Systems (recommended practices and guidance). https://www.cisa.gov/topics/industrial-control-systems
- Eclipse Foundation: Sparkplug specification (store and forward, primary host state). https://sparkplug.eclipse.org/specification/
- Eclipse Mosquitto: an open source MQTT broker. https://mosquitto.org/
- Eclipse Mosquitto: mosquitto.conf manual (bridges, listeners, security). https://mosquitto.org/man/mosquitto-conf-5.html
F05B · Chapter 3 · Approval
Documents IT can approve
IT does not approve enthusiasm; it approves documents. This chapter writes the eight that answer IT's questions before they are asked, and adds AI agents to the design the safe way: through a read-only MCP server that can look but never touch.
30 min8 documents1 data flow table1 read-only MCP server
By the end of this chapter you can
- Prepare the eight documents of an IT approval package for the connectivity design.
- Write a data flow inventory and a failure-mode table for your plant.
- Add AI agents through a read-only MCP server, and explain why it cannot write.
What IT needs to see
An IT or OT security team reviewing a new connection asks the same questions every time: what are the parts, where do they sit, what talks to what, who can sign in, what data leaves, and what happens when something fails? ISA/IEC 62443-3-2 frames the same questions as a risk assessment over zones and conduits [1], and NIST SP 800-82 lists them for OT systems [2]. Answer them in writing, once, and keep the answers in the repository next to the code, so they change when the design changes.
| Document | Answers | Where it comes from |
|---|---|---|
| 1. Architecture diagram | What are the parts and where do they sit? | The Purdue placement in chapter 2 |
| 2. Data flow inventory | What talks to what, which way, on which port? | One row per arrow on the diagram |
| 3. Firewall rules | What exactly is allowed? | The allow-list in chapter 2, ending in deny all |
| 4. Zones and conduits | What risk does each zone carry, and what target security level? | ISA/IEC 62443-3-2 risk assessment [1] |
| 5. Identities and access | Which accounts exist, human and machine, and what can each do? | The Role and Exposure Matrix (Session 6) |
| 6. Data classification | What leaves the plant, and what never does? | The measures in your naming standard (Session 5) |
| 7. Failure modes | What happens when each link or service fails? | The store-and-forward design in chapter 2 |
| 8. Patching and logging | Who updates each component, and where do logs go? | Agreed with IT |
The data flow inventory
Every arrow on the architecture diagram becomes one row. If an arrow has no row, it does not exist; if a row has no arrow, the diagram is wrong. Reviewers trust a design where the two match exactly.
| Flow | Source → destination | Protocol and port | Starts from | Data | Account |
|---|---|---|---|---|---|
| F1 | Ignition gateway → DMZ broker | MQTT over TLS, 8883 | Plant (outbound) | Measures in the naming standard | Gateway certificate |
| F2 | Connector → DMZ broker | MQTT over TLS, 8883 | DMZ | Same measures, subscribe only | Connector certificate |
| F3 | Connector → platform API | HTTPS, 443 | DMZ (outbound) | Readings: path, value, time | Connector login: insert readings only |
| F4 | Users → platform | HTTPS, 443 | User's browser | Screens | Personal login with two-step sign-in |
Failure modes
| If this fails | The plant | The platform | Recovery |
|---|---|---|---|
| Internet link | Keeps running | Shows data as delayed | Connector replays its buffer in order |
| DMZ broker | Keeps running; gateway buffers | Shows data as delayed | Broker restarts; gateway resends |
| Connector | Keeps running | Shows data as delayed | Restart; it resumes from its buffer |
| Platform | Keeps running | Down | Restore from backup (Session 18) |
| Gateway | Machines run; local screens may stop | Data stops; marked stale | Fail over or restart the gateway |
Knowledge check
A reviewer finds an arrow on the architecture diagram from the platform to the historian that is not in the data flow inventory. What should happen?
AI agents: look, never touch
The Model Context Protocol (MCP) is an open standard for connecting AI applications to tools and data [3]. An MCP server offers an AI agent a list of named tools; the agent can call only those tools. That makes MCP a natural fit for the plant: you decide exactly which questions an agent may ask, and you give it no tool that writes.
- Place it in the DMZ or at Level 4, reading the historian replica and the platform database, never a controller or the Level 3 gateway directly.
- Offer named tools, not raw access.
get_oee(line, shift)is safe to reason about; a tool that runs any SQL is not. - Use read-only accounts underneath, so even a fault in the server cannot write.
- Log every call: who asked, which tool, which arguments, when.
- Assume prompt injection. Text the agent reads may carry hidden instructions. OWASP lists prompt injection and excessive agency among the top risks for AI applications; the defence is fewer, narrower tools and a person approving any change [4].
Tools offered by the plant MCP server (read-only)
get_oee(line, shift) -> availability, performance, quality, OEE
list_downtime(line, day) -> start, end, reason, minutes
get_open_work_orders(area) -> number, asset, priority, age
No tool writes, sends a command, or accepts free-form SQL.You need: A spreadsheet or your repository's docs folder; your naming standard from Session 5
Draft the first three documents of the package and the failure-mode table for your own plant. Use the tables in this element as templates.
Outcome: A connectivity plan with architecture, data flow inventory, firewall rules, data classification and failure modes, ready for IT to read.
Knowledge check
Which MCP tool should a plant agent not be given?
References
- ISA: ISA/IEC 62443 Series of Standards (62443-3-2: risk assessment, zones and conduits). https://www.isa.org/standards-and-publications/isa-standards/isa-iec-62443-series-of-standards
- NIST SP 800-82 Rev. 3, Guide to Operational Technology (OT) Security. https://csrc.nist.gov/pubs/sp/800/82/r3/final
- Model Context Protocol: introduction and specification. https://modelcontextprotocol.io/
- OWASP: Top 10 for Large Language Model Applications. https://genai.owasp.org/llm-top-10/
Chapter 4 · 12 questions · 80% passes
Final assessment
Twelve questions across the element. Score 80% (10 of 12) to pass. Your LMS records your score and each answer; you can review the chapters and try again.
15 min12 questions≈ 15 minutesRetake allowed
Your result
CivOps AI Academy
Enterprise Connectivity: Ignition, OPC UA, Sparkplug B and the DMZ Connector
Element F05B complete · Learner
Your LMS records this completion. For the CivOps Foundation certificate, finish the Foundation Course at https://civops.io/learn.