Skip to content

Commit f75bb68

Browse files
authored
Merge pull request #289763 from asergaz/sergaz-aio-m3
fixing typo and adding new referenced to KV and UAMI
2 parents df8eb09 + 118d18e commit f75bb68

File tree

1 file changed

+57
-60
lines changed

1 file changed

+57
-60
lines changed

articles/iot-operations/deploy-iot-ops/howto-enable-secure-settings.md

Lines changed: 57 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Enable secure settings on your Azure IoT Operations Preview deploym
44
author: asergaz
55
ms.author: sergaz
66
ms.topic: how-to
7-
ms.date: 09/24/2024
7+
ms.date: 11/04/2024
88

99
#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.
1010
---
@@ -98,74 +98,71 @@ If not already set up, use the following steps to enable workload identity on an
9898

9999
## 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.
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).
102102

103-
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).
103+
Follow these steps to set up Secrets Management:
104104

105-
1. Create an [Azure Key Vault](/azure/key-vault/secrets/quick-create-cli) that will be used to store secrets.
106-
2. Make sure you have `Key Vaults Secrets Officer` role on the Azure Key Vault.
107-
3. Create a [User Assigned Managed Identity](/entra/identity/managed-identities-azure-resources/overview) for secret store extension.
108-
5. 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.
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.
107+
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:
109108

110-
This command:
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.
111+
- Adds a minimum secret provider class associated with the Azure IoT Operations instance.
111112

