Skip to content

Commit 44a3cc4

Browse files
authored
Merge pull request #290145 from ShawnJackson/howto-enable-secure-settings
[AQ] edit pass: howto-enable-secure-settings
2 parents d66defd + f7ff51f commit 44a3cc4

File tree

2 files changed

+47
-47
lines changed

2 files changed

+47
-47
lines changed
Lines changed: 42 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,51 @@
11
---
22
title: Enable secure settings
3-
description: Enable secure settings on your Azure IoT Operations Preview deployment by configuring an Azure Key Vault and enabling workload identities.
3+
description: Enable secure settings on your Azure IoT Operations Preview deployment by configuring an Azure key vault and enabling workload identities.
44
author: asergaz
55
ms.author: sergaz
66
ms.topic: how-to
77
ms.date: 11/04/2024
88

9-
#CustomerIntent: I deployed Azure IoT Operations with test settings for the quickstart scenario, now I want to enable secure settings to use the full feature set.
9+
#CustomerIntent: I deployed Azure IoT Operations with test settings for the quickstart scenario, and now I want to enable secure settings to use the full feature set.
1010
---
1111

12-
# Enable secure settings in Azure IoT Operations Preview deployment
12+
# Enable secure settings in an Azure IoT Operations Preview deployment
1313

1414
[!INCLUDE [public-preview-note](../includes/public-preview-note.md)]
1515

16-
The secure settings for Azure IoT Operations include the setup of Secrets Management and user-assigned managed identity for cloud connections, for example, an OPC UA server, or dataflow endpoints.
16+
The secure settings for Azure IoT Operations include the setup of secrets management and a user-assigned managed identity for cloud connections; for example, an OPC UA server or dataflow endpoints.
1717

1818
This article provides instructions for enabling secure settings if you didn't do so during your initial deployment.
1919

2020
## Prerequisites
2121

22-
* An Azure IoT Operations instance deployed with test settings. For example, if you followed the instructions in [Quickstart: Run Azure IoT Operations in Codespaces](../get-started-end-to-end-sample/quickstart-deploy.md).
22+
* An Azure IoT Operations instance deployed with test settings. For example, follow the instructions in [Quickstart: Run Azure IoT Operations Preview in GitHub Codespaces](../get-started-end-to-end-sample/quickstart-deploy.md).
2323

24-
* Azure CLI installed on your development machine. This scenario requires Azure CLI version 2.64.0 or higher. Use `az --version` to check your version and `az upgrade` to update if necessary. For more information, see [How to install the Azure CLI](/cli/azure/install-azure-cli).
24+
* Azure CLI installed on your development machine. This scenario requires Azure CLI version 2.64.0 or later. Use `az --version` to check your version and `az upgrade` to update, if necessary. For more information, see [How to install the Azure CLI](/cli/azure/install-azure-cli).
2525

26-
* The latest versions of the following extensions for Azure CLI:
26+
* The latest versions of the following extensions for the Azure CLI:
2727

2828
```azurecli
2929
az extension add --upgrade --name azure-iot-ops
3030
az extension add --upgrade --name connectedk8s
3131
```
3232

33-
## Configure cluster for workload identity
33+
## Configure a cluster for a workload identity
3434

35-
A workload identity is an identity you assign to a software workload (such as an application, service, script, or container) to authenticate and access other services and resources. The workload identity feature needs to be enabled on your cluster, so that the [Azure Key Vault Secret Store extension for Kubernetes](/azure/azure-arc/kubernetes/secret-store-extension) and Azure IoT Operations can access Microsoft Entra ID protected resources. To learn more, see [What are workload identities?](/entra/workload-id/workload-identities-overview).
35+
A *workload identity* is an identity that you assign to a software workload (such as an application, service, script, or container) to authenticate and access other services and resources. The workload identity feature needs to be enabled on your cluster, so that the [Azure Key Vault Secret Store extension for Kubernetes](/azure/azure-arc/kubernetes/secret-store-extension) and Azure IoT Operations can access Microsoft Entra ID protected resources. To learn more, see [What are workload identities?](/entra/workload-id/workload-identities-overview).
3636

