Skip to content

Commit 0395e7a

Browse files
committed
Show mutual trust in tutorial
1 parent 13217fd commit 0395e7a

File tree

5 files changed

+58
-15
lines changed

5 files changed

+58
-15
lines changed
52.6 KB
Loading
53.5 KB
Loading
65 KB
Loading

articles/iot-operations/end-to-end-tutorials/tutorial-add-assets.md

Lines changed: 55 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -68,34 +68,74 @@ The following snippet shows the YAML file that you applied:
6868

6969
:::code language="yaml" source="~/azure-iot-operations-samples/samples/quickstarts/opc-plc-tutorial-deployment.yaml":::
7070

71-
Review the `opcplc-000000-execute-commands-script` configuration in the YAML file to see how the [mutual trust](../discover-manage-assets/overview-opcua-broker-certificates-management.md) is established between the OPC PLC simulator and the connector for OPC UA.
71+
## Establish mutual trust
7272

73-
## Sign into the operations experience
73+
Before the OPC PLC simulator can send data to the connector for OPC UA, you need to establish mutual trust between them. In this tutorial, the OPC PLC simulator and the connector for OPC UA use self-signed certificates to establish the mutual trust with the connector for OPC UA:
7474

75-
To create asset endpoints, assets and subscribe to OPC UA tags and events, use the operations experience.
75+
- The simulator's application instance certificate is stored in the `opc-plc-default-application-cert` Kubernetes secret.
76+
- The connector for OPC UA's application instance certificate is stored in the `aio-opc-opcuabroker-default-application-cert` Kubernetes secret.
7677

