Skip to main content
Back to Blog
OT Security

OPC UA Security: What Enterprise OT needs to know

February 202612 min read
Engineer reviewing OPC UA certificate trust settings

OPC UA provides a high degree of security out of the box. However, once deployed, it will only be as safe as the various settings applied to it. It offers message signing, encryption, certificate and user-level identity. As discussed above, whether you can avail yourself of these is dependent upon the selected SecurityMode, appropriate management of certificates and routing of OPC UA communications beyond the site. In this article we will explore the above for Datacentre, Facility and Critical Infrastructure operators.

As a vendor-agnostic specification, OPC UA enables automation devices, facilities and 3rd party software to communicate. From the outset, the specification has sought to provide robust security features. It is the responsibility of your organization to correctly apply them to ensure the correct parties can access your OPC UA endpoints.

Secure Your Critical Infrastructure Integrations

PODTECH develops bespoke software and system integrations for a range of critical infrastructure sectors, including facility and data centre.

Visit

TL;DR

  • User, Application and Transport layer security are all provided by OPC UA, subject to the chosen SecurityMode: None, Sign or SignAndEncrypt.
  • Certificate management including issuance, TrustList, revocation and secure storage of private keys must be owned and maintained to prevent degradation of the OPC UA security model.
  • Transport-layer encryption does not cover everything; certain discovery operations remain unencrypted, and there is still risk of DoS, so network topology matters.
  • When communicating to external MQTT and Kafka services, avoid exposing firewall ingress and rely on egress with enforced TLS and client identity.
  • OPC UA security is lifecycle security; the protocol can be strong, but the outcome depends on integration quality and operational discipline.

Table of Contents

How OPC UA security is built

According to the OPC Foundation, the features offered include: encryption of the data session, message signing to ensure authenticity and detect modification, sequential delivery of messages to negate replay attack, client and server certificate based ID, user login and assigned authority, and logging.

The OPC Foundation further divides these into three tiers of security: User, Application and Transport.

TierDescription
UserEstablishes the identity of the end-user of the given application and their associated privileges.
ApplicationDefines which application(s) can communicate. This is authenticated via certificate.
TransportRelies on established methods such as TLS and AES to encrypt and sign OPC UA messages.

An alternative view is presented in a Cisco whitepaper, which identifies two tiers. A communications tier to create a trusted, confidential and authentic path, followed by a session and user level with corresponding privileges. In either case, a Security Policy must first be negotiated between client and server, defining the cryptographic primitives to be used.

Security modes and policies: the first decision

An OPC UA endpoint will publish its supported SecurityMode(s) and SecurityPolicy(s). The former indicates the type of security that can be applied; the latter specifies the crypto suite available.

SettingEffectCommentary
SecurityMode = NoneNo message signing or encryptionShould only be used during internal development
SecurityMode = SignMessages are signed for authenticity and integrity, but not encryptedSuitable only where confidentiality is not required
SecurityMode = SignAndEncryptMessages are signed and encryptedRecommended for all live environments and any communications leaving site
SecurityPolicyDetermines RSA, AES and SHA encryption and signing methodsUse the highest level supported by each device

These are defined in the OPC Foundation interoperability guidance. We note that alternative, reduced-security options are included because OPC UA must be feasible on low-power endpoints. In turn, this means that an operator will be able to remove all endpoints configured to operate with NoSecurity. All live OPC UA servers should be reviewed for this and amended accordingly.

From this point, you should collate a list of all OPC UA Servers and their respective published Endpoints. Any remaining endpoints offering NoSecurity should be noted and investigated, typically legacy or test equipment.

Certificates, trust lists and revocation

As with many aspects of cyber security, the failure of the OPC UA system in most instances will arise from poor practice around certificates. The process involves the following steps:

Every instance will have a certificate associated with it, passed to the peer upon forming a SecureChannel. The receiving party will verify if they trust this certificate by consulting one or more TrustLists configured by the System Administrator. TrustLists may contain CAs and/or CRLs as described in Part 2 of the specification.

There are 3 key clauses in the OPC UA Specification:

  1. A SecureChannel must be formed prior to Sessions. See Part 4. Parties must refuse to establish a SecureChannel if their peer's certificate(s) do not appear on a TrustList set up by the System Administrator.
  2. Trust can be withdrawn. Certificates can be removed from the relevant TrustList(s) and CRLs published by each CA. Systems may store local copies of CRLs to operate in an air-gapped environment.
  3. Certificates and associated Private Keys must be protected. Each OPC UA instance will use X.509 v3 certificates, potentially self-signed or signed by a CA. As per the Certificate Management clause of the specification, the corresponding private keys and trusted public keys should ideally reside within a hardware token such as a TPM, modifiable only by certain administrators and the OPC UA instance itself.

Should my OPC UA Instances be self-signed or signed?

