* bump up VM versions
* Bump BenchmarkDotNet from 0.13.1 to 0.13.2
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Martin Regen <mregen@microsoft.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
-Issue: A server might return a much smaller send and receive buffer size than what was proposed in the hello message by a client. Given the current default max chunk count, which is based on the default buffer size, the response message size is also limited by the calculated max chunk count.
- fix: Calculate the default max chunk counts based on the TCP client min buffer size.
-Make the https callbacks fully async / code cleanup.
-Default https client to use MaxConnectionsToServer = 64 for #1550
-Fix https missing reconnect error code
other fixes unrelated to https:
- move trust list audit event to AuditEvents.cs, fix issue that the event is not filtered since reportAuditEvent cannot be used
- fix an issue when BrowseNext for multiple continuation tokens doesn't add the results array properly
- bump up .NET Core 3.1 Nuget dependencies
- improve .NET reference client app for use with https
*The EncodableFactory does not index the JSON DataTypeEncodingIds because they are not defined on the types.
As a result, a JSON document that complies with the specification (see https://reference.opcfoundation.org/Core/Part6/5.4.2/#5.4.2.16) cannot be parsed.
* This change creates the JSON encoding types ids from generated code using reflection, so the JSON documents which comply with the spec can be decoded.
* Fixes type id on a JSON encoded ExtensionObject that contains binary or xml encoded data.
Co-authored-by: Randy Armstrong <randy@sparhawksoftware.com>
- 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
- 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.
- 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.
* 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.
* 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>
* 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
* 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
* 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
* Fixed casting of event snapshot handler.
* Added Server Session property EndpointDescription ;
* Limited reporting and corrected the filtering of Audit events;
* 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.
-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.
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.
- 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.
- 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
* 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
* Added default values DefaultRequestMaxChunkCount and DefaultResponseMaxChunkCount
* The negotiated Request and Response MaxChunkCount values are checked when building a chunked message.
- 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>