Closed alxy closed 4 months ago
+1, experiencing the same issue
Can you try using "SignAndEncrypt" instead of 2 for "securityMode"? with SecurityMode None and http://opcfoundation.org/...
seems like the Security mode is not parsed correctly, although the default is "Best", not "None". Need to investigate.
We have tested this using the direct methods api of publisher and this seems to be successful (using an encrypted + authenticated connection):
{
"connection": {
"Endpoint": {
"url": "opc.tcp://hostname:50020",
"securityMode": 2,
"securityPolicy": "http://opcfoundation.org/UA/SecurityPolicy#Basic256Sha256"
},
"User": {
"type": 1,
"value": {
"user": "user1",
"password": "password"
}
}
},
"request": {
"attributes": [
{
"nodeId": "nsu=2104020;s=1.PartData.OKStatus.Status.OK",
"attribute": 13
}
]
}
}
I have added a mqtt sample for attribute reading, using the security mode/profile settings as shown. This issue might have been fixed in a previous release as I was not able to repro with the sample. Closing for now.
Describe the bug We are right moving from the old OPC Twin (
2.8.6
) to the new Publisher (2.9.4
) module for all functionalities. One of the functionalities we use is aNodeRead
direct method call that we wanted to refactor to Publisher using the MQTT API. The OPC UA server implementation Im testing this with is KepserverEX 6.9. Result is that with the new Publisher call we are not able to successfully do theNodeRead
call, whereas with the Twin its easily possible.To Reproduce
Expected behavior Both modules should be able to read from the exact same server.
Additional context It seems to be working if we use security mode
None
and anonymous auth. However, most of the real servers we have will use some sort of encryption and username/password auth. The logs suggest that for some reason the publisher is selecting the unsecure endpoint, even though we instruct it to use the SignAndEncrypt one.