Skip to content

Commit d66fa63

Browse files
authored
Merge pull request #287817 from dominicbetts/simona-patch-5
AIO: Update asset endpoint auth
2 parents fd32dfd + 612b056 commit d66fa63

File tree

4 files changed

+23
-79
lines changed

4 files changed

+23
-79
lines changed

articles/iot-operations/discover-manage-assets/howto-configure-opcua-authentication-options.md

Lines changed: 23 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,13 @@ ms.date: 09/16/2024
1717

1818
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.
1919

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+
2022
To learn more, see [OPC UA applications - user authentication](https://reference.opcfoundation.org/Core/Part2/v105/docs/5.2.3).
2123

2224
## Prerequisites
2325

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.
2527

2628
## Features supported
2729

@@ -32,81 +34,23 @@ A deployed instance of Azure IoT Operations Preview. To deploy Azure IoT Operati
3234

3335
## Configure username and password authentication
3436

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, select the **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.
55+
56+
1. Select **Apply**.
Loading
Loading
Loading

0 commit comments

Comments
 (0)