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
title: Configure OPC UA user authentication options
3
-
description: How to configure OPC UA user authentication options to use with Azure IoT OPC UA Broker.
3
+
description: How to configure OPC UA Broker user authentication options for it to use when it connects to an OPC UA server.
4
4
author: dominicbetts
5
5
ms.author: dobett
6
6
ms.subservice: opcua-broker
7
7
ms.topic: how-to
8
8
ms.custom: ignite-2023
9
-
ms.date: 03/01/2024
9
+
ms.date: 05/16/2024
10
10
11
-
# CustomerIntent: As a user in IT, operations, or development, I want to configure my OPC UA industrial edge environment
12
-
# with custom OPC UA user authentication options to keep it secure and work with my solution.
11
+
# CustomerIntent: As a user in IT, operations, or development, I want to configure my OPC UA industrial edge environment with custom OPC UA user authentication options to keep it secure and work with my solution.
13
12
---
14
13
15
-
# Configure OPC UA user authentication options to use with Azure IoT OPC UA Broker Preview
14
+
# Configure OPC UA user authentication options for Azure IoT OPC UA Broker Preview to use
In this article, you learn how to configure OPC UA user authentication options. These options provide more control over your OPC UA authentication, and let you configure authentication in a way that makes sense for your solution.
18
+
In this article, you learn how to configure OPC UA user authentication options. These options provide more control over how OPC UA Broker Preview authenticates with OPC UA servers in your environment.
19
+
20
+
To learn more, see [OPC UA applications - user authentication](https://reference.opcfoundation.org/Core/Part2/v105/docs/5.2.3).
20
21
21
22
## Prerequisites
22
23
23
-
Azure IoT Operations Preview installed. For more information, see [Quickstart: Deploy Azure IoT Operations Preview to an Arc-enabled Kubernetes cluster](../get-started/quickstart-deploy.md).
24
+
A deployed instance of Azure IoT Operations Preview. To deploy Azure IoT Operations for demonstration and exploration purposes, see [Quickstart: Deploy Azure IoT Operations – to an Arc-enabled Kubernetes cluster](../get-started/quickstart-deploy.md).
24
25
25
26
## Features supported
26
27
27
-
| Features | Meaning | Symbol |
28
-
|---------|---------|---------:|
29
-
| Configuration of OPC UA user authentication with username and password | Supported | ✅ |
30
-
| Configuration of OPC UA user authentication with an X.509 user certificate | Unsupported | ❌ |
31
-
32
-
## Configure OPC UA user authentication with username and password
33
-
If an OPC UA Server requires user authentication with username and password, you can select that option in the Azure IoT Operations (preview) portal, and configure the secrets references for the username and password.
28
+
| Feature | Supported |
29
+
| -------- |:---------:|
30
+
| OPC UA user authentication with username and password. | ✅ |
31
+
| OPC UA user authentication with an X.509 user certificate. | ❌ |
34
32
35
-
Before you can configure secrets for the username and password, you need to complete two more configuration steps:
36
-
If an OPC UA Server requires user authentication with username and password, you can select that option in the Azure IoT Operations (preview) portal, and configure the secret references for the username and password.
33
+
## Configure username and password authentication
37
34
38
-
1. Configure the username and password in Azure Key Vault. In the following example, use the `username`and `password` as secret references for the configuration in the Azure IoT Operations (preview) portal.
35
+
First, configure the secrets for the username and password in Azure Key Vaultand project them into the connected cluster by using a `SecretProviderClass` object.
39
36
40
-
> [!NOTE]
41
-
> Replace the values in the example for user (*user1*) and password (*password*) with the actual credentials used in the OPC UA server to connect.
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 Azure IoT Operations (preview) portal.
42
38
39
+
Replace the placeholders for username and password with the credentials used to connect to the OPC UA server.
43
40
44
41
To configure the username and password, run the following code:
45
42
46
43
```bash
47
44
# Create username Secret in Azure Key Vault
48
45
az keyvault secret set \
49
46
--name "username" \
50
-
--vault-name <azure-key-vault-name> \
51
-
--value "user1" \
47
+
--vault-name "<your-azure-key-vault-name>" \
48
+
--value "<your-opc-ua-server-username>" \
52
49
--content-type "text/plain"
53
50
54
51
# Create password Secret in Azure Key Vault
55
52
az keyvault secret set \
56
53
--name "password" \
57
-
--vault-name <azure-key-vault-name> \
58
-
--value "password" \
54
+
--vault-name "<your-azure-key-vault-name>" \
55
+
--value "<your-opc-ua-server-username>" \
59
56
--content-type "text/plain"
60
57
```
61
58
62
-
1. Configure the secret provider class `aio-opc-ua-broker-user-authentication` custom resource (CR) in the connected cluster. Use a K8s client such as kubectl to configure the secrets (`username` and `password`, in the following example) in the SPC object array in the connected cluster.
59
+
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.
60
+
61
+
The following example shows a complete`SecretProviderClass` custom resource after you add the secrets:
63
62
64
-
The following example shows a complete SPC CR after you add the secret configurations:
65
-
66
63
```yml
67
64
apiVersion: secrets-store.csi.x-k8s.io/v1
68
65
kind: SecretProviderClass
@@ -86,9 +83,8 @@ If an OPC UA Server requires user authentication with username and password, you
86
83
objectType: secret
87
84
objectVersion: ""
88
85
```
89
-
90
-
The projection of the Azure Key Vault secrets and certificates into the cluster takes some time depending on the configured polling interval.
91
86
92
-
## Related content
87
+
> [!NOTE]
88
+
> The time it takes to project Azure Key Vault certificates into the cluster depends on the configured polling interval.
93
89
94
-
- [Configure an OPC PLC simulator](howto-configure-opc-plc-simulator.md)
90
+
In the Azure IoT Operations (preview) portal, 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`.
0 commit comments