Neither option has any inherent benefit or drawback from a purely cryptographic perspective. However, the OPC Foundation's advice on implementing security best practice indicates that reliance on self-signed certificates can be problematic. In particular, if the individual responsible for establishing trust with the remote instance or instances is unfamiliar with how to manage X.509 certificates. Once you start deploying large numbers of OPC UA instances across a facility, expecting individuals to manually build TrustLists at point-of-commissioning becomes untenable.

Using a Certificate Manager (GDS)

Per the OPC Foundation's Security Deep Dive whitepaper, there will be 2 TrustList Stores maintained centrally: one containing the set of Trusted Certificates and another with the set of Trusted Issuers. An OPC UA Instance can only authenticate successfully if both its certificate and chain of issuers are included in these TrustLists and have not been invalidated via a CRL.

These TrustLists may be kept up-to-date either:

  • By the OPC UA Instance pulling them from the CertificateManager, referred to as a GDS.
  • By the GDS pushing them to the OPC UA Instance.

In the Practical Security Guidance, both approaches are deemed preferable to manual administration of the TrustLists, although CRLs should continue to be administered by select administrators.

If your system relies on HTTPS for its underlying transport mechanism, note that it will not support OPC UA instance-to-instance authentication per the specification. Consequently, you must ensure that user accounts used to log into the system are sufficiently robust and bound to a specific person.

What OPC UA encryption does not cover

As noted above, SignAndEncrypt provides a high degree of assurance for OPC UA deployments. However, there are still some attack vectors worth considering, identified in a report commissioned by the OPC Foundation from the BSI:

  • Discovery services remain exposed. The services FindServers, FindServersOnNetwork and GetEndpoints must be exposed without encryption and signing from all OPC UA Instances, irrespective of whether SignAndEncrypt is enabled. Therefore, the presence of an instance and the endpoints that it advertises can be discovered by any network neighbor.
  • There is still DoS risk. Due to the computational cost required to decrypt messages and validate signatures, an adversary may be able to cause significant CPU consumption on target OPC UA instances by sending a suitably crafted volume of traffic.

Accordingly, network isolation of OPC UA instances and careful configuration of the firewall should be implemented. Of course, encryption is essential to prevent eavesdropping.

Securing OPC UA across the IT/OT boundary

Typically, the flow of OPC UA data will eventually exit the confines of the factory, site or data-center to feed further business processes such as data warehouses, data lakes and 3rd party SaaS. This is likely to represent the largest surface area of exposure.

Recent publications from ISA suggest avoiding the opening of inbound firewall rules on the OT network. Rather, the OT network should only allow connections initiated by itself to a message broker via MQTT or OPC UA PubSub, possibly incorporating the Sparkplug specification, or utilize a VPN or other equivalent data-mirroring solution. Multi-level hops of OPC UA through a DMZ may incur unacceptable delays and potential data-drop, whereas a single hop to an MQTT Broker deployed in the DMZ is considered feasible.

This yields an intuitive architecture:

OT ZoneOPC UA ServersSignAndEncryptTrustList + CertsDMZ / Broker LayerMQTT BrokerIT / ExternalConsumersAnalytics / SaaS / AppsNo direct OT accessOutbound onlyTLS + client identityControlled accessNo inbound firewall exposure into OT
  1. Deploy OPC UA Servers internally, configured with SignAndEncrypt and a suitable TrustList.
  2. Configure the OT network to permit connections initiated from an internal host to an external broker, providing suitable instance authentication.
  3. Permit external systems to connect to the external broker, prohibiting direct connections to the internal OT network.

Similarly, when enabling staff to access the above-described OT systems from outside the factory boundary, it will be important to enforce strong Identity and Access Management. Please see our article on implementing Identity-Centric Remote Monitoring and the Industrial IoT Security Series for further information.

OPC UA over MQTT: securing the bridge

With the publication of OPC UA Part 14 in 2018, OPC UA can be mapped onto the MQTT and AMQP messaging protocols, preserving the full range of security features and consistent Information Object Models. As explained by the OPC Foundation in this blog post, gateways can therefore publish and receive messages to and from an MQTT Broker with messages encoded as JSON or binary and protected by encryption and X.509 certificates.

It is important to recognize the following set of OPC UA Instances when implementing this integration:

  • From the OPC UA perspective, the gateway will assume the role of a client and require its own certificate to be accepted by the OPC UA Server.
  • Broker: the gateway will connect over TLS using a dedicated identity and be constrained by topic-level ACLs.
  • Message content: you can secure each link with TLS to the broker or implement message signing and encryption. The latter provides continued confidentiality were the broker to be breached.

Before looking at integrating OPC UA, you should also consider your information architecture. If your OPC UA-to-Kafka bridge simply maps all available UA nodes to arbitrary topics, enforcing appropriate access controls will quickly become problematic.

Sending OPC UA data to Kafka

Publishing OPC UA data onto Kafka

As discussed above, if the volume justifies it, publishing data to Kafka for downstream ML and reporting is a sensible option. As noted, this requires consideration of how to enforce security on both sides of the link.