112-
* Creates a federated identity credential using the user-assigned managed identity.
113-
* Adds a role assignment to the user-assigned managed identity for access to the Azure Key Vault.
114-
* Adds a minimum secret provider class associated with the Azure IoT Operations instance.
115-
116-
# [Bash](#tab/bash)
117-
118-
```azurecli
119-
# Variable block
120-
INSTANCE_NAME="<INSTANCE_NAME"
121-
RESOURCE_GROUP="<RESOURCE_GROUP>"
122-
USER_ASSIGNED_MI_NAME="<USER_ASSIGNED_MI_NAME>"
123-
KEYVAULT_NAME="<KEYVAULT_NAME>"
124-
125-
#Get the resource ID of the user-assigned managed identity
126-
USER_ASSIGNED_MI_RESOURCE_ID=$(az identity show --name $USER_ASSIGNED_MI_NAME --resource-group $RESOURCE_GROUP --query id --output tsv)
127-
128-
#Get the resource ID of the key vault
129-
KEYVAULT_RESOURCE_ID=$(az keyvault show --name $KEYVAULT_NAME --resource-group $RESOURCE_GROUP --query id --output tsv)
130-
131-
#Enable secret synchronization
132-
az iot ops secretsync enable --name $INSTANCE_NAME \
133-
--resource-group $RESOURCE_GROUP \
134-
--mi-user-assigned $USER_ASSIGNED_MI_RESOURCE_ID \
135-
--kv-resource-id $KEYVAULT_RESOURCE_ID
136-
```
137-
138-
# [PowerShell](#tab/powershell)
139-
140-
```azurecli
141-
# Variable block
142-
INSTANCE_NAME="<INSTANCE_NAME"
143-
$RESOURCE_GROUP="<RESOURCE_GROUP>"
144-
$USER_ASSIGNED_MI_NAME="<USER_ASSIGNED_MI_NAME>"
145-
$KEYVAULT_NAME="<KEYVAULT_NAME>"
146-
147-
# Get the resource ID of the user-assigned managed identity
148-
$USER_ASSIGNED_MI_RESOURCE_ID=$(az identity show --name $USER_ASSIGNED_MI_NAME --resource-group $RESOURCE_GROUP --query id --output tsv)
149-
150-
# Get the resource ID of the key vault
151-
$KEYVAULT_RESOURCE_ID=$(az keyvault show --name $KEYVAULT_NAME --resource-group $RESOURCE_GROUP --query id --output tsv)
152-
153-
# Enable secret synchronization
154-
az iot ops secretsync enable --name $INSTANCE_NAME `
155-
--resource-group $RESOURCE_GROUP `
156-
--mi-user-assigned $USER_ASSIGNED_MI_RESOURCE_ID `
157-
--kv-resource-id $KEYVAULT_RESOURCE_ID
158-
```
159-
160-
---
113+
# [Bash](#tab/bash)
114+
115+
```azurecli
116+
# Variable block
117+
INSTANCE_NAME="<INSTANCE_NAME>"
118+
RESOURCE_GROUP="<RESOURCE_GROUP>"
119+
USER_ASSIGNED_MI_NAME="<USER_ASSIGNED_MI_NAME>"
120+
KEYVAULT_NAME="<KEYVAULT_NAME>"
121+
122+
#Get the resource ID of the user-assigned managed identity
123+
USER_ASSIGNED_MI_RESOURCE_ID=$(az identity show --name $USER_ASSIGNED_MI_NAME --resource-group $RESOURCE_GROUP --query id --output tsv)
124+
125+
#Get the resource ID of the key vault
126+
KEYVAULT_RESOURCE_ID=$(az keyvault show --name $KEYVAULT_NAME --resource-group $RESOURCE_GROUP --query id --output tsv)
127+
128+
#Enable secret synchronization
129+
az iot ops secretsync enable --name $INSTANCE_NAME \
130+
--resource-group $RESOURCE_GROUP \
131+
--mi-user-assigned $USER_ASSIGNED_MI_RESOURCE_ID \
132+
--kv-resource-id $KEYVAULT_RESOURCE_ID
133+
```
134+
135+
# [PowerShell](#tab/powershell)
136+
137+
```azurecli
138+
# Variable block
139+
INSTANCE_NAME="<INSTANCE_NAME>"
140+
$RESOURCE_GROUP="<RESOURCE_GROUP>"
141+
$USER_ASSIGNED_MI_NAME="<USER_ASSIGNED_MI_NAME>"
142+
$KEYVAULT_NAME="<KEYVAULT_NAME>"
143+
144+
# Get the resource ID of the user-assigned managed identity
145+
$USER_ASSIGNED_MI_RESOURCE_ID=$(az identity show --name $USER_ASSIGNED_MI_NAME --resource-group $RESOURCE_GROUP --query id --output tsv)
146+
147+
# Get the resource ID of the key vault
148+
$KEYVAULT_RESOURCE_ID=$(az keyvault show --name $KEYVAULT_NAME --resource-group $RESOURCE_GROUP --query id --output tsv)
149+
150+
# Enable secret synchronization
151+
az iot ops secretsync enable --name $INSTANCE_NAME `
152+
--resource-group $RESOURCE_GROUP `
153+
--mi-user-assigned $USER_ASSIGNED_MI_RESOURCE_ID `
154+
--kv-resource-id $KEYVAULT_RESOURCE_ID
155+
```
156+
157+
---
161158
162159
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.
163160
164161
## Set up user-assigned managed identity for cloud connections
165162
166163
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.
167164
168-
1. Create a [User Assigned Managed Identity](/entra/identity/managed-identities-azure-resources/overview) which will be 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) which is used for cloud connections.
169166
170167
> [!NOTE]
171168
> You will need to grant the identity permission to whichever cloud resource this will be used for.
@@ -176,7 +173,7 @@ Some Azure IoT Operations components like dataflow endpoints use user-assigned m
176173
177174
```azurecli
178175
# Variable block
179-
INSTANCE_NAME="<INSTANCE_NAME"
176+
INSTANCE_NAME="<INSTANCE_NAME>"
180177
RESOURCE_GROUP="<RESOURCE_GROUP>"
181178
USER_ASSIGNED_MI_NAME="<USER_ASSIGNED_MI_NAME FOR CLOUD CONNECTIONS>"
182179
@@ -193,7 +190,7 @@ Some Azure IoT Operations components like dataflow endpoints use user-assigned m
193190
194191
```azurecli
195192
# Variable block
196-
$INSTANCE_NAME="<INSTANCE_NAME"
193+
$INSTANCE_NAME="<INSTANCE_NAME>"
197194
$RESOURCE_GROUP="<RESOURCE_GROUP>"
198195
$USER_ASSIGNED_MI_NAME="<USER_ASSIGNED_MI_NAME FOR CLOUD CONNECTIONS>"
199196

0 commit comments

Comments
 (0)