Marcio Cunha

Sidecar Architecture for Authentication in OPC UA

Discover how to implement the sidecar pattern to inject robust security and authentication into non-TCP industrial protocols like OPC UA. Improve data governance without altering legacy factory systems.

Marcio Cunha•2 min
Also available in:EspañolPortuguês
Summary
  • The sidecar pattern isolates authentication logic from the industrial process core, allowing for independent security updates.
  • Implementation in OPC UA addresses identity gaps by acting as a reverse proxy that validates tokens before server communication.
  • The latency introduced by the sidecar is negligible compared to the gains in compliance with standards like IEC 62443.
  • Container orchestration facilitates the deployment of this architecture in OT networks without needing to rewrite legacy drivers.
  • Separation of concerns allows the OPC UA endpoint to focus exclusively on data exchange while the sidecar manages TLS and certificates.

The challenge of authentication in industrial protocols

The OPC UA (Open Platform Communications Unified Architecture) protocol is the gold standard in Industry 4.0 for machine-to-machine communication. However, its native security implementation, based on X.509 certificates, can be complex to manage at scale. When dealing with legacy systems or devices that do not natively support modern authentication layers, the sidecar architecture emerges as a robust solution to bypass limitations without modifying the original application.

The Sidecar concept applied to automation

In the world of microservices, a sidecar is an auxiliary component that runs alongside a main container, sharing the same lifecycle and network space. In practice, it acts as a 'bodyguard' that intercepts all application network traffic. For OPC UA, the sidecar acts as a mediator: it receives requests from external clients, validates authentication against a central service (such as an Identity Provider), and, only if authorized, forwards the request to the local OPC UA server.

Proxy architecture for OPC UA

Implementing this pattern requires the OPC UA server to be configured to listen only to local connections ('localhost'). The sidecar, running in the same Pod or network, exposes the external interface. This strategy isolates the server from direct exposure to the factory network. To handle non-TCP protocols or the complex binary traffic of OPC UA, proxies that understand the application layer are often used, ensuring that packet integrity is not compromised during inspection.

Practical implementation with containers

When using Docker or Kubernetes, configuration is simplified through shared networking. The authentication container (sidecar) can run software like Nginx (with custom modules) or a custom implementation in Go or Python that manages OPC UA sessions. The key is to ensure that traffic moving from the sidecar to the local server is treated as trusted, creating a hardened security zone. To complement this implementation in production environments, see our related technical analyses on Istio Ambient Mode: Implementing Distributed Service Mesh Without Sidecars and Implementing Native Rust Sidecar Service Meshes for Overhead Reduction in Microservices.

Steps for basic deployment

  1. Configure the OPC UA server to bind only to the internal loopback interface of the container.
  2. Deploy the sidecar as a sidecar container that encapsulates OPC UA traffic.
  3. Configure network traffic so all external communication must pass through the sidecar.

Conclusion

Adopting the sidecar pattern for industrial authentication transforms how we protect critical assets. By decoupling security from control logic, we gain flexibility to apply patches and renew certificates without interrupting production.

This approach not only solves immediate connectivity problems but prepares the infrastructure for future industrial cybersecurity requirements. The intelligent use of containers and network proxies is the shortest path between industrial legacy and digital modernization with proper governance.