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
Copy file name to clipboardExpand all lines: articles/iot-operations/discover-manage-assets/howto-configure-opcua-authentication-options.md
+23-79Lines changed: 23 additions & 79 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,11 +17,13 @@ ms.date: 09/16/2024
17
17
18
18
In this article, you learn how to configure OPC UA user authentication options. These options provide more control over how the connector for OPC UA authenticates with OPC UA servers in your environment.
19
19
20
+
Currently, the connector for OPC UA supports user authentication with a username and password. You store and manage the username and password values in Azure Key Vault. Azure IoT Operations then synchronizes these values to your Kubernetes cluster where you can use them securely.
21
+
20
22
To learn more, see [OPC UA applications - user authentication](https://reference.opcfoundation.org/Core/Part2/v105/docs/5.2.3).
21
23
22
24
## Prerequisites
23
25
24
-
A deployed instance of Azure IoT Operations Preview. To deploy Azure IoT Operations for demonstration and exploration purposes, see [Quickstart: Run Azure IoT Operations Preview in GitHub Codespaces with K3s](../get-started-end-to-end-sample/quickstart-deploy.md).
26
+
A deployed instance of Azure IoT Operations Preview with [Manage Synced Secrets](../deploy-iot-ops/howto-manage-secrets.md#manage-synced-secrets) enabled.
25
27
26
28
## Features supported
27
29
@@ -32,81 +34,23 @@ A deployed instance of Azure IoT Operations Preview. To deploy Azure IoT Operati
32
34
33
35
## Configure username and password authentication
34
36
35
-
First, configure the secrets for the username and password in Azure Key Vault and project them into the connected cluster by using a `SecretProviderClass` object.
36
-
37
-
1. Configure the username and password in Azure Key Vault. In the following example, use the `username` and `password` as secret references for the asset endpoint configuration in the operations experience web UI.
38
-
39
-
Replace the placeholders for username and password with the credentials used to connect to the OPC UA server.
40
-
41
-
To configure the username and password, run the following code:
42
-
43
-
# [Bash](#tab/bash)
44
-
45
-
```bash
46
-
# Create username Secret in Azure Key Vault
47
-
az keyvault secret set \
48
-
--name username \
49
-
--vault-name <your-azure-key-vault-name> \
50
-
--value <your-opc-ua-server-username> \
51
-
--content-type text/plain
52
-
53
-
# Create password Secret in Azure Key Vault
54
-
az keyvault secret set \
55
-
--name password \
56
-
--vault-name <your-azure-key-vault-name> \
57
-
--value <your-opc-ua-server-password> \
58
-
--content-type text/plain
59
-
```
60
-
61
-
# [PowerShell](#tab/powershell)
62
-
63
-
```powershell
64
-
# Create username Secret in Azure Key Vault
65
-
az keyvault secret set`
66
-
--name username `
67
-
--vault-name <your-azure-key-vault-name>`
68
-
--value <your-opc-ua-server-username>`
69
-
--content-type text/plain
70
-
71
-
# Create password Secret in Azure Key Vault
72
-
az keyvault secret set`
73
-
--name password `
74
-
--vault-name <your-azure-key-vault-name>`
75
-
--value <your-opc-ua-server-password>`
76
-
--content-type text/plain
77
-
```
78
-
79
-
---
80
-
81
-
1. Configure the `aio-opc-ua-broker-user-authentication` custom resource in the cluster. Use a Kubernetes client such as `kubectl` to configure the `username` and `password` secrets in the `SecretProviderClass` object array in the cluster.
82
-
83
-
The following example shows a complete`SecretProviderClass` custom resource after you add the secrets:
84
-
85
-
```yaml
86
-
apiVersion: secrets-store.csi.x-k8s.io/v1
87
-
kind: SecretProviderClass
88
-
metadata:
89
-
name: aio-opc-ua-broker-user-authentication
90
-
namespace: azure-iot-operations
91
-
spec:
92
-
provider: azure
93
-
parameters:
94
-
usePodIdentity: 'false'
95
-
keyvaultName: <azure-key-vault-name>
96
-
tenantId: <azure-tenant-id>
97
-
objects: |
98
-
array:
99
-
- |
100
-
objectName: username
101
-
objectType: secret
102
-
objectVersion: ""
103
-
- |
104
-
objectName: password
105
-
objectType: secret
106
-
objectVersion: ""
107
-
```
108
-
109
-
> [!NOTE]
110
-
> The time it takes to project Azure Key Vault certificates into the cluster depends on the configured polling interval.
111
-
112
-
In the operations experience, selectthe**Username & password** option when you configure the Asset endpoint. Enter the names of the references that store the username and password values. In this example, the names of the references are `username` and `password`.
37
+
To configure the secrets for the *username* and *password* values in the [operations experience](https://iotoperations.azure.com) web UI:
38
+
39
+
1. Navigate to your list of asset endpoints:
40
+
41
+
:::image type="content" source="media/howto-configure-opcua-authentication-options/asset-endpoint-list.png" alt-text="Screenshot that shows the list of asset endpoints.":::
42
+
43
+
1. Select **Create asset endpoint**.
44
+
45
+
1. Select **Username password** as the authentication mode:
46
+
47
+
:::image type="content" source="media/howto-configure-opcua-authentication-options/authentication-mode.png" alt-text="Screenshot that shows the username and password authentication mode selected.":::
48
+
49
+
1. Enter a synced secret name and then select the username and password references from the linked Azure Key Vault:
50
+
51
+
:::image type="content" source="media/howto-configure-opcua-authentication-options/select-from-key-vault.png" alt-text="Screenshot that shows the username and password references from Azure Key Vault.":::
52
+
53
+
> [!TIP]
54
+
> You have the option to create new secrets in Azure Key Vault if you haven't already added them.
0 commit comments