Avatar

Please consider registering
guest

sp_LogInOut Log In sp_Registration Register

Register | Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

sp_Feed Topic RSS sp_TopicIcon
How to add endpoints manually?
May 28, 2022
16:24, EEST
Avatar
hbrackel
Member
Members
Forum Posts: 144
Member Since:
February 21, 2014
sp_UserOfflineSmall Offline

Hi,

I’d like to tightly control the exposed endpoints for my OPC UA server (SDK 4.8.0). I am actually uncertain how to use the related UaServer methods and in which order.

I’d appreciate, if you could provide an example / a template, how to accomplish the following, for example:

Exactly the following endpoints shall be exposed (names and IP addresses are just examples):

opc.tcp://127.0.0.1:22123/MyApplication, SecurityMode: Basic256Sha256_SIGN, UTPolicy: ANONYMOUS
opc.tcp://localhost:22123/MyApplication, SecurityMode: Basic256Sha256_SIGN, UTPolicy: ANONYMOUS
opc.tcp://192.168.2.222:22123/MyApplication, SecurityMode: Basic256Sha256_SIGN_ENCRYPT, UTPolicy: ANONYMOUS
opc.tcp://192.168.3.111:22123/MyApplication, SecurityMode: Basic256Sha256_SIGN_ENCRYPT, UTPolicy: ANONYMOUS
opc.tcp://192.168.3.111:22123/MyApplication, SecurityMode: Basic256Sha256_SIGN, UTPolicy: ANONYMOUS
opc.tcp://myhostname:22123/MyApplication, SecurityMode: Basic256Sha256_SIGN_ENCRYPT, UTPolicy: ANONYMOUS
opc.tcp://myhostname.mycorp.com:22123/MyApplication, SecurityMode: Basic256Sha256_SIGN_ENCRYPT, UTPolicy: ANONYMOUS

What is not entirely clear to me is how the various UaServer methods, such as addEndpoint(), setPort(), setBindAddresses(), etc play together and when they have to be called (pre- or post server.init) to accomplish the desired outcome.

Also, is it possible to listen on more than a single port (for opc.tcp)?

Many thanks,
Hans-Uwe

May 30, 2022
14:51, EEST
Avatar
Jouni Aro
Moderator
Moderators
Forum Posts: 1026
Member Since:
December 21, 2011
sp_UserOfflineSmall Offline

Hi Hans-Uwe,

Unfortunately, it seems that the addEndpoint doesn’t actually work as it is described – due to historical reasons. I believe this functionality has not really been requested, so it is not currently available.

If you see that it is important for you, we will find a solution that enables you to configure different security modes for different interfaces (bind addresses).

We haven’t thought about supporting several ports for a single server, so I believe it would be more difficult, but we can take a look.

BR, Jouni

May 30, 2022
17:13, EEST
Avatar
hbrackel
Member
Members
Forum Posts: 144
Member Since:
February 21, 2014
sp_UserOfflineSmall Offline

Hi Jouni,

having control over the endpoints is quite important to us, as we have multiple network interfaces (plus [lo], of course), which may require different SecurityModes or the server should not even be connectable on some of the interfaces.

I looked through the source code for UaServer to find out how the bindings work, but I am afraid that I overlook something without your guidance.

A single port for the server is just fine. The question about support for multiple ports has just been out of curiosity.

Many thanks,
Hans-Uwe

May 30, 2022
18:12, EEST
Avatar
Jouni Aro
Moderator
Moderators
Forum Posts: 1026
Member Since:
December 21, 2011
sp_UserOfflineSmall Offline

Yeah, I understand. In the original (version 1) design, this was still possible, but there were other aspects that made it complicated, so I introduced the BindAddresses that are used to define where the endpoints are bound, instead of using the endpointUrls for that. But it was never really requested so far, so it was never finished, how you could configure the different security settings per interface. But I believe, it shouldn’t be too complicated to add that option, in the end. I will keep you updated.

Forum Timezone: Europe/Helsinki

Most Users Ever Online: 1919

Currently Online:
15 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

Heikki Tahvanainen: 402

hbrackel: 144

rocket science: 88

pramanj: 86

Francesco Zambon: 83

Ibrahim: 78

Sabari: 62

kapsl: 57

gjevremovic: 49

Xavier: 43

Member Stats:

Guest Posters: 0

Members: 737

Moderators: 7

Admins: 1

Forum Stats:

Groups: 3

Forums: 15

Topics: 1524

Posts: 6451

Newest Members:

jonathonmcintyre, fannielima, kristiewinkle8, rust, christamcdowall, redaahern07571, nigelbdhmp, travistimmons, AnnelCib, dalenegettinger

Moderators: Jouni Aro: 1026, Pyry: 1, Petri: 0, Bjarne Boström: 1026, Jimmy Ni: 26, Matti Siponen: 346, Lusetti: 0

Administrators: admin: 1