View Issue Details

IDProjectCategoryView StatusLast Update
000513710000-006: MappingsSpecpublic2020-07-01 10:04
ReporterRavil Nugmanov Assigned ToRandy Armstrong  
PrioritynormalSeverityminorReproducibilityN/A
Status closedResolutionno change required 
Summary0005137: Clarification in section 6.7 (sequence number vrification)
Description

In devices with limited resources processing of OpenSecureChannel request takes considerable time (few seconds). Blocking of other requests from the same client while OpenSecureChannel is being processed would mean interruption of data flow for that client. Server could block only incoming requests and still send responses to the Publish requests which were already queued on the server side. But if receiving of Publish messages stops, then Publishing queue on the server side could became empty, sampling queues become full, and data loss would start.
In multithreaded servers other requests from the same client ( as well as from other clients) could be processed in parallel, using existing security token. But in this case there is an opinion that it would be violation of the clause "The contents of the MessageChunk shall not be interpreted until the Message is decrypted and the signature and sequence number verified" of the specification Part 6, section 6.7.6. Therefore its proposed to clarify how verification of sequence numbers should be done. If it is understood as “every chunk must have sequence number equal to sequence number of the previous one + 1”, then it means the server cannot process further requests until OpenSecureChannel request is decrypted and its sequence number becomes known.

Lets assume that sequence number for the request which was received right before the OpenSecureChannel request is N. It is verified that one before it had N-1, so it is strictly verified. When the server receives OpenSecureChannel after it, its sequence number is expected to be N+1, but it is not known until decryption is complete. Note that it is known this message is of type OPN, because that part is not encrypted.

The proposal is: for this particular case only, i.e. when we have message of type OPN being processed, when next requests have sequence numbers as N+2, N+3, N+4 and so on, then they should be considered as valid and verified, even we don’t know what is actually sequence number for the OpenSecureChannel request. As soon processing of the OpenSecureChannel request is complete, then the server should close the connection if its sequence number is not N+1.

This would allow un-interrupted data flow without large queue sizes.

Example: during 3 seconds, for monitored items sampled with 50 ms interval, 60 data changes can occur. Number of Publish queue size on the server side is often limited to 2, so in order to deliver those data changes, each publish response should be able to store 25 values. If number of items is large enough, then it can exceed max message size, or max number of notifications, etc.
So it is better to allow communication flow while secure channel renewal. All communication is still encrypted with valid token, therefore I don’t see security risk here which such exemption on sequence number verification could cause.

TagsNo tags attached.
Commit Version
Fix Due Date

Activities

Randy Armstrong

2020-03-23 17:08

administrator   ~0011816

Should already be required:
https://reference.opcfoundation.org/v104/Core/docs/Part6/6.7.4/
The Server has to accept requests secured with the old SecurityToken until that SecurityToken expires or until it receives a Message from the Client secured with the new SecurityToken.

Ravil Nugmanov

2020-03-23 17:18

reporter   ~0011817

This is not about accepting old security tokens. It is about validation of sequence numbers for messages received by the server while it is processing secure channel renewal request.

Randy Armstrong

2020-03-24 03:50

administrator   ~0011831

This text is in the current 1.05 that should address the concern (6.7.2.4):

Some applications will find it takes time to validate the OpenSecureChannel Requests and Responses used to renew a TokenId. In these situations, the receiver may assume the SequenceNumber is correct which allows it to process subsequent messages secured with the existing TokenId before the OpenSecureChannel Message is validated. When processing of the OpenSecureChannel Message completes, the receiver checks the SequenceNumber and closes the SecureChannel if it is incorrect.

Jim Luth

2020-06-30 17:07

administrator   ~0012527

Agreed to no fix needed in 1.05

Issue History

Date Modified Username Field Change
2019-10-10 01:09 Ravil Nugmanov New Issue
2019-10-22 16:36 Jim Luth Assigned To => Randy Armstrong
2019-10-22 16:36 Jim Luth Status new => assigned
2020-03-23 17:08 Randy Armstrong Status assigned => resolved
2020-03-23 17:08 Randy Armstrong Resolution open => fixed
2020-03-23 17:08 Randy Armstrong Note Added: 0011816
2020-03-23 17:18 Ravil Nugmanov Status resolved => feedback
2020-03-23 17:18 Ravil Nugmanov Resolution fixed => reopened
2020-03-23 17:18 Ravil Nugmanov Note Added: 0011817
2020-03-24 03:50 Randy Armstrong Status feedback => resolved
2020-03-24 03:50 Randy Armstrong Resolution reopened => no change required
2020-03-24 03:50 Randy Armstrong Note Added: 0011831
2020-06-30 17:07 Jim Luth Status resolved => closed
2020-06-30 17:07 Jim Luth Note Added: 0012527