Reputation: 35
What is the User Token Type in OPC UA? Why is this important, how do I know the User Token Type from the server, and add this in client to connect to the server?
Upvotes: 3
Views: 3101
Reputation: 71
I will answer your question in two parts.
Part 1:
What is the User Token Type in OPC UA? Why is this important?
Part 2:
How do I know the User Token Type from the server, and add this in client to connect to the server?
Part 1: This comes under the topic of user authentication, i.e. when a user is trying to connect from an OPC UA Client to an OPC UA Server, the OPC UA server needs to confirm the identity of the user before allowing the connection from the OPC UA client.
There are four ways in which user authentication is specified in OPC UA and ‘UserTokenType’ is an enumeration specified with the values 0, 1, 2 and 3 for those four ways:
Anonymous
UserName
Certificate
IssuedToken
Part 2: This wireshark trace contains the sequence of GetEndpointsRequest/GetEndpointsResponse between an OPC UA client and an OPC UA server. As you can see, the getEndpointResponse packet provides information on userTokens supported by the server. Specifically in this image, you can see that 'Anonymous' and 'UserName' are supported in a sample implementation.
Here you can see a list of some open source OPC UA stacks that also provide related sample application code that you can try out:
If you are looking for more hands-on information, you can check out these resources
Upvotes: 7
Reputation: 7005
UserTokenType
enumerates various authentication mechanisms (anonymous, username/password, x509, etc...)
Each endpoint you get from a server contains an array of UserTokenPolicy
describing an authentication mechanism supported by that endpoint.
Upvotes: 0