Contents
Configuring a connection over the OPC UA protocol
Kaspersky IoT Secure Gateway 100 receives data from the OPC UA server residing within the internal enterprise network over the OPC UA protocol, which is described by the
specification. You can read about the OPC UA protocol specification on the developer's website. Kaspersky IoT Secure Gateway 100 supports OPC UA protocol version 1.04.Securing a connection over the OPC UA protocol
To use a secure connection between the OPC UA client and the OPC UA server:
- Copy the OPC UA client to the directory
/app/Core/pki/certs/transfer/opc_ua/client
on theHW-IDS
partition of the microSD card. - Copy the OPC UA server certificate to the directory
/app/Core/pki/certs/transfer/opc_ua/client
on theHW-IDS
partition of the microSD card. - Copy the private of the OPC UA client to the directory
/app/Core/pki/private/transfer/opc_ua/client
on theHW-IDS
partition of the microSD card.
Data can also be transmitted over the OPC UA protocol without using an encrypted connection. However, a secure connection between the OPC UA client and the OPC UA server cannot be ensured without encryption. It is not recommended to use an unsecured operating mode for Kaspersky IoT Secure Gateway 100.
Page topConfiguring data acquisition over the OPC UA protocol
To configure data acquisition using the OPC UA protocol:
- Create the
OpcUaClientSettings-0.json
configuration file. - In the
OpcUaClientSettings-0.json
file, specify the OPC UA settings and their values in accordance with JSON syntax. - Put the configuration file into the directory
/app/Core/config/transfer/opc_ua/client
on theHW-IDS
partition of the microSD card.
Sample configuration file:
OpcUaClientSettings-0.json
{
"id": 0,
"name": "Kaspersky IoT Secure Gateway 100 OPC UA Client",
"description": "Collects data from CNC by Kaspersky IoT Secure Gateway 100",
"url": "opc.tcp://192.168.177.7:4840",
"readingCycle": 1,
"security": {
"mode": "SignAndEncrypt",
"policy": "Basic256Sha256",
"clientPkiData": {
"certificate": "opc-ua-client.crt",
"privateKey": "opc-ua-client.key"
},
"trustList": ["opc-ua-server.crt"]
},
"userCredentials":
{
"username": "KISG100",
"password": "0R20jN#yZd~zaLKe?2J#@~|YC"
},
"heartbeat": {
"id": 0,
"name": "Heartbeat",
"timeout": 60
},
"nodes": [
{
"id": 1,
"name": "Temperature",
"nodeId": "ns=1;s=VariableTemperature"
},
{
"id": 2,
"name": "Speed",
"nodeId": "ns=2;i=2045"
}
]
}
To edit files in JSON format, we recommend using a text editor that supports JSON syntax highlight. This will help avoid potential errors (for example, unbalanced braces).
Parameters description in the OpcUaClientSettings-0.json configuration file
The required parameters should be explicitly defined. The other parameters are optional. For optional parameters that are not included in the configuration file, the default value prescribed by the OPC UA protocol may be used.
Parameters in the OpcUaClientSettings-0.json file
Parameter name |
Required parameter |
Description |
Possible values and notes |
---|---|---|---|
|
Yes |
ID of the OPC UA client that receives data from the OPC UA server. |
The value of this parameter must match the value of the |
|
Yes |
Name of the OPC UA client that receives data from the OPC UA server. |
Example: |
|
|
Description of the OPC UA client that receives data from the OPC UA server. |
Example: |
|
Yes |
OPC UA server address. |
Example: Port 4840 is used by default. |
|
No |
Gateway data read frequency (in seconds). |
Integer no less than
|
|
Yes |
block. Contains the mode , policy , and trustList parameters, and the clientPkiData parameter block.
|
The If you do not need to configure the security parameters, enter |
|
No |
Mode for managing the security of the client application connection. |
|
|
No |
Name of the used on the OPC UA server. |
The |
|
No |
Parameter block containing the certificate and private encryption key of the OPC UA client for an encrypted connection. |
The For secure communication over OPC UA, you will need to create a private encryption key and certificate and add them to the client and server configuration. When generating certificates for a connection between a client (Kaspersky IoT Secure Gateway 100) and the OPC UA server, make sure that the certificates comply with the following requirements:
|
|
No |
Certificate file name. |
|
|
No |
Private encryption key file name. |
|
|
No |
Array containing the names of trusted certificate files. |
If the OPC UA server configuration prescribes the use of a custom list of trusted certificates, add the client certificate to this list. If certificate verification is not required, enter the |
|
No |
Parameter block containing the account credentials of the OPC UA client on the OPC UA server. |
|
|
No |
Name of the user account for authorization on the OPC UA server. |
|
|
No |
Password of the user account for authorization on the OPC UA server. |
|
|
No |
This parameter block is generated by the OPC UA client. It contains the parameters for the Kaspersky IoT Secure Gateway 100 heartbeat signal. |
If you do not add the |
|
No |
Data node ID. |
|
|
No |
Data node name. |
Example: |
|
No |
Interval (in seconds) between the generation of heartbeat signals. |
An integer no less than |
|
Yes |
Parameter block for data nodes. |
Completed for each data node. The ID and name of data nodes are required for building routes and transmitting data from the OPC UA server to the . |
|
Yes |
ID of the outbound port. |
|
|
Yes |
Name of the outbound port. This name must match the destination port topics parameter block in the MqttPublisherSettings-0.json configuration file.
|
Example: To correctly transfer data from the OPC UA server to the MQTT broker, you need to map the OPC UA to their corresponding MQTT topics. Thename value is used for mapping.
|
|
Yes |
Data node ID. |
|
|
Yes |
ID of the OPC UA server namespace. |
|
|
Yes |
ID of the data node in the OPC UA server namespace. |
Two types of IDs are possible:
|
Special considerations when configuring OPC UA security settings
Kaspersky IoT Secure Gateway 100 does not establish a connection over the OPC UA protocol in the following cases:
- The server does not have a certificate, and an unsafe connection is not allowed.
- The
trustList
parameter lacks a defined server certificate, and theAllowAll
value is not set. - The client certificate, server certificate or encryption keys do not comply with the settings of the selected security policy.
The OPC UA server and client establish an unsafe connection in the following cases:
- The
null
value is set for thesecurity
anduserCredentials
settings blocks, and the server supports this type of connection. - The
Any
value is set for themode
andpolicy
fields, and the server offers the choice for an unsafe connection.
Any weakening of the security settings reduces the security of the connection. For example, the following settings reduce the security of a connection over the OPC UA protocol:
- Use of the
null
value for thesecurity
settings block will result in the use of a connection without encryption and without a signature. - Use of the
AllowAll
value for thetrustList
field disables server certificate verification. - Use of the
null
value for theuserCredentials
settings block disables the capability to connect to a server by using a username and password. - The
Basic128Rsa15
andBasic256
values for thepolicy
field are considered to be obsolete in the OPC UA version 1.4 protocol specification because the SHA-1 hashing algorithm is no longer considered to be secure. - Use of the
None
value for thepolicy
ormode
fields will result in the following:- use of a connection without encryption and without a data signature;
- transmission of a plaintext password to the server.