77-
Browse to the [operations experience](https://iotoperations.azure.com) in your browser and sign in with your Microsoft Entra ID credentials.
78+
> [!IMPORTANT]
79+
> In a production environment use enterprise grade application instance certificates to establish the mutual trust. To learn more, see [Configure an enterprise grade application instance certificate](../discover-manage-assets/howto-configure-opcua-certificates-infrastructure.md#configure-an-enterprise-grade-application-instance-certificate).
7880

79-
## Select your site
81+
### Add the connector's certificate to the simulator's trust list
8082

81-
A _site_ is a collection of Azure IoT Operations instances. Sites typically group instances by physical location and make it easier for OT users to locate and manage assets. Your IT administrator creates [sites and assigns Azure IoT Operations instances to them](/azure/azure-arc/site-manager/overview). Because you're working with a new deployment, there are no sites yet. You can find the cluster you created in the previously by selecting **View unassigned instances**. In the operations experience, an instance represents a cluster where you deployed Azure IoT Operations.
83+
Each OPC UA server has it's own mechanism for managing the trust list. To add the connector's certificate to the simulator's trust list, run the following commands:
8284

83-
:::image type="content" source="media/tutorial-add-assets/site-list.png" alt-text="Screenshot that shows the unassigned instances node in the operations experience.":::
85+
```bash
86+
cert=$(kubectl -n azure-iot-operations get secret aio-opc-opcuabroker-default-application-cert -o jsonpath='{.data.tls\.crt}' | base64 -d)
87+
data=$(kubectl create secret generic temp --from-literal=opcuabroker.crt="$cert" --dry-run=client -o jsonpath='{.data}')
88+
kubectl patch secret opc-plc-trust-list -n azure-iot-operations -p "{\"data\": $data}"
89+
```
8490

85-
## Select your instance
91+
```powershell
92+
$cert = kubectl -n azure-iot-operations get secret aio-opc-opcuabroker-default-application-cert -o jsonpath='{.data.tls\.crt}' | base64 -d
93+
$data = kubectl create secret generic temp --from-literal=opcuabroker.crt="$cert" --dry-run=client -o jsonpath='{.data}'
94+
kubectl patch secret opc-plc-trust-list -n azure-iot-operations -p "{""data"": $data}"
95+
```
8696

87-
Select the instance where you deployed Azure IoT Operations in the previous tutorial:
97+
### Add the simulator's certificate to the connector's trust list
8898

89-
:::image type="content" source="media/tutorial-add-assets/cluster-list.png" alt-text="Screenshot of Azure IoT Operations instance list.":::
99+
Every OPC UA server type has it's own mechanism for managing its application instance certificate. To download the simulator's certificate to a file called `opcplc-000000.crt`, run the following command:
90100

91-
> [!TIP]
92-
> If you don't see any instances, you might not be in the right Microsoft Entra ID tenant. You can change the tenant from the top right menu in the operations experience.
101+
```console
102+
kubectl -n azure-iot-operations get secret opc-plc-default-application-cert -o jsonpath='{.data.tls\.crt}' | base64 -d > opcplc-000000.crt
103+
```
93104

94-
## Add an asset endpoint
105+
To add the simulator's certificate to the connector's trust list:
106+
107+
- Go to the [operations experience](https://iotoperations.azure.com) web UI and sign in with your Microsoft Entra ID credentials.
108+
109+
- Select your site. If you're working with a new deployment, there are no sites yet. You can find the cluster you created in the previously by selecting **View unassigned instances**. In the operations experience, an instance represents a cluster where you deployed Azure IoT Operations.
110+
111+
:::image type="content" source="media/tutorial-add-assets/site-list.png" alt-text="Screenshot that shows the unassigned instances node in the operations experience.":::
112+
113+
- Select the instance where you deployed Azure IoT Operations:
114+
115+
:::image type="content" source="media/tutorial-add-assets/cluster-list.png" alt-text="Screenshot of Azure IoT Operations instance list.":::
95116

96-
When you deployed Azure IoT Operations in the previous article, you included a built-in OPC PLC simulator. In this step, you add an asset endpoint that enables you to connect to the OPC PLC simulator.
117+
> [!TIP]
118+
> If you don't see any instances, you might not be in the right Microsoft Entra ID tenant. You can change the tenant from the top right menu in the operations experience.
119+
120+
- Select **Asset endpoints**~ and then **Manage certificates and secrets**:
121+
122+
:::image type="content" source="media/tutorial-add-assets/manage-certificates.png" alt-text="Screenshot that shows how to find the manage certificates page in the operations experience.":::
123+
124+
- On the **Certificates page**, select **Trust list** and then **Add new certificate**:
125+
126+
:::image type="content" source="media/tutorial-add-assets/add-certificate.png" alt-text="Screenshot that shows how to add a certificate to the trust list in the operations experience.":::
127+
128+
- Select **Upload certificate** and choose the `opcplc-000000.crt` file you downloaded previously. Then select **Upload**:
129+
130+
:::image type="content" source="media/tutorial-add-assets/uploaded-certificate.png" alt-text="Screenshot that shows a successful certificate upload.":::
131+
132+
- Select **Apply**.
133+
134+
The simulator's application instance certificate is now in the connector for OPC UA's trust list.
135+
136+
## Add an asset endpoint
97137

98-
To add an asset endpoint:
138+
In this step, you use the operations experience to add an asset endpoint that enables you to connect to the OPC PLC simulator.To add an asset endpoint:
99139

100140
1. Select **Asset endpoints** and then **Create asset endpoint**:
101141

articles/iot-operations/get-started-end-to-end-sample/quickstart-configure.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ _OPC UA servers_ are software applications that communicate with assets. _OPC UA
2525

2626
In this quickstart, you use a Bicep file to configure your Azure IoT Operations instance.
2727

28+
> [!TIP]
29+
> If you prefer a longer tutorial that walks you through the same steps in more depth and includes additional detail such as security configuration, see [Tutorial: Add OPC UA assets to your Azure IoT Operations cluster](../end-to-end-tutorials/tutorial-add-assets.md).
30+
2831
## Prerequisites
2932

3033
Have an instance of Azure IoT Operations deployed in a Kubernetes cluster. The [Quickstart: Run Azure IoT Operations in GitHub Codespaces with K3s](quickstart-deploy.md) provides simple instructions to deploy an Azure IoT Operations instance that you can use for the quickstarts.

0 commit comments

Comments
 (0)