3737
> [!NOTE]
38-
> This step only applies to Ubuntu + K3s clusters. The quickstart script for Azure Kubernetes Service (AKS) Edge Essentials used in [Prepare your Azure Arc-enabled Kubernetes cluster](../deploy-iot-ops/howto-prepare-cluster.md) enables workload identity by default. If you have an AKS Edge Essentials cluster, continue to the next section.
38+
> This step applies only to Ubuntu + K3s clusters. The quickstart script for Azure Kubernetes Service (AKS) Edge Essentials used in [Prepare your Azure Arc-enabled Kubernetes cluster](../deploy-iot-ops/howto-prepare-cluster.md) enables a workload identity by default. If you have an AKS Edge Essentials cluster, continue to the next section.
3939
40-
If you aren't sure whether your K3s cluster already has workload identity enabled or not, run the [az connectedk8s show](/cli/azure/connectedk8s#az-connectedk8s-show) command to check:
40+
If you aren't sure whether or not your K3s cluster already has workload identity enabled, run the [az connectedk8s show](/cli/azure/connectedk8s#az-connectedk8s-show) command to check:
4141

4242
```azurecli
4343
az connectedk8s show --name <CLUSTER_NAME> --resource-group <RESOURCE_GROUP> --query "{oidcIssuerEnabled:oidcIssuerProfile.enabled, workloadIdentityEnabled: securityProfile.workloadIdentity.enabled}"
4444
```
4545

46-
If not already set up, use the following steps to enable workload identity on an existing connected K3s cluster:
46+
To enable a workload identity on an existing connected K3s cluster:
4747

