Difference between revisions of "How to publish or subscribe to secure OPC UA PubSub messages"
Jump to navigation
Jump to search
Line 9: | Line 9: | ||
Use the following command in the OpcCmd utility or in UADemoPublisher (at the beginning of the program session) to enable tracing of security-related events: | Use the following command in the OpcCmd utility or in UADemoPublisher (at the beginning of the program session) to enable tracing of security-related events: | ||
!diagnostics switches setValue 1 --multiple --contains Security --typeName BooleanSwitch | !diagnostics switches setValue 1 --multiple --contains Security --typeName BooleanSwitch | ||
+ | |||
+ | = Related reading = | ||
+ | * [[Using OpcCmd Utility as OPC UA PubSub Subscriber]] | ||
+ | * [[UADemoPublisher Basics]] | ||
+ | * [https://reference.opcfoundation.org/v104/Core/docs/Part14/8.4/ GetSecurityKeys Method] |
Revision as of 07:26, 20 March 2021
Contents
Publish secure messages in UADemoPublisher
publish --EnabledConnection DynamicLayoutConnection --EnabledDataSetWriter SimpleWriter --SecurityMode SignAndEncrypt --SecurityKeyServiceUri opc.tcp://localhost:48010 --SecurityKeyServiceMessageSecurity SignAndEncrypt --SecurityKeyServiceUserInfo root:secret --SecurityGroupId TestGroup
Subscribe to secure messages in OpcCmd utility
uaSubscriber subscribeDataSet opc.udp://239.0.0.1:4840 --SecurityMode SecuritySignAndEncrypt --SecurityKeyServiceUri opc.tcp://localhost:48010 --SksTemplateMessageSecurity SecuritySignAndEncrypt --SksTemplateUser root:secret --SecurityGroupId TestGroup
Enable security event tracing in command-line tools
Use the following command in the OpcCmd utility or in UADemoPublisher (at the beginning of the program session) to enable tracing of security-related events:
!diagnostics switches setValue 1 --multiple --contains Security --typeName BooleanSwitch