For OPC UA, the relevant software will need to be configured to authenticate to the server via a valid certificate and be included in the appropriate TrustList. Apache StreamPipes introduced support for this in release 0.97.0. It allows customers to manage provision of these certificates outside of the software itself, and the Kafka source and sink plugins allow SSL, SASL and configurable producer and consumer options.

At the Kafka layer, ensure TLS is enforced between nodes and all communicating parties, and mandate the use of client certificates. We recommend the guidance provided by CleanStart, which prescribes TLS 1.2+ with GCM-based ciphers, PKCS12 key stores, mandatory client auth and strict Hostname Checking. This should form a reasonable base for any US facility requiring FIPS 140-3 compliant crypto.

Crucially, the OPC UA-Kafka publishing service should be deployed such that it can access the target or targets but cannot be accessed from the OT domain.

A checklist for an OPC UA security review

Key points to consider when auditing your OPC UA setup

Whether deploying a fresh system or revisiting one, ensure you check:

  • All live UA resources are operating with at least SignAndEncrypt, and any NoSecurity options have been removed.
  • The highest level of UA security permitted by the relevant resources is being used.
  • An individual certificate is issued per application, with associated keys safely stored or within a secure hardware token.
  • Where feasible, a common point of administration of TrustLists exists, and CRLs can only be modified by appropriate personnel.
  • No anonymous sessions are allowed; individual user credentials are created with suitable levels of privilege.
  • The relevant OPC UA interfaces can only be contacted from pre-approved locations, acknowledging the lack of hardening against UA node discovery and enumeration.
  • There are no open ingress ports on your OT firewall, and all communications to external networks are made via outbound-only broker and/or tunnelled links.
  • Logging is performed and monitored.
  • Certificate validity periods are known, and responsibility for refresh is assigned.

The OPC UA Security Special Interest Group, with Fraunhofer IEM and Hochschule Offenburg, drives this message home very explicitly in their advice document, namely that appropriate measures must be taken throughout the product life-cycle.

Why integration quality decides your security outcome

It is at the boundaries with other technologies that deficiencies typically arise. Whether this be a piece of equipment limited to a lower level of security, a BMS commissioned with no security, an expired gateway certificate, or an unmanaged TrustList in the monitoring software, all represent choices made during system integration.

Consequently, the organization responsible for performing your integrations will be a major factor in the final position. BMS, PMS and NMS will each have their own nuances, and the number of trusted relationships to establish and manage grows as your estate expands. Further information on our experience in the building management space can be found on the PODTECH site, while migrating SCADA assets to a cloud-based, data-led solution is also part of the wider modernization challenge.

How PODTECH can help

PODTECH's offering

PODTECH develops bespoke, large-scale IT solutions for the industrial and infrastructure markets. With more than 250 implementations completed worldwide, our core focus areas span BMS, PMS and NMS, data centre and facility monitoring, conversion of existing systems and wider enterprise control. All offerings come underpinned by a minimum 99.9% availability guarantee and 24x7 global assistance.

To begin your assessment of how best to integrate your current and future OPC UA assets, identify the target platforms and engage the appropriate team. We offer dedicated integration, modernization and enterprise automation services to meet this need, or you may get in touch via our website to learn more about your current requirements.

Our perspective

While there are many features within OPC UA to enable secure deployment of the protocol, the success of any particular implementation rests with the actions of those establishing and maintaining the links.

In any critical facility, the failure of a single component to meet this requirement could have serious implications, given the surrounding dependency on the remaining plant to provide essential services. It follows that the scope of the integration is therefore far broader than simply connecting the UA assets to the chosen IT system.

Having supported numerous installations, including in highly scrutinized sectors, our team has developed a set of principles to guide their activity. Establishing a suitable framework of trusted parties, ensuring each certificate has a custodian, restricting ingress into the OT zone, and instrumenting the IT stack to track these elements will allow a safe and effective transfer of data.

Harry

FAQ

Is OPC UA secure out of the box?

There are several mechanisms available within OPC UA to ensure security, including message signing, encryption, certificate and username verification. However, all of these must be explicitly turned on. It's possible to set an endpoint to "None", meaning that it will accept unencrypted, unsigned communications. For live deployments, you should consider using SignAndEncrypt and remove any NoSecurityModeSupported endpoints.

Should my OPC UA endpoints have a Certificate Authority (CA)?

Not necessarily. OPC UA supports both self-signed and CA-signed certificates with equivalent status. Naturally, having competent staff who are aware of what they're trusting will help, and there will likely be some advantage in implementing a CA across a sizeable network of OPC UA nodes.

Will OPC UA traverse a firewall?

As discussed above, yes. This is significantly easier to achieve compared to DCOM. Ideally, OPC UA nodes will make only egress connections, for example to an intermediate node or over a VPN, with that node hosted in the DMZ.

How can I safely forward OPC UA messages to MQTT or Kafka?

Add a certificate for your MQTT or Kafka gateway to the OPC UA node or nodes, and connect via TLS with client certificate authentication. You can also apply per-topic access controls. Finally, consider if further security is required over the PubSub link itself.

Sources