View Issue Details

IDProjectCategoryView StatusLast Update
000219810000-004: Servicespublic2013-12-10 17:15
ReporterKarl Deiretsbacher Assigned ToMatthias Damm  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version1.02 
Fixed in Version1.02 
Summary0002198: Handling of certificates in CreateSession
Description

In version 1.02 servers shall not return certificates for securityPolicy NONE.
This causes Interop problems with "older" clients since those always expect a certificate and reject connecting to servers that do not return certificates.

TagsNo tags attached.
Commit Version
Fix Due Date

Relationships

related to 0002201 closedNathan Pocock Compliance Test Tool (CTT) Unified Architecture Handling of certificates in CreateSession 
related to 0002199 closedPaul Hunkar 10000-007: Profiles Version in CreateSession 
related to 0002617 closedMatthias Damm 10000-004: Services 1.02 Errata has not solved the backwards compatibility issue relating to successful connections and certiificates 

Activities

Jim Luth

2012-10-02 18:41

administrator   ~0004129

Here is the latest proposal from Karl:

Last week we said that we would introduce an additional header to resolve the interop issue with certificates.
I wonder if this is really necessary - just for this purpose.

In 1.01 both Client and Server always had to pass their certificate, in 1.02 both "shall not send an ApplicationInstanceCertificate if the securityPolicyUri is None". Therefore we could simply add that "if the Client passes a Certificate, the Server shall return its Certificate".

Karl Deiretsbacher

2012-10-09 17:09

developer   ~0004161

Last edited: 2012-10-10 14:54

Proposed ERRATA Text:

Topic: CreateSession on a SecureChannel with SecurityPolicy = None.
In OPC UA Version 1.01 the handling of instance certificates in the CreateSession Service when using SecurityPolicy None is ambiguous. While our lowest level profile does not require an instance certificate, the CreateSession service in Version 1.01 requires the exchange of certificates. Version 1.02 removes this ambiguity. As a consequence however, connectivity between 1.01 and 1.02 applications may be impacted. The following additional rules to V1.02 are introduced to minimize connectivity problems.

ERRATA for V1.02 Servers:
Servers assume that a V1.01 Client is connecting if a clientCertificate is passed in the CreateSession request. Therefore, if the clientCertificate argument is not Null, the Server should also return a serverCertificate (if it has one) rather than returning Null.
As specified, however, 1.02 Servers shall not validate the clientCertificate.
Note, that although it is allowed for embedded Servers to only support the NoSecurity profile it is recommended that these Servers still provide a self-signed certificate so that interoperability with older Clients can be achieved.

ERRATA for V1.02 Clients:
Clients can not determine whether the Server complies with version 1.01 or 1.02. Therefore, they may need two attempts to create a Session. In the first attempt, they pass Null as clientCertificate. If this fails for unknown reasons, they shall call CreateSession with a valid clientCertificate.
As specified, however, 1.02 Clients shall always ignore the serverCertificate of the CreateSession response.
Note, that although it is allowed for embedded Clients to only support the NoSecurity profile it is recommended that these Clients still provide a self-signed certificate so that the two-step connect can be executed.

Alternative:
ERRATA for V1.02 Clients:
Clients can not determine whether the Server complies with version 1.01 or 1.02. Therefore, they shall call CreateSession with a valid clientCertificate if they have one.
Clients shall always ignore the serverCertificate of the CreateSession response.
Note, that although it is allowed for embedded Clients to only support the NoSecurity profile it is recommended that these Clients still provide a self-signed certificate so that interoperability with older Servers can be achieved.

Nathan Pocock

2012-10-22 14:59

viewer   ~0004164

Perhaps the following sentence at the end of the last paragraph in 5.5.2 may need some slight rewording:

[current]
"Clients and Servers shall verify that the same Certificates were used in the CreateSession and ActivateSession services."

[proposed]
"Clients and Servers shall verify that the same Certificates were used in the CreateSession and ActivateSession services if security is used, i.e. not set to 'None'."

Jim Luth

2012-10-23 17:41

administrator   ~0004171

Randy to add errata to forum. The we will assign for fix in Part 4.

Randy Armstrong

2012-10-23 19:01

administrator   ~0004174

Added errata:

http://www.opcfoundation.org/forum/viewtopic.php?p=17511#17511

Nathan Pocock

2012-11-08 21:35

viewer   ~0004213

CMPWG Nov-8-2012:

The errata needs to reference multiple areas of the spec, including OpenSecureChannel (in addition to CreateSession).

The errata needs to be describe the scenarios where certificates will be returned, and when they will be omitted. The use of Liam's truth-table would be ideal.

Most importantly, the CMPWG has test-cases and UACTT-scripts that require the specific details of the server behavior for when:
The client issues a certificate, but the server doesn't have a certificate.

In the above case, what should the server do?
a. return null
b. return a copy of the client's certificate
c. return a ByteString with "hello world" as the text

I will do some testing with the scenarios above and will update this issue with those findings. This will happen before the next meeting.

user322

2012-11-12 13:41

  ~0004215

