* Initial plan
* Fix ObjectDisposedException in SubscriptionManager background tasks
Add ObjectDisposedException handling in PublishSubscriptionsAsync and ConditionRefreshWorkerAsync to gracefully handle shutdown race condition where semaphore/events are disposed while background tasks are still running.
Co-authored-by: romanett <7413710+romanett@users.noreply.github.com>
* Update log messages to differentiate normal and disposed shutdown paths
Added clarification in log messages to indicate when tasks exit due to ObjectDisposedException during shutdown, making it easier to distinguish from normal shutdown in logs.
Co-authored-by: romanett <7413710+romanett@users.noreply.github.com>
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: romanett <7413710+romanett@users.noreply.github.com>
- Fix bug in MonitoredItem.Publish (for loop was never executed)
- MonitoredItem.CacheQueueSize property was not serialized
- Add unit tests for MonitoredItems
Refactor to make OPC UA server subscription and monitored item management fully asynchronous, improving scalability and responsiveness. All key methods in ISubscription, ISubscriptionManager, and related classes are now async, with synchronous counterparts removed.
* remove all usages of SoftwareCertificates
- Client
- Server
As per spec they are not relevant for security.
If an SDK User wants to use the SoftwareCertificates ActivateSession can be overriden
* remove from SessionClientBatchTests
* Refactor ApplicationConfiguration serialization for deprecated settings and add tests for configuration behavior
* Update ApplicationConfiguration to prefer modern elements in "hybrid" configurations and add corresponding tests
* Fix GDS Tests on netstandard2.1 custom test target
* Add Test reading file containing ApplicationCertificate and ApplicationCertificates ensuring it is not marked legacy.
* Add legacy config test with only one ApplicationCertificate
---------
Co-authored-by: Roman Ettlinger <romanett98@gmail.com>
* Initial plan
* Fix BadUserAccessDenied when SecurityPolicy/SecurityMode not matching
Modified MatchEndpoints method to throw appropriate exceptions:
- BadSecurityPolicyRejected when requested policy is not supported
- BadSecurityModeRejected when requested mode is not supported
- Maintains backward compatibility when no specific security settings requested
Added comprehensive tests to verify the fix.
Co-authored-by: romanett <7413710+romanett@users.noreply.github.com>
* Improve code readability with extracted boolean variables
Applied code review feedback to extract parameter validation checks
into separate boolean variables for better readability.
Co-authored-by: romanett <7413710+romanett@users.noreply.github.com>
* Add integration test for unsupported security policy
Added ConnectWithUnsupportedSecurityPolicyAsync test that:
- Uses ClientFixture to connect to test server
- Requests a security policy not supported by server
- Verifies BadSecurityPolicyRejected is thrown instead of BadUserAccessDenied
- Tests run successfully on net8.0 and net9.0 targets
Co-authored-by: romanett <7413710+romanett@users.noreply.github.com>
* Add policy that will never work
* ignore faulty test
* update
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: romanett <7413710+romanett@users.noreply.github.com>
Co-authored-by: Roman Ettlinger <romanett98@gmail.com>
* Initial plan
* Replace BouncyCastle dependency with .NET Framework APIs for CSR parsing in GDS Server
Co-authored-by: romanett <7413710+romanett@users.noreply.github.com>
* Address code review feedback: improve error handling and add RSA key validation
Co-authored-by: romanett <7413710+romanett@users.noreply.github.com>
* Add comprehensive tests for PKCS#10 CSR parsing functionality
Co-authored-by: marcschier <11168470+marcschier@users.noreply.github.com>
* Fix collection expression syntax for broader framework compatibility
Co-authored-by: marcschier <11168470+marcschier@users.noreply.github.com>
* Fix ECDSA signature verification and remove useless test
Co-authored-by: marcschier <11168470+marcschier@users.noreply.github.com>
* Fix ECDSA signature format conversion based on code review
Co-authored-by: marcschier <11168470+marcschier@users.noreply.github.com>
* Improve RSA/ECDSA CSR parsing and .NET Framework test logic
- Remove leading zero from RSA modulus and validate key sizes in PKCS#10 CSR parsing.
- Enhance ECDSA signature decoding: return null for invalid sizes, trim only a single leading zero, and prevent exceptions on malformed signatures.
- Restrict GDS test certificate types to RSA on .NET Framework; skip ECC signing tests where unsupported.
- Add stub for unsupported signing request checks.
- General code cleanup and improved comments for clarity and standards compliance.
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: romanett <7413710+romanett@users.noreply.github.com>
Co-authored-by: marcschier <11168470+marcschier@users.noreply.github.com>
Co-authored-by: Marc Schier <marcschier@hotmail.com>
* Initial plan
* Fix parent-child references when importing NodeSet2.xml
- Added LinkParentChildRelationships method to establish parent-child links after import
- Sets Parent property and adds child to parent's children collection
- Added test to verify parent-child references work correctly after import
- All existing tests continue to pass
Co-authored-by: romanett <7413710+romanett@users.noreply.github.com>
* Make parent-child linking optional with default false
- Added linkParentChild parameter to Import method (defaults to false)
- Maintains backward compatibility by not establishing parent-child relationships by default
- Added test to verify backward compatibility (default behavior)
- Updated ParentChildReferencesTest to explicitly enable the feature
- All 7 tests pass
Co-authored-by: marcschier <11168470+marcschier@users.noreply.github.com>
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: romanett <7413710+romanett@users.noreply.github.com>
Co-authored-by: marcschier <11168470+marcschier@users.noreply.github.com>
* Initial plan
* Fix race condition in MonitoredItem creation
Add Creating flag to prevent duplicate items when CreateItemsAsync is called concurrently.
- Add internal Creating flag to MonitoredItemStatus
- Check Creating flag in PrepareItemsToCreateAsync
- Set Creating flag before releasing lock
- Clear Creating flag in SetCreateResult (success or failure)
- Add exception handling in CreateItemsAsync to clear Creating flag on errors
- Add test for concurrent CreateItemsAsync calls
Co-authored-by: romanett <7413710+romanett@users.noreply.github.com>
* Address code review feedback - add comment for concurrent tasks constant
Co-authored-by: romanett <7413710+romanett@users.noreply.github.com>
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: romanett <7413710+romanett@users.noreply.github.com>
* Initial plan
* Fix ServerTimestamp to match SourceTimestamp in CoreNodeManager
Set ServerTimestamp equal to SourceTimestamp after node read operations
to ensure consistency. Previously, ServerTimestamp was set early (before
the node's read callback), while SourceTimestamp was set during the
callback, causing timestamp mismatches for nodes like ServerStatus children.
Added test to verify timestamp matching (currently failing - more investigation needed)
Co-authored-by: romanett <7413710+romanett@users.noreply.github.com>
* Apply timestamp fix to CustomNodeManager
Extended the ServerTimestamp fix to CustomNodeManager which handles
ServerStatus and other diagnostic nodes. CustomNodeManager was setting
ServerTimestamp early and separately from SourceTimestamp, causing the
mismatch. Now both timestamps are synchronized after reading values.
All tests pass including the new ServerStatusTimestampsMatchAsync test.
Co-authored-by: romanett <7413710+romanett@users.noreply.github.com>
* Improve comments based on code review feedback
Clarified that timestamp synchronization applies specifically to Value
attributes, and explained the difference in handling between Value and
non-Value attributes (non-Value attributes only use ServerTimestamp).
Co-authored-by: romanett <7413710+romanett@users.noreply.github.com>
* Fix and update serilog package
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: romanett <7413710+romanett@users.noreply.github.com>
Co-authored-by: Marc Schier <marcschier@users.noreply.github.com>
Co-authored-by: Marc Schier <marcschier@hotmail.com>
* Initial plan
* Add support for private encodeable factory in server initialization
- Add new ServiceMessageContext constructor that accepts a custom IEncodeableFactory
- Add CreateMessageContext(IEncodeableFactory) overload to ApplicationConfiguration
- Mark CreateMessageContext(bool) as obsolete since the clonedFactory parameter was never used
- Add PrivateEncodeableFactory property to ServerBase for specifying a private factory
- Update all internal calls to use the new parameterless CreateMessageContext()
Co-authored-by: romanett <7413710+romanett@users.noreply.github.com>
* Add unit tests for ServiceMessageContext private factory support
Co-authored-by: romanett <7413710+romanett@users.noreply.github.com>
* Improve documentation for ServiceMessageContext constructors
Co-authored-by: romanett <7413710+romanett@users.noreply.github.com>
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: romanett <7413710+romanett@users.noreply.github.com>
* Initial plan
* Fix ByteString vs Byte array distinction in WrappedValue
Modified BaseVariableState.WrappedValue to use DataType and ValueRank
when creating Variant to correctly distinguish between byte[] (Byte array)
and ByteString. Added tests to verify the fix.
Co-authored-by: romanett <7413710+romanett@users.noreply.github.com>
* Address code review feedback
- Remove redundant null check for NodeId (NodeId.IsNull handles null)
- Update comment in test to be more specific about ByteString testing
Co-authored-by: romanett <7413710+romanett@users.noreply.github.com>
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: romanett <7413710+romanett@users.noreply.github.com>