You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In this article, you learn how to implement an OPC UA server simulator with different nodes that generate random data, anomalies and configuration of user defined nodes. For developers, an OPC UA simulator enables you to test the process of managing OPC UA assets that are connected to the simulator.
18
+
In this article, you learn how to configure and connect to an OPC UA server simulator with different nodes that generate random data, anomalies, and configuration of user defined nodes. For developers, an OPC UA simulator enables you to test the process of managing OPC UA assets that are connected to the simulator.
22
19
23
20
## Prerequisites
24
21
25
-
Azure IoT Operations Preview installed. For more information, see [Quickstart: Deploy Azure IoT Operations – to an Arc-enabled Kubernetes cluster](../get-started/quickstart-deploy.md). If you deploy Azure IoT Operations as described, the process installs an OPC PLC simulator.
22
+
Azure IoT Operations installed. For more information, see [Quickstart: Deploy Azure IoT Operations – to an Arc-enabled Kubernetes cluster](../get-started/quickstart-deploy.md). If you deploy Azure IoT Operations as described, the process installs an OPC PLC simulator.
23
+
24
+
## Deploy the OPC PLC simulator
25
+
26
+
This section shows how to deploy the OPC PLC simulator.
27
+
28
+
> [!IMPORTANT]
29
+
> Don't use the following example in production, use it for simulation and test purposes only. The example lowers the security level for the OPC PLC so that it accepts connections from any client without an explicit peer certificate trust operation.
30
+
31
+
Run the following code to update the OPC UA Broker deployment and apply the new settings:
The OPC PLC OPC UA server should run in the same deployment as a separate pod.
26
47
27
48
## Get the certificate of the OPC PLC simulator
28
-
If you deploy Azure IoT Operations with the OPC PLC simulator enabled, you can get the certificate of the PLC named `simulationPlc`. By getting the certificate, you can run the simulator with mutual trust.
49
+
The application instance certificate of the OPC PLC is a self-signed certificate managed by cert-manager and stored in the `secret aio-opc-ua-opcplc-default-application-cert-000000` kubernetes secret.
29
50
30
51
To get the certificate, run the following commands on your cluster:
31
52
32
53
```bash
33
-
# Copy the public cert of the simulationPlc in the cluster to a local folder
54
+
# extract the public key of the opc plc from the kubernetes secret
# optionally transform the certificate in *.der format
58
+
openssl x509 -outform der -in opcplc.crt -out opcplc.der
38
59
```
39
60
40
-
## Configure OPC UA transport authentication
41
-
After you get the simulator's certificate, the next step is to configure authentication.
42
-
43
-
1. To complete this configuration, follow the steps in [Configure OPC UA transport authentication](howto-configure-opcua-authentication-options.md#configure-opc-ua-transport-authentication).
44
-
45
-
1. Optionally, rather than configure a secret provider class CR, you can configure a self-signed certificate for transport authentication.
46
-
47
-
To create a self-signed certificate to test transport authentication, run the following command:
Another OPC UA authentication option you can configure is mutual trust. In OPC UA communication, the OPC UA client and server both confirm the identity of each other.
62
+
The next step in OPC UA authentication is to configure mutual trust. In OPC UA communication, the OPC UA client and server authenticate each other.
63
+
64
+
To complete this configuration, follow the steps to [configure mutual trust](howto-configure-opcua-certificates-infrastructure.md#how-to-handle-the-opc-ua-trusted-certificates-list). Use the certificate file you extracted in the previous section.
61
65
62
-
To complete this configuration, follow the steps in [Configure OPC UA mutual trust](howto-configure-opcua-authentication-options.md#configure-opc-ua-mutual-trust).
66
+
For simplicity, on the OPC PLC you don't need to do a mutual trust action. Mutual trust is configured with `autoAcceptUntrustedCertificates`, which accepts connections from any OPC UA client.
63
67
64
68
## Optionally configure for no authentication
65
69
66
-
You can optionally configure an OPC PLC to run with no authentication. If you understand the risks, you can turn off authentication for testing purposes.
70
+
You can optionally configure an asset endpoint profile for the OPC PLC to run without mutual trust established. If you understand the risks, you can turn off authentication for testing purposes.
67
71
68
72
> [!CAUTION]
69
73
> Don't configure for no authentication in production or pre-production. Exposing your cluster to the internet without authentication can lead to unauthorized access and even DDOS attacks.
70
74
71
-
To run an OPC PLC with no security profile, you can manually adjust the `AssetEndpointProfile` for OPC UA with the `additionalConfiguration` setting.
75
+
To allow your asset endpoint profile to connect to any OPC PLC server without establishing mutual trust, use the `additionalConfiguration` setting to change the `AssetEndpointProfile` for OPC UA.
72
76
73
77
Configure the setting as shown in the following example JSON code:
0 commit comments