The 1.02 specs state that for GetEndpoints service call, the server should not return a certificate "If the securityPolicyUri is NONE and none of the UserTokenPolicies requires encryption".

The clients created with the SDK have a null check for the returned server certificates (by GetEndpoints), when using http transport protocol, therefor the "older" clients will be incompatible with the "new" servers on HTTP.

Matthias Damm

2013-08-20 14:26

developer   ~0004929

Added text based on proposed errata to CreateSession parameters clientCertificate, serverCertificate and serverEndpoints .
Resolved in document IEC 62541-4 - Services [Pre-CDV] 1.02.02.doc

Matthias Damm

2013-10-11 01:36

developer   ~0005066

Revised decision

Matthias Damm

2013-10-11 01:48

developer   ~0005067

Modified original changes from 1.02

GetEndpoints:
If the securityPolicyUri is NONE and none of the UserTokenPolicies requires encryption,
Removed: the Server shall not send an ApplicationInstanceCertificate and
Kept: the Client shall ignore the ApplicationInstanceCertificate

OpenSecureChannel Request - clientCertificate
If the securityPolicyUri is None,
Removed: the Client shall not send an ApplicationInstanceCertificate and
Kept: the Server shall ignore the ApplicationInstanceCertificate.

CreateSession Request - clientCertificate
If the securityPolicyUri is None,
Removed: the Client shall not send an ApplicationInstanceCertificate and
Kept: the Server shall ignore the ApplicationInstanceCertificate.

CreateSession Response - serverCertificate
If the securityPolicyUri is NONE and none of the UserTokenPolicies requires encryption,
Removed: the Server shall not send an ApplicationInstanceCertificate and
Kept: the Client shall ignore the ApplicationInstanceCertificate

Resolved in document IEC 62541-4 - Services [Pre-CDV] 1.02.06.doc

Jim Luth

2013-12-10 17:15

administrator   ~0005179

Reviewed Errata and agreed to changes made in the meeting.

Issue History

Date Modified Username Field Change
2012-09-20 08:25 Karl Deiretsbacher New Issue
2012-09-20 08:37 Karl Deiretsbacher Issue cloned: 0002201
2012-09-20 08:37 Karl Deiretsbacher Relationship added related to 0002201
2012-09-20 08:38 Karl Deiretsbacher Issue cloned: 0002202
2012-09-20 08:39 Karl Deiretsbacher Issue cloned: 0002203
2012-10-02 16:59 Jim Luth Relationship added related to 0002199
2012-10-02 18:41 Jim Luth Note Added: 0004129
2012-10-09 17:09 Karl Deiretsbacher Note Added: 0004161
2012-10-09 17:15 Karl Deiretsbacher Note Edited: 0004161
2012-10-10 07:21 Karl Deiretsbacher Note Edited: 0004161
2012-10-10 07:35 Karl Deiretsbacher Note Edited: 0004161
2012-10-10 07:36 Karl Deiretsbacher Note Edited: 0004161
2012-10-10 07:43 Karl Deiretsbacher Note Edited: 0004161
2012-10-10 07:43 Karl Deiretsbacher Note Edited: 0004161
2012-10-10 07:44 Karl Deiretsbacher Note Edited: 0004161
2012-10-10 07:48 Karl Deiretsbacher Note Edited: 0004161
2012-10-10 07:51 Karl Deiretsbacher Note Edited: 0004161
2012-10-10 07:56 Karl Deiretsbacher Note Edited: 0004161
2012-10-10 07:57 Karl Deiretsbacher Note Edited: 0004161
2012-10-10 08:13 Karl Deiretsbacher Note Edited: 0004161
2012-10-10 14:51 Karl Deiretsbacher Note Edited: 0004161
2012-10-10 14:54 Karl Deiretsbacher Note Edited: 0004161
2012-10-22 14:59 Nathan Pocock Note Added: 0004164
2012-10-23 17:40 Jim Luth Status new => assigned
2012-10-23 17:40 Jim Luth Assigned To => Randy Armstrong
2012-10-23 17:41 Jim Luth Note Added: 0004171
2012-10-23 19:00 Randy Armstrong Assigned To Randy Armstrong => Matthias Damm
2012-10-23 19:01 Randy Armstrong Note Added: 0004174
2012-11-08 21:35 Nathan Pocock Note Added: 0004213
2012-11-12 13:41 user322 Note Added: 0004215
2013-08-20 14:26 Matthias Damm Status assigned => resolved
2013-08-20 14:26 Matthias Damm Resolution open => fixed
2013-08-20 14:26 Matthias Damm Note Added: 0004929
2013-10-11 01:31 Matthias Damm Relationship added related to 0002617
2013-10-11 01:36 Matthias Damm Note Added: 0005066
2013-10-11 01:36 Matthias Damm Status resolved => assigned
2013-10-11 01:48 Matthias Damm Status assigned => resolved
2013-10-11 01:48 Matthias Damm Note Added: 0005067
2013-12-10 17:15 Jim Luth Status resolved => closed
2013-12-10 17:15 Jim Luth Note Added: 0005179
2013-12-10 17:15 Jim Luth Fixed in Version => 1.02