Using OpcCmd Utility to work with OPC UA Security Key Service (SKS): Difference between revisions
From OPC Labs Knowledge Base
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
[[Category:OPC UA]] [[Category:OPC UA PubSub]] [[Category:OpcCmd Utility]] [[Category:OPC UA SKS]] [[Category:Tools and Online Services]] | |||
For general information about the OpcCmd tool, see [[:Category:OpcCmd Utility]]. | |||
= Tutorial = | |||
If you execute the commands listed in the tutorial below, you will get an overview of basic operations that can be made with an OPC UA Server that provides OPC UA Security Key Service (SKS). | |||
This tutorial works with Unified Automation C++ SDK Demo Server. You should be able to use the principles explained in this tutorial with other OPC UA servers that provide the Security Key Service, by modifying the relevant parameters used in the commands. | |||
# Start the OpcCmd utility in interactive mode. The interactive mode is always in effect e.g. when you use ClickOnce, or when running the utility from QuickOPC Launcher/Start menu. In other cases, you need to use the <code>-i</code> (or <code>--interactive</code>) option on the command line.<br/><br/> | |||
Start uaservercpp.exe | Start uaservercpp.exe |
Revision as of 19:55, 15 March 2021
For general information about the OpcCmd tool, see Category:OpcCmd Utility.
Tutorial
If you execute the commands listed in the tutorial below, you will get an overview of basic operations that can be made with an OPC UA Server that provides OPC UA Security Key Service (SKS).
This tutorial works with Unified Automation C++ SDK Demo Server. You should be able to use the principles explained in this tutorial with other OPC UA servers that provide the Security Key Service, by modifying the relevant parameters used in the commands.
- Start the OpcCmd utility in interactive mode. The interactive mode is always in effect e.g. when you use ClickOnce, or when running the utility from QuickOPC Launcher/Start menu. In other cases, you need to use the
-i
(or--interactive
) option on the command line.
Start uaservercpp.exe
configure security group 'TestGroup' in it (need an external tool to do that)
uaPubSubClient accessSecurityKeyService opc.tcp://localhost:48010 --EndpointAllowedMessagedSecurity SecuritySignAndEncrypt --EndpointUser root:secret
browseSecurityGroups
Get an error. Copy client certificate from pkiserver/rejected to pkiserver/trusted/certs
browseSecurityGroups
getSecurityGroupElement TestGroup
Accept server certificate
browseTree
getSecurityKeys TestGroup 0 10
getSecurityKeys TestGroup 3 5
getSecurityKeys TestGroup 0 10 !repeat Infinite 0:0:15 !wait Infinite