-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Full 1.05.06 compliant OPC UA Part 14 (PubSub) #3892
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
marcschier
wants to merge
142
commits into
master
Choose a base branch
from
part14pubsub
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+145,715
−64,571
Open
Changes from all commits
Commits
Show all changes
142 commits
Select commit
Hold shift + click to select a range
894c4a6
Phase 0: Scaffolding for Part 14 PubSub reimplementation
marcschier 63f48b5
Phase 1: Core PubSub abstractions and state machine
marcschier e5a8e4a
Phase 2/3/4: UADP + JSON encoders + configuration validator
marcschier 0ff3e0c
Phase 5/6: UDP and MQTT transports
marcschier ff1a1ec
Phase 7: PubSub security subsystem
marcschier 53f3020
Phase 8: Security Key Service (SKS) client and in-memory server
marcschier 1be00be
Phase 10/13: Server address space + v1.05.06 compliance fixes
marcschier f2e3f40
Phase 14: Runtime integration of orphaned security + chunking + KeepA…
marcschier 77fb4e2
Phases 15/16(partial)/17: subscriber semantics + metadata pub + confi…
marcschier c0bf686
Phase 16 follow-up: complete sub-tasks 16b-g
marcschier de69931
Phase 11: rewrite samples to fluent/DI, enable NativeAOT publish, add…
marcschier d954527
Phase 12: replace Docs/PubSub.md, expand migration guide, add benchma…
marcschier 4998144
Phase 12 coverage lift (partial): +163 tests, 72/72/79/74% vs 80% target
marcschier 6a173a2
Phase 12 coverage lift (round 2): Mqtt/Server pass 80%, fix Publisher…
marcschier 32830d6
Phase 12 coverage lift: UDP datagram tests
marcschier bcdf5e9
Phase 12 coverage lift: UADP raw binary tests
marcschier a43bd2b
Phase 12 coverage lift: JSON array tests
marcschier dd4bdf3
Phase 12 coverage lift: legacy UADP flags
marcschier f0837fc
Phase 12 coverage lift: legacy UADP encode tests
marcschier 784ef3d
Phase 12 coverage lift: JSON constructor paths
marcschier 7350a5b
Phase 12 coverage lift: configurator compatibility tests
marcschier f77ba7c
Phase 12 coverage lift: configurator branch tests
marcschier a8f5414
Phase 12 coverage lift: JSON and configurator edges
marcschier 424a860
Phase 12 coverage lift: JSON scalar edge tests
marcschier 7794dcb
Phase 12 coverage lift (final): all 4 PubSub libs ≥80%
marcschier d20fca2
Security S1+S3: wire message security fail-closed + decoder/reassembl…
marcschier 56c84b7
Security S2: replay protection + deterministic nonce + SKS per-group …
marcschier 490480f
Security S4+S5: SKS-client TLS, validator diagnostics, key zeroizatio…
marcschier 97c39bb
Merge branch 'master' into part14pubsub
marcschier dc9c4de
Address PR #3892 review feedback: DeadbandFilter ConvertToDouble + do…
marcschier 8c55052
Codestyle: fix analyzer diagnostics in PubSub projects after master m…
marcschier e3fe9a3
PR #3892 follow-ups R1-R4: ArrayOf public API, record structs, migrat…
marcschier 76b23c3
Fix analyzer warnings on branch changes (CA2000, CA2025)
marcschier 10d7c95
Address PR #3892 review feedback (round 2): mechanical + doc cleanups
marcschier 149d923
PR #3892 structural follow-ups P1-P5
marcschier 948ce73
Fix CI: repair Opc.Ua.Aot.Tests/PubSubAotTests.cs (RCS1094 + JSON ali…
marcschier fe38a28
Fix CI: wire SampleSecurity key provider in publisher AOT tests (PSC1…
marcschier 501f81a
Merge remote-tracking branch 'origin/master' into part14pubsub
marcschier 636568a
Phase 2: integrate master merge into PubSub libraries
marcschier e5ee024
Fix CI: make PubSub test projects build on net48/net472
marcschier dcac373
Remove Opc.Ua.PubSub.Legacy compatibility layer
marcschier 95d0455
Add all Docs/ markdown files to UA.slnx
marcschier 63b458c
Merge branch 'master' into part14pubsub
marcschier 7584ea9
Use one-shot EncryptEcb for AES-CTR keystream on net6+ (CodeQL #349)
marcschier 4051143
Skip UDP multicast loopback tests when send has no route (macOS CI)
marcschier 1783a1e
Merge remote-tracking branch 'origin/master' into part14pubsub
marcschier a41d708
PubSub diagnostics S1: opt-in transport capture seam
marcschier 7ea8421
PubSub diagnostics S2 + MCP S6: capture library scaffold + PubSub MCP…
marcschier f889482
PubSub diagnostics S3: offline dissection + pcap/json/text formats + …
marcschier e498301
PubSub diagnostics S4 + S5: encrypted UADP decryption, SKS keys, DI/e…
marcschier 1dcdcf6
PubSub diagnostics S9 (docs): add Docs/PubSubDiagnostics.md
marcschier 962d0d4
PubSub diagnostics S8: MCP capture / dissection tools
marcschier d84788b
PubSub diagnostics S7 + S9: MCP publish/subscribe runtime + diagnosti…
marcschier d1d8eb2
Address PR #3900 review feedback: capturing decorator, single MCP ref…
marcschier 59eadc7
MCP PubSub tools: drop redundant config wrappers, add discovery; plan…
marcschier b64616c
PubSub Actions S1-S3: JSON + UADP action messages + PublishedAction s…
marcschier 25ae465
PubSub Actions S4: requester/responder runtime + correlation
marcschier 281bcb2
PubSub Actions S5 + S6: server method binding + DI/fluent responder w…
marcschier 15c3973
PubSub Actions S7: MCP PubSubActionTools
marcschier 9c82df0
Bump actions/checkout from 6 to 7
dependabot[bot] bdd0e0f
PubSub Actions S8: docs + mark plans/28 implemented
marcschier c1a10af
Fix PubSubConnection private-method test reflection ambiguity
marcschier 9449270
Merge remote-tracking branch 'origin/dependabot/github_actions/action…
marcschier 9d0ccf0
Fix PubSub MQTT topics and discovery encoding
marcschier 0ac87b1
Fix PubSub message encoding conformance
marcschier 4bed79e
Fix PubSub config model state handling
marcschier 9491462
Implement PubSub SKS push and key rotation
marcschier 4231ecc
Complete MQTT discovery status wiring
marcschier 2a27e9a
Complete PubSub configuration model methods
marcschier 3b63f63
Merge branch 'fix/pubsub-config' into part14pubsub
marcschier 94ec43c
Merge branch 'fix/pubsub-security' into part14pubsub
marcschier b35e04b
Finish PubSub discovery announcements
marcschier 7b15a99
Merge branch 'fix/pubsub-transport' into part14pubsub
marcschier 70ec418
Fix down-level (net48/netstandard) compatibility in merged PubSub con…
marcschier 5ef4308
Document Part 14 v1.05.07 PubSub conformance changes
marcschier 22988c2
Fix PubSub round 2 encoding conformance
marcschier f5a59db
Fix PubSub dynamic address space routing
marcschier 4bcd3b4
Harden PubSub SKS key handling
marcschier 34acbc8
Fix PubSub transport remediation gaps
marcschier 4a1595e
Add DTLS profile registry
marcschier 417293d
Add DTLS transport scaffolding
marcschier 96bd4ce
Wire opc.dtls endpoints into UDP transport
marcschier 82409c0
Add DTLS record protection mechanics
marcschier c876d0b
Add TLS 1.3 DTLS key schedule
marcschier 3109d48
Keep DTLS crypto helpers cross-TFM safe
marcschier 8b51115
Use DTLS crypto wrapper in tests
marcschier a0db14d
Materialize PubSub SKS address-space nodes
marcschier 020dc59
Keep DTLS crypto tests on supported TFMs
marcschier 4807272
Add PubSub HA provider contracts
marcschier 0f05c29
Test PubSub HA provider registrations
marcschier 15bf276
Add DTLS handshake message codecs
marcschier eeff0b2
Add DTLS ECDHE key share support
marcschier a0311a3
Add DTLS handshake reliability helpers
marcschier a8727ef
Add DTLS certificate authentication helpers
marcschier 9f506d3
Add DTLS retry timer and HRR cookie helpers
marcschier 0be4f16
Add DTLS Finished and KeyUpdate helpers
marcschier 4d459ee
Complete DTLS handshake flight driver
marcschier cf204dc
Optimize DTLS record protection
marcschier e7e2e33
Expand DTLS test and AOT coverage
marcschier 525b227
Document PubSub DTLS transport
marcschier 50dc142
Wire PubSub runtime state providers
marcschier e30a60c
Test PubSub provider failover rebuild
marcschier 92d80b2
Move DTLS code from Security/Dtls to Dtls (drop intermediate Security…
marcschier 1f1fcbf
Address PR #3906 review feedback: docs v1.05.06 links, trim new-in-2.…
marcschier 133486b
Address PR #3906 review feedback (round 2): restore 1.05.07 in core/P…
marcschier 40b7fc7
Move DTLS ZeroMemory/FixedTimeEquals into stack CryptoUtils; remove P…
marcschier 2100ec9
Fix High PubSub security findings SA-REGR-01 and SA-ACT-01
marcschier e2a770b
Remediate all Medium/Low PubSub security findings (14)
marcschier 24291cd
Merge fix/pubsub-r2-encodings into part14pubsub (round-2 encoding con…
marcschier 41bc5b5
Merge fix/pubsub-r2-server into part14pubsub (HA runtime-state provid…
marcschier bc0e8a1
Remediate Info DTLS findings SA-DTLS-CRYPTO-03 and SA-DTLS-HS-07
marcschier c536f7c
Add Opc.Ua.PubSub.Adapter: PubSub publisher/subscriber/action adapter…
marcschier 34a7314
Merge remote-tracking branch 'origin/master' into part14pubsub
marcschier 8f73200
Consolidate the three PubSub console samples into ConsoleReferencePub…
marcschier 04f114c
Address PR #3892 review feedback: rename adapter (drop External), mer…
marcschier 2768d69
PubSub adapter hot-reload, model-change monitoring, runtime data-set …
marcschier e282b23
Address PR #3892 review: rename sample to ConsoleReferencePubSubClien…
marcschier 9f9860e
Fix CI: net48 build breaks in PubSub test projects + platform-guard D…
marcschier 372c38a
Merge remote-tracking branch 'origin/master' into part14pubsub
marcschier 02c0c86
Fix CI: guard DtlsRecordProtectionBenchmarks SetUp for platforms lack…
marcschier 31b195e
Address PR #3892 review: sample multi-mode external bridge, remove ob…
marcschier f9582a6
Add hot-reload demo to ConsoleReferencePubSubClient + opt-in file wat…
marcschier a383f6f
Fix CI: net48 ServerConnectionOptions.GetHashCode null-string crash +…
marcschier f8370de
Merge remote-tracking branch 'origin/master' into part14pubsub
marcschier f38b82a
Fix all-TFM CI build: MQTTnet v4/v5 selection under netstandard2.1 pin
marcschier 2511a55
Centralize sensitive-buffer crypto helpers on stack CryptoUtils
marcschier 01c0209
Fix build-windows-all-tfm: PubSub.Diagnostics netstandard2.0 shell
marcschier 0185308
Fix flaky macOS PubSub UDP loopback tests (HostUnreachable)
marcschier 338992f
Merge origin/master into part14pubsub
marcschier 25f96e4
Merge origin/master into part14pubsub (#3921 StatusCode equality)
marcschier aca14d1
Harden DTLS Certificate handle ownership and disposal
marcschier a99ab30
Format/diagnostic sweep on DTLS Certificate ownership changes
marcschier 4149133
Add CA trust chain to MQTT TLS configuration surface (#3920)
marcschier 606b17a
Add OPC UA PubSub Ethernet (Layer 2) transport opc.eth:// (squash #3915)
marcschier ddc11c5
Runtime schema generation (XSD/BSD/JSON) + PubSub message schemas (sq…
marcschier 3ccb17e
Merge remote-tracking branch 'origin/master' into part14pubsub
marcschier 78d298b
dotnet format sweep on squashed #3915/#3916 changes
marcschier 190971c
Fix build-linux-all-tfm: Eth Pcap test under netstandard2.1 pin
marcschier 094d4fb
Fix Docker Reference Server build: copy Opc.Ua.Core.Schema csproj
marcschier b753d48
Merge remote-tracking branch 'origin/master' into part14pubsub
marcschier 3a70e9a
Address PR #3892 review feedback (round 5)
marcschier f4ca52a
Consolidate TFM-support warning suppression to common.props (#3927)
marcschier File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
85 changes: 85 additions & 0 deletions
85
Applications/ConsoleReferencePubSubClient/ConsoleLoggingSink.cs
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,85 @@ | ||
| /* ======================================================================== | ||
| * Copyright (c) 2005-2026 The OPC Foundation, Inc. All rights reserved. | ||
| * | ||
| * OPC Foundation MIT License 1.00 | ||
| * | ||
| * Permission is hereby granted, free of charge, to any person | ||
| * obtaining a copy of this software and associated documentation | ||
| * files (the "Software"), to deal in the Software without | ||
| * restriction, including without limitation the rights to use, | ||
| * copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
| * copies of the Software, and to permit persons to whom the | ||
| * Software is furnished to do so, subject to the following | ||
| * conditions: | ||
| * | ||
| * The above copyright notice and this permission notice shall be | ||
| * included in all copies or substantial portions of the Software. | ||
| * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
| * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES | ||
| * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | ||
| * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT | ||
| * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, | ||
| * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | ||
| * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | ||
| * OTHER DEALINGS IN THE SOFTWARE. | ||
| * | ||
| * The complete license agreement can be found here: | ||
| * http://opcfoundation.org/License/MIT/1.00/ | ||
| * ======================================================================*/ | ||
|
|
||
| using System; | ||
| using System.Collections.Generic; | ||
| using System.Text; | ||
| using System.Threading; | ||
| using System.Threading.Tasks; | ||
| using Microsoft.Extensions.Logging; | ||
| using Opc.Ua.PubSub.DataSets; | ||
| using Opc.Ua.PubSub.Encoding; | ||
|
|
||
| namespace Quickstarts.ConsoleReferencePubSubClient | ||
| { | ||
| /// <summary> | ||
| /// <see cref="ISubscribedDataSetSink"/> that prints every received | ||
| /// DataSetMessage to the console via an | ||
| /// <see cref="ILogger"/>. Demonstrates the Part 14 §6.2.9 sink | ||
| /// extension point. | ||
| /// </summary> | ||
| public sealed class ConsoleLoggingSink : ISubscribedDataSetSink | ||
| { | ||
| private readonly ILogger m_logger; | ||
| private long m_received; | ||
|
|
||
| public ConsoleLoggingSink(ILogger logger) | ||
| { | ||
| if (logger is null) | ||
| { | ||
| throw new ArgumentNullException(nameof(logger)); | ||
| } | ||
| m_logger = logger; | ||
| } | ||
|
|
||
| public ValueTask WriteAsync( | ||
| IReadOnlyList<DataSetField> fields, | ||
| CancellationToken cancellationToken = default) | ||
| { | ||
| cancellationToken.ThrowIfCancellationRequested(); | ||
| long sequence = Interlocked.Increment(ref m_received); | ||
| var builder = new StringBuilder(); | ||
| for (int i = 0; i < fields.Count; i++) | ||
| { | ||
| DataSetField field = fields[i]; | ||
| if (i > 0) | ||
| { | ||
| builder.Append(", "); | ||
| } | ||
| builder.Append(string.IsNullOrEmpty(field.Name) ? $"f{i}" : field.Name); | ||
| builder.Append('='); | ||
| builder.Append(field.Value.IsNull ? "(null)" : field.Value.ToString()); | ||
| } | ||
| m_logger.LogInformation( | ||
| "DataSet #{Sequence} received ({FieldCount} fields): {Fields}", | ||
| sequence, fields.Count, builder.ToString()); | ||
|
marcschier marked this conversation as resolved.
Dismissed
|
||
| return ValueTask.CompletedTask; | ||
| } | ||
| } | ||
| } | ||
37 changes: 37 additions & 0 deletions
37
Applications/ConsoleReferencePubSubClient/ConsoleReferencePubSubClient.csproj
|
marcschier marked this conversation as resolved.
|
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| <Project Sdk="Microsoft.NET.Sdk"> | ||
| <PropertyGroup> | ||
| <TargetFramework>net10.0</TargetFramework> | ||
| <OutputType>Exe</OutputType> | ||
| <AssemblyName>ConsoleReferencePubSubClient</AssemblyName> | ||
| <PackageId>ConsoleReferencePubSubClient</PackageId> | ||
| <Company>OPC Foundation</Company> | ||
| <Description>Self-contained OPC UA Part 14 PubSub reference sample with three command-line-selectable modes (publisher, subscriber, external-server adapter bridge) built on the fluent + DI Host surface. Native AOT compatible.</Description> | ||
| <Copyright>Copyright © 2004-2026 OPC Foundation, Inc</Copyright> | ||
| <RootNamespace>Quickstarts.ConsoleReferencePubSubClient</RootNamespace> | ||
| <Nullable>enable</Nullable> | ||
| <IsPackable>false</IsPackable> | ||
| <PublishAot>true</PublishAot> | ||
| <!-- Opt into the root Directory.Build.targets no-op shape on | ||
| per-TFM CI matrix entries that pin CustomTestTarget to a | ||
| legacy TFM this sample cannot target. --> | ||
| <RestrictForLegacyTfm>true</RestrictForLegacyTfm> | ||
| </PropertyGroup> | ||
| <ItemGroup> | ||
| <ProjectReference Include="..\..\Libraries\Opc.Ua.Configuration\Opc.Ua.Configuration.csproj" /> | ||
| <ProjectReference Include="..\..\Libraries\Opc.Ua.PubSub\Opc.Ua.PubSub.csproj" /> | ||
| <ProjectReference Include="..\..\Libraries\Opc.Ua.PubSub.Udp\Opc.Ua.PubSub.Udp.csproj" /> | ||
| <ProjectReference Include="..\..\Libraries\Opc.Ua.PubSub.Eth\Opc.Ua.PubSub.Eth.csproj" /> | ||
| <ProjectReference Include="..\..\Libraries\Opc.Ua.PubSub.Mqtt\Opc.Ua.PubSub.Mqtt.csproj" /> | ||
| <ProjectReference Include="..\..\Libraries\Opc.Ua.PubSub.Adapter\Opc.Ua.PubSub.Adapter.csproj" /> | ||
| </ItemGroup> | ||
| <ItemGroup> | ||
| <PackageReference Include="Microsoft.Extensions.Hosting" /> | ||
| <PackageReference Include="Microsoft.Extensions.Logging.Console" /> | ||
| <PackageReference Include="System.CommandLine" /> | ||
| </ItemGroup> | ||
| <ItemGroup> | ||
| <None Update="appsettings.json"> | ||
| <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> | ||
| </None> | ||
| </ItemGroup> | ||
| </Project> |
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.