48-
1. Use the [az connectedk8s update](/cli/azure/connectedk8s#az-connectedk8s-update) command to enable the workload identity feature on the cluster.
48+
1. Use the [az connectedk8s update](/cli/azure/connectedk8s#az-connectedk8s-update) command to enable the workload identity feature on the cluster:
4949

5050
```azurecli
5151
#!/bin/bash
@@ -54,13 +54,13 @@ If not already set up, use the following steps to enable workload identity on an
5454
RESOURCE_GROUP="<RESOURCE_GROUP>"
5555
CLUSTER_NAME="<CLUSTER_NAME>"
5656
57-
# Enable workload identity
57+
# Enable a workload identity
5858
az connectedk8s update --resource-group $RESOURCE_GROUP \
5959
--name $CLUSTER_NAME \
6060
--enable-oidc-issuer --enable-workload-identity
6161
```
6262

63-
1. Use the [az connectedk8s show](/cli/azure/connectedk8s#az-connectedk8s-show) command to get the cluster's issuer url. Take a note to add it later in K3s config file.
63+
1. Use the [az connectedk8s show](/cli/azure/connectedk8s#az-connectedk8s-show) command to get the cluster's issuer URL. You'll add the URL later in the K3s configuration file.
6464

6565
```azurecli
6666
#!/bin/bash
@@ -69,12 +69,12 @@ If not already set up, use the following steps to enable workload identity on an
6969
RESOURCE_GROUP="<RESOURCE_GROUP>"
7070
CLUSTER_NAME="<CLUSTER_NAME>"
7171
72-
# Get the cluster's issuer url
72+
# Get the cluster's issuer URL
7373
SERVICE_ACCOUNT_ISSUER=$(az connectedk8s show --resource-group $RESOURCE_GROUP --name $CLUSTER_NAME --query oidcIssuerProfile.issuerUrl --output tsv)
7474
echo "SERVICE_ACCOUNT_ISSUER = $SERVICE_ACCOUNT_ISSUER"
7575
```
7676

77-
1. Create a K3s config file.
77+
1. Create a K3s configuration file:
7878

7979
```bash
8080
sudo nano /etc/rancher/k3s/config.yaml
@@ -88,30 +88,30 @@ If not already set up, use the following steps to enable workload identity on an
8888
- service-account-max-token-expiration=24h
8989
```
9090
91-
1. Save and exit the file editor.
91+
1. Save and close the file editor.
9292
93-
1. Restart k3s.
93+
1. Restart k3s:
9494
9595
```bash
9696
systemctl restart k3s
9797
```
9898

99-
## Set up Secrets Management
99+
## Set up secrets management
100100

101-
Secrets Management for Azure IoT Operations uses Secret Store extension to sync the secrets from an Azure Key Vault and store them on the edge as Kubernetes secrets. Secret Store extension requires a user assigned managed identity with access to the Azure Key Vault where secrets are stored. To learn more, see [What are managed identities for Azure resources?](/entra/identity/managed-identities-azure-resources/overview).
101+
Secrets management for Azure IoT Operations uses the Secret Store extension to sync the secrets from an Azure key vault and store them on the edge as Kubernetes secrets. The Secret Store extension requires a user-assigned managed identity with access to the Azure key vault where secrets are stored. To learn more, see [What are managed identities for Azure resources?](/entra/identity/managed-identities-azure-resources/overview).
102102

103-
Follow these steps to set up Secrets Management:
103+
To set up secrets management:
104104

105-
1. [Create an Azure Key Vault](/azure/key-vault/secrets/quick-create-cli#create-a-key-vault) that is used to store secrets, and [give your user account permissions to manage secrets](/azure/key-vault/secrets/quick-create-cli#give-your-user-account-permissions-to-manage-secrets-in-key-vault) with the `Key Vaults Secrets Officer` role.
106-
1. [Create a user-assigned managed identity](/entra/identity/managed-identities-azure-resources/how-manage-user-assigned-managed-identities?pivots=identity-mi-methods-azp#create-a-user-assigned-managed-identity) for Secret Store extension.
105+
1. [Create an Azure key vault](/azure/key-vault/secrets/quick-create-cli#create-a-key-vault) that's used to store secrets, and [give your user account permissions to manage secrets](/azure/key-vault/secrets/quick-create-cli#give-your-user-account-permissions-to-manage-secrets-in-key-vault) with the `Key Vaults Secrets Officer` role.
106+
1. [Create a user-assigned managed identity](/entra/identity/managed-identities-azure-resources/how-manage-user-assigned-managed-identities?pivots=identity-mi-methods-azp#create-a-user-assigned-managed-identity) for the Secret Store extension.
107107
1. Use the [az iot ops secretsync enable](/cli/azure/iot/ops/secretsync#az-iot-ops-secretsync-enable) command to set up the Azure IoT Operations instance for secret synchronization. This command:
108108

109-
- Creates a federated identity credential using the user-assigned managed identity.
110-
- Adds a role assignment to the user-assigned managed identity for access to the Azure Key Vault.
109+
- Creates a federated identity credential by using the user-assigned managed identity.
110+
- Adds a role assignment to the user-assigned managed identity for access to the Azure key vault.
111111
- Adds a minimum secret provider class associated with the Azure IoT Operations instance.
112112

113113
# [Bash](#tab/bash)
114-
114+
115115
```azurecli
116116
# Variable block
117117
INSTANCE_NAME="<INSTANCE_NAME>"
@@ -131,9 +131,9 @@ Follow these steps to set up Secrets Management:
131131
--mi-user-assigned $USER_ASSIGNED_MI_RESOURCE_ID \
132132
--kv-resource-id $KEYVAULT_RESOURCE_ID
133133
```
134-
134+
135135
# [PowerShell](#tab/powershell)
136-
136+
137137
```azurecli
138138
# Variable block
139139
INSTANCE_NAME="<INSTANCE_NAME>"
@@ -153,24 +153,24 @@ Follow these steps to set up Secrets Management:
153153
--mi-user-assigned $USER_ASSIGNED_MI_RESOURCE_ID `
154154
--kv-resource-id $KEYVAULT_RESOURCE_ID
155155
```
156-
156+
157157
---
158158
159-
Now that secret synchronization setup is complete, you can refer to [Manage Secrets](./howto-manage-secrets.md) to learn how to use secrets with Azure IoT Operations.
159+
Now that secret synchronization setup is complete, you can refer to [Manage secrets for your Azure IoT Operations Preview deployment](./howto-manage-secrets.md) to learn how to use secrets with Azure IoT Operations.
160160
161-
## Set up user-assigned managed identity for cloud connections
161+
## Set up a user-assigned managed identity for cloud connections
162162
163-
Some Azure IoT Operations components like dataflow endpoints use user-assigned managed identity for cloud connections. It's recommended to use a separate identity from the one used to set up Secrets Management.
163+
Some Azure IoT Operations components, like dataflow endpoints, use a user-assigned managed identity for cloud connections. We recommend that you use a separate identity from the one that you used to set up secrets management.
164164
165-
1. [Create a user-assigned managed identity](/entra/identity/managed-identities-azure-resources/how-manage-user-assigned-managed-identities?pivots=identity-mi-methods-azp#create-a-user-assigned-managed-identity) which is used for cloud connections.
165+
1. [Create a user-assigned managed identity](/entra/identity/managed-identities-azure-resources/how-manage-user-assigned-managed-identities?pivots=identity-mi-methods-azp#create-a-user-assigned-managed-identity) that's used for cloud connections.
166166
167167
> [!NOTE]
168-
> You will need to grant the identity permission to whichever cloud resource this will be used for.
168+
> You'll need to grant the identity permission to whichever cloud resource you'll use the managed identity for.
169169
170-
1. Use the [az iot ops identity assign](/cli/azure/iot/ops) command to assign the identity to the Azure IoT Operations instance. This command also creates a federated identity credential using the OIDC issuer of the indicated connected cluster and the Azure IoT Operations service account.
170+
1. Use the [az iot ops identity assign](/cli/azure/iot/ops) command to assign the identity to the Azure IoT Operations instance. This command also creates a federated identity credential by using the OIDC issuer of the indicated connected cluster and the Azure IoT Operations service account.
171171
172172
# [Bash](#tab/bash)
173-
173+
174174
```azurecli
175175
# Variable block
176176
INSTANCE_NAME="<INSTANCE_NAME>"
@@ -185,9 +185,9 @@ Some Azure IoT Operations components like dataflow endpoints use user-assigned m
185185
--resource-group $RESOURCE_GROUP \
186186
--mi-user-assigned $USER_ASSIGNED_MI_RESOURCE_ID
187187
```
188-
188+
189189
# [PowerShell](#tab/powershell)
190-
190+
191191
```azurecli
192192
# Variable block
193193
$INSTANCE_NAME="<INSTANCE_NAME>"
@@ -198,12 +198,12 @@ Some Azure IoT Operations components like dataflow endpoints use user-assigned m
198198
$USER_ASSIGNED_MI_RESOURCE_ID=$(az identity show --name $USER_ASSIGNED_MI_NAME --resource-group $RESOURCE_GROUP --query id --output tsv)
199199
200200
201-
#Assign the identity to the Azure IoT Operations instance
201+
# Assign the identity to the Azure IoT Operations instance
202202
az iot ops identity assign --name $INSTANCE_NAME `
203203
--resource-group $RESOURCE_GROUP `
204204
--mi-user-assigned $USER_ASSIGNED_MI_RESOURCE_ID
205205
```
206-
206+
207207
---
208208
209-
Now, you can use this managed identity in dataflow endpoints for cloud connections.
209+
Now you can use this managed identity in dataflow endpoints for cloud connections.
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
---
2-
title: include file
3-
description: include file
2+
title: Include file
3+
description: Include file
44
author: dominicbetts
55
ms.topic: include
66
ms.date: 08/19/2024
77
ms.author: dobett
88
---
99

1010
> [!IMPORTANT]
11-
> Azure IoT Operations Preview – enabled by Azure Arc is currently in **preview**. You shouldn't use this preview software in production environments.
11+
> Azure IoT Operations Preview – enabled by Azure Arc is currently in *preview*. You shouldn't use this preview software in production environments.
1212
>
13-
> You'll need to deploy a new Azure IoT Operations installation when a generally available release is made available. You won't be able to upgrade a preview installation.
13+
> You'll need to deploy a new Azure IoT Operations installation when a generally available release becomes available. You won't be able to upgrade a preview installation.
1414
>
15-
> See the [Supplemental Terms of Use for Microsoft Azure Previews](https://azure.microsoft.com/support/legal/preview-supplemental-terms/) for legal terms that apply to Azure features that are in beta, preview, or otherwise not yet released into general availability.
15+
> For legal terms that apply to Azure features that are in beta, in preview, or otherwise not yet released into general availability, see the [Supplemental Terms of Use for Microsoft Azure Previews](https://azure.microsoft.com/support/legal/preview-supplemental-terms/).

0 commit comments

Comments
 (0)