[Pipe] Prevent unexpected OPC UA endpoint redirects#18259
Merged
Conversation
jt2594838
approved these changes
Jul 21, 2026
2 tasks
jt2594838
pushed a commit
that referenced
this pull request
Jul 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Problem
Outbound OPC UA client
The Eclipse Milo client discovers endpoints from the configured OPC UA server and then connects to the endpoint URL advertised by the server. If the advertised hostname differs from node-url and resolves to another machine, Pipe can silently send data to the wrong OPC UA server.
Readers of the internal OPC UA server
The internal server binds to 0.0.0.0 and, by default, publishes its detected hostname and local interface addresses. Milo filters GetEndpoints by the requested host only when that host exactly matches a published endpoint. When a reader reaches the server through NAT, a VIP, a container mapping, a load balancer, or a DNS alias, the host may not match. The server then returns all local endpoints, and a reading or subscribing client may reconnect to a colliding hostname and read from the wrong internal server.
Pipe writes directly into the internal server namespace, so it does not have the outbound writer problem. External browse, read, and subscription clients still follow endpoint discovery, so the advertised-host handling from opc_server commit 78dc20ec15fff4b29ce2a3aa291fcdc521260a4b is ported here for the reader side.
Behavior
Outbound client
Internal server
Tests
This PR has:
Key changed/added classes (or packages if there are too many classes) in this PR