Commit Graph
1449 Commits
Author SHA1 Message Date
Cristian Kohlmann 885a61ba75 Use HashSet for validation cache in MasterNodeManager (#1907)
To improve Contains method performance I changed List type for HashSet.
2022-08-12 20:22:28 +02:00
Martin Regen 0ad5c4c3a3 Refactor audit events (#1895)
- Move the auditing flag to server internal
- Hook up new configuration setting to the Auditing node
- A Security Admin can change the Audit setting.
- Refactor audit events to be extensions in one class.
- enable auditing and diagnostics by default for higher test coverage.
- refactor dependency of some events to bindings, e.g. TcpServerChannel should not be used as reportevent parameter
2022-08-12 20:04:02 +02:00
dependabot[bot] c49295008d Bump Microsoft.NET.Test.Sdk from 17.2.0 to 17.3.0 (#1902)
Bumps [Microsoft.NET.Test.Sdk](https://github.com/microsoft/vstest) from 17.2.0 to 17.3.0.
- [Release notes](https://github.com/microsoft/vstest/releases)
- [Commits](https://github.com/microsoft/vstest/compare/v17.2.0...v17.3.0)

---
updated-dependencies:
- dependency-name: Microsoft.NET.Test.Sdk
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-08-11 11:08:39 +02:00
OctaviaStan 8147552cc9 - Refactor the ReceiveEvents permission type validation to be taken into account also when ConditionRefresh method is called. (#1899)
- Fix error in validating PermissionType.ReceiveEvents.
The specs state that "A Client only receives an Event if this bit is set on the Node identified by the EventTypeId field and on the Node identified by the SourceNode field.
This Permission is only valid for EventType Nodes or SourceNodes."
The previous code was only checking the Node id of event state instance.
2022-08-10 13:45:38 +03:00
Martin Regen dd78c0be93 Client perf updates for NodeCache and service call layer to batch Operation Limits. (#1876)
- Add methods to support to Read/Browse multiple nodes in session and NodeCache.
- Add methods to find references of multiple nodes in NodeCache.
- By default the client fetches the operation limits from the server.
- Add operation limit object to client config, settings are overwritten by server limits if server limits are smaller.
- Split client service calls if operation limits are exceeded with an override of the SessionClient. All sync/async service calls are implemented, but not the servcie calls using the Begin/End pattern.
2022-08-08 11:43:55 +02:00
Martin Regen 5a77423265 Update codeql action script to v2 (#1894)
* bump up abstraction logging 3.1.27, add references to solve some warnings
2022-08-08 05:38:24 +02:00
Suciu Mircea Adrian 9b05714fa8 Handle processing matrixes with array dimensions that overflow. (#1891) 2022-08-07 18:44:59 +03:00
OctaviaStan 931b9b90c6 Audit events; add methods for reporting Add/Delete nodes audit events & fixes (#1890)
* Audit events; add methods for reporting Add/Delete nodes audit events and call these methods in CreateNode and DeleteNode methods
- fix values for AuditActivateSessionEventState.ClientSoftwareCertificates and AuditWriteUpdateEventState.IndexRange properties that were set to values of wrong type and generated exception when the client used filters for these properties.
2022-08-07 18:43:43 +03:00
dependabot[bot] d4da42067e Bump Moq from 4.18.1 to 4.18.2 (#1884)
Bumps [Moq](https://github.com/moq/moq4) from 4.18.1 to 4.18.2.
- [Release notes](https://github.com/moq/moq4/releases)
- [Changelog](https://github.com/moq/moq4/blob/main/CHANGELOG.md)
- [Commits](https://github.com/moq/moq4/compare/v4.18.1...v4.18.2)

---
updated-dependencies:
- dependency-name: Moq
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-08-04 10:52:39 +02:00
Suciu Mircea Adrian 313aa2a249 Allow diagnostic nodes to be accessed by determined users (#1878) 2022-08-02 10:36:48 +03:00
Suciu Mircea Adrian 1d123da6a9 Bump to version to 1.4.370 (#1871) 2022-07-19 10:20:04 +02:00
Tim Jöhnk 5732286a11 Feature/recursive complex types (#1870)
* fixes recursive complex types 
* fix IComplexTypebuilder interface
2022-07-18 11:50:36 +02:00
Joshua Leger 8c0111b5ec Adding UnregisterNamespaceManager support to MasterNodeManager (#1869)
* Introducing MasterNodeManager::UnregisterNamespaceManager function
2022-07-17 19:21:07 +03:00
Suciu Mircea Adrian 274dfaddba Implementation of audit event triggers (#1867)
* Implementation of audit event triggers
2022-07-17 18:41:43 +03:00
Vincenzo CarlinoandMartin Regen cf0c878283 Add methods for reading multiple nodes (#1522)
* Add new methods for reading a set of nodes
* ReadNodes(NodeIdCollection, out DataValueCollection, out IList<ServiceResult>, bool optionalAttributes)
* (DataValueCollection, IList<ServiceResult>) ReadNodesAsync (NodeIdCollection, bool optionalAttributes)
to reduce the amount of attributes read from a server ReadNodes first reads only the NodeClass, then reads only the mandatory attributes per nodeclass to reduce the overall number of attributes to read.
If the NodeClass of all nodes is already known, the read can be further optimized to read only the attributes for a known class:
* ReadNodes(NodeIdCollection, NodeClass, out DataValueCollection, out IList<ServiceResult>, bool optionalAttributes)
* (DataValueCollection, IList<ServiceResult>) ReadNodesAsync (NodeIdCollection, NodeClass, bool optionalAttributes)
to complete async and collection operation, there is a:
* ReadNodeAsync and 
* ReadValues/ReadValuesAsync

* An issue was fixed in the https async codepath, the security header was not properly set in async operation

sidenote: operation limits must be handled by caller!

Co-authored-by: Martin Regen <mregen@microsoft.com>
2022-07-17 06:19:11 +02:00
Martin Regen 8fc68e3fbc return value also for uncertain (#1861) 2022-07-01 09:19:57 +03:00
Zigby 559c382666 Fix Server JWT Token Support (#1817)
* Handle JWT and set the IssuedTokenType in the server based on the policy referenced by the PolicyId in the client supplied UserIdentityToken .
* Connect/Reconnect tests cases with JWT
2022-06-30 14:02:07 +02:00
dependabot[bot] e07cba15ba Bump NUnit.Console from 3.15.0 to 3.15.2 (#1860)
Bumps [NUnit.Console](https://github.com/nunit/nunit-console) from 3.15.0 to 3.15.2.
- [Release notes](https://github.com/nunit/nunit-console/releases)
- [Changelog](https://github.com/nunit/nunit-console/blob/main/CHANGES.txt)
- [Commits](https://github.com/nunit/nunit-console/compare/3.15.0...3.15.2)

---
updated-dependencies:
- dependency-name: NUnit.Console
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-30 13:51:07 +02:00
Martin Regen 10d4dbcaa9 Improve ResendData server support (#1854)
* add resend data support to sample node manager
* After WG discussion, ensure after ResendData only a single value per monitored item is sent in the next publish (sync client cache)
* Seperate resend data state from ready to publish with IsResendData property
2022-06-29 06:41:59 +02:00
Suciu Mircea Adrian c0fc029c8d Avoid deadlock on processing events. (#1853)
* Moved validation of RolePermission from MonitoredItem::Publish to MonitoredNode::OnReportEvent.
Refactor MasterNodeManager::GetManagerHandle to avoid calling other node manager's GetManagerHandle inside a lock statement
2022-06-21 11:53:47 +03:00
opcfoundation-org df71776c75 Modelcompiler 1.04.11 (#1850)
* latest nodeset without reference to servicemodel
2022-06-21 11:51:41 +03:00
Martin Regen 93e549ad4b Hide error message for BadSecurityChecksFailed (#1846) 2022-06-10 13:49:29 +02:00
Suciu Mircea Adrian 7aa7270c34 Fix monitored item role permissions.
* Fixed casting of event snapshot handler.
* Added Server Session property EndpointDescription ;
* Limited reporting and corrected the filtering of Audit events;
2022-06-10 08:53:52 +03:00
Martin Regen 6d675b8cd0 Use secure passcode for temp pfx (#1838)
- instead of random guid use a passcode generated with CPRNG.
2022-06-07 11:53:50 +02:00
KircMax 225e3557ce Provide more information to error message when throwing in CSR decode (#1835)
- add text of encoded and expected application URI
2022-06-07 09:04:46 +02:00
Suciu Mircea Adrian 57f979b559 InstanceStateSnapshot sets value of Handle when Initialize is called to "state" argument
InstanceStateSnapshot sets value of Handle when Initialize is called to "state" argument.
2022-06-06 14:25:53 +03:00
Suciu Mircea Adrian d789d8bf51 Added server method ResendData functionality
* Added ResendData functionality
2022-06-06 11:11:39 +03:00
OctaviaStan e3ac2bf4db Defer MethodId permissions validation to the point where the actual MethodState that will be executed is identified
* Defer MethodId validation to the point where the actual MethodState that shall be executed is found to avoid executing a method that does not have the right access permissions.
2022-06-02 15:28:06 +03:00
OctaviaStan 8cc18b32fc The formatter implementation from Microsoft.Extensions.Logging.LoggerExtensions class is ignoring the exception object and the exception information is not saved into log file. see the existing implemetation from below. (#1827)
Added handling for situation when the exception is not null and reused the existing code for formatting exceptions.
2022-05-31 08:31:06 +03:00
dependabot[bot] 23a8930d63 Bump Moq from 4.18.0 to 4.18.1 (#1822)
Bumps [Moq](https://github.com/moq/moq4) from 4.18.0 to 4.18.1.
- [Release notes](https://github.com/moq/moq4/releases)
- [Changelog](https://github.com/moq/moq4/blob/main/CHANGELOG.md)
- [Commits](https://github.com/moq/moq4/compare/v4.18.0...v4.18.1)

---
updated-dependencies:
- dependency-name: Moq
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-28 09:37:52 +02:00
niveditha-sooda 0ac410b8b1 Loader for PEM private keys, Custom cert validator application error message (#1765)
-Added a loader if no PFX private key exists, the PEM private key is loaded.
-Added the support in certificate validator for custom application error messages.
2022-05-28 09:37:31 +02:00
Jörn Schlingensiepen a7cfe2f2b7 Update NodeID sample comment (#1820)
The sample included a fully named NodeId but the Format() uses the information already included in the instance. It might be easier to understand, if there is another sample and a node. Thus we can avoid confusion.
2022-05-13 13:32:28 +02:00
dependabot[bot] a16accfae6 Bump Serilog.Expressions from 3.3.0 to 3.4.0 (#1813)
Bumps [Serilog.Expressions](https://github.com/serilog/serilog-expressions) from 3.3.0 to 3.4.0.
- [Release notes](https://github.com/serilog/serilog-expressions/releases)
- [Commits](https://github.com/serilog/serilog-expressions/compare/v3.3.0...v3.4.0)

---
updated-dependencies:
- dependency-name: Serilog.Expressions
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-13 10:31:39 +02:00
Martin Regen 4c389c1857 Merge pull request #1818 from OPCFoundation/master369
Merge release fixes in master
2022-05-13 09:18:33 +02:00
Martin Regen f345f909b6 merge master 2022-05-13 07:56:31 +02:00
dependabot[bot] 5ae4dca206 Bump Moq from 4.17.2 to 4.18.0 (#1814)
Bumps [Moq](https://github.com/moq/moq4) from 4.17.2 to 4.18.0.
- [Release notes](https://github.com/moq/moq4/releases)
- [Changelog](https://github.com/moq/moq4/blob/main/CHANGELOG.md)
- [Commits](https://github.com/moq/moq4/compare/v4.17.2...v4.18.0)

---
updated-dependencies:
- dependency-name: Moq
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-12 21:18:19 +02:00
Martin Regen 88a96a1d97 Handle special cases for chunking. (#1816)
- Chunk count one compare is incorrect
- Instead of a static configuration calculate the chunk count limits dynamically, as changing buffer size in the negotiation was not taken into account and could lead to reduced message size.
- Remove the static chunk count calculation.
1.4.368.58
2022-05-12 20:45:25 +02:00
Martin Regen fd9a91afe7 Fix issues with reconnect handler and subscription transfer (#1802)
- set `KeepAliveTimeout` default back to 5s, was unintentionally set to 50s in 368 release
- fix a bug that duplicate subscriptions were created after reconnect when transfer succeeds.
- add a property to enable subscription transfer in reconnect, set `Session.TransferSubscriptionsOnReconnect=true` to enable, IOP issues may not allow to use it with some servers.
- add a `SessionReconnectHandler(true)` constructor to support reconnect abort, if the connection recovers before reconnect timer called. If the new constructor is used, its a breaking change: Needs check of  `Session` property in Reconnect handler callback, if aborted `Session==null`.
- Reduce warning log output if server timestamp > client time.
- Add handling when subscriptions can not be transferred, e.g. when false user credentials or no security prevent transfer.
- Improve the reconnect timer handling by using `OperationLimit` in reconnect.
- Add sample for `SessionReconnectHandler` in console client.
- Seperate session sample code from `UAClient`.
- Tested on popular demo servers of various SDK vendors.
- Fix Winforms ref client
2022-05-11 22:28:07 +02:00
dependabot[bot] a7d5865e06 Bump System.Io.Pipelines from 6.0.2 to 6.0.3 (#1806)
Bumps [System.Io.Pipelines](https://github.com/dotnet/runtime) from 6.0.2 to 6.0.3.
2022-05-11 16:56:06 +03:00
dependabot[bot] 1b573eb23e Bump Microsoft.NET.Test.Sdk from 17.1.0 to 17.2.0 (#1805)
Bumps [Microsoft.NET.Test.Sdk](https://github.com/microsoft/vstest) from 17.1.0 to 17.2.0.
2022-05-11 16:55:21 +03:00
OctaviaStan 6f2e5c80a0 Aggregate corrections for CTT 1.4.9.398 (#1797)
* Aggregate corrections for CTT 1.4.9.398

Use IsGood instead of StatusCode.IsGood to take into account the configured TreatUncertainAsBad
Handle corectly the rule: if PercentDataBad == PercentDataGood the PercentDataGood rule is used. When they both are 50 the result was calculated using the PercentDataBad
Other fixes
2022-05-11 12:01:36 +03:00
Suciu Mircea Adrian 71af2c1d15 Added default value DefaultMaxChunkCount (#1789)
* Added default values DefaultRequestMaxChunkCount and DefaultResponseMaxChunkCount
* The negotiated Request and Response MaxChunkCount values are checked when building a chunked message.
2022-05-07 20:54:09 -07:00
Suciu Mircea Adrian 1e22c4d83f Filter events against Role-based permissions (#1798)
Events can be filtered against the Role-based permissions.
2022-05-06 09:30:43 -07:00
Martin Regenandmrsuciu 51549f5ed8 Strict rules to compare X500 distinguished names (#1784)
- Certificates should compare X500DistinguishedName with binary ASN.1 compare
- Other compares should follow ordinal and not resort DN entries
- Fix all related issues to pass tests, e.g. GDS certificates accepted with reversed Subject, cert validation
- Add defensive checks in cert validation 

Co-authored-by: mrsuciu <Mircea-Adrian.Suciu@softing.com>
2022-05-06 16:11:34 +02:00
Suciu Mircea Adrian ae9bf1beef Check op limits on Variant arrays and TranslateBrowsePathsToNodeIds (#1788) 2022-05-05 11:40:19 -07:00
KircMax 5722dd56f7 Add property to get local endpoint from IMessageSocket (#1793)
Add the getter (since the System.Net.Sockets.Socket: m_socket does not implement a setter) for the LocalEndPoint so that a user can access the Information on which IP+Port the Socket is running on
2022-05-05 11:33:44 -07:00
dependabot[bot] de9d13ff8c Bump Serilog from 2.10.0 to 2.11.0 (#1782)
Bumps [Serilog](https://github.com/serilog/serilog) from 2.10.0 to 2.11.0.
- [Release notes](https://github.com/serilog/serilog/releases)
- [Changelog](https://github.com/serilog/serilog/blob/dev/CHANGES.md)
- [Commits](https://github.com/serilog/serilog/compare/v2.10.0...v2.11.0)

---
updated-dependencies:
- dependency-name: Serilog
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-26 21:42:59 +02:00
Martin Regen 7072fe0771 Improve ref server for use with CTT (#1775)
- Improve formatting and log strings for new alarm node managers.
- Remove the TestData Alarms as they cause issues in the CTT tests
- Add a -ctt option to start the alarms endless for testing, stop alarms in other node managers.
- Unify the way the node managers are created in the quickstarts sample.
- Bring back 'dummy' appveyor config to disable the builds.
- fix codecov build
- add a few more unrelated tests
2022-04-19 09:29:21 +02:00
Archie Miller d7e43e9ffc Implement An AlarmNodeManager (#1739)
Implement An AlarmNodeManager with a few alarms and an alarm cycle.

Designed as an example to run against the CTT Alarm conformance Units
2022-04-12 07:59:20 +02:00
Martin Regen 73533cc17f Add missing EC PEM Export, refactor test asset enumerator for generalized usage (#1774)
- Add missing PEM private key export for EC (.NET6/Netstandard2.1 only)
- Remove some duplicate code in PEMWriter class
- Refactor enumerator for Test Datapoint sources to be generic and usable for more cases
- Add some tests for NodeSet2 import (using the refactored enumerator)
- Fix some warnings and PR template typos along the way.
2022-04-11 17:53:31 +02:00