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/deploy-iot-ops/howto-enable-secure-settings.md
+7-144Lines changed: 7 additions & 144 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -60,7 +60,7 @@ If not already set up, use the following steps to enable workload identity on an
60
60
--enable-oidc-issuer --enable-workload-identity
61
61
```
62
62
63
-
1. Use the [az connectedk8s show](/cli/azure/connectedk8s#az-connectedk8s-show) command to 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. Take a note to add it later in K3s config file.
64
64
65
65
```azurecli
66
66
#!/bin/bash
@@ -102,119 +102,12 @@ Secrets Management for Azure IoT Operations uses Secret Store extension to sync
102
102
103
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).
104
104
105
-
### Create an Azure Key Vault
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.
106
109
107
-
If you already have an Azure Key Vault with `Key Vault Secrets Officer` permissions, you can skip this section.
108
-
109
-
1. Use the [az keyvault create](/cli/azure/keyvault#az-keyvault-create) command to create an Azure Key Vault.
110
-
111
-
# [Bash](#tab/bash)
112
-
113
-
```azurecli
114
-
# Variable block
115
-
KEYVAULT_NAME="<KEYVAULT_NAME>"
116
-
RESOURCE_GROUP="<RESOURCE_GROUP>"
117
-
LOCATION="<LOCATION>"
118
-
119
-
# Create the Key Vault
120
-
az keyvault create --name $KEYVAULT_NAME \
121
-
--resource-group $RESOURCE_GROUP \
122
-
--location $LOCATION \
123
-
--enable-rbac-authorization
124
-
```
125
-
126
-
# [PowerShell](#tab/powershell)
127
-
128
-
```azurecli
129
-
# Variable block
130
-
$KEYVAULT_NAME="<KEYVAULT_NAME>"
131
-
$RESOURCE_GROUP="<RESOURCE_GROUP>"
132
-
$LOCATION="<LOCATION>"
133
-
134
-
# Create the Key Vault
135
-
az keyvault create --name $KEYVAULT_NAME `
136
-
--resource-group $RESOURCE_GROUP `
137
-
--location $LOCATION `
138
-
--enable-rbac-authorization
139
-
```
140
-
141
-
---
142
-
143
-
1. Use the [az role assignment create](/cli/azure/role/assignment#az-role-assignment-create) command to give the currently logged-in user `Key Vault Secrets Officer` permissions to the key vault.
144
-
145
-
# [Bash](#tab/bash)
146
-
147
-
```azurecli
148
-
# Variable block
149
-
SUBSCRIPTION_ID="<SUBSCRIPTION_ID>"
150
-
RESOURCE_GROUP="<RESOURCE_GROUP>"
151
-
KEYVAULT_NAME="<KEYVAULT_NAME>"
152
-
153
-
# Get the object ID of the currently logged-in user
154
-
ASSIGNEE_ID=$(az ad signed-in-user show --query id -o tsv)
155
-
156
-
# Assign the "Key Vault Secrets Officer" role
157
-
az role assignment create --role "Key Vault Secrets Officer" \
### Create a user-assigned managed identity for Secret Store extension
182
-
183
-
Use the [az identity create](/cli/azure/identity#az-identity-create) command to create the user-assigned managed identity.
184
-
185
-
# [Bash](#tab/bash)
186
-
187
-
```azurecli
188
-
# Variable block
189
-
USER_ASSIGNED_MI_NAME="<USER_ASSIGNED_MI_NAME>"
190
-
RESOURCE_GROUP="<RESOURCE_GROUP>"
191
-
LOCATION="LOCATION"
192
-
193
-
# Create the identity
194
-
az identity create --name $USER_ASSIGNED_MI_NAME \
195
-
--resource-group $RESOURCE_GROUP \
196
-
--location $LOCATION
197
-
```
198
-
199
-
# [PowerShell](#tab/powershell)
200
-
201
-
```azurecli
202
-
# Variable block
203
-
$USER_ASSIGNED_MI_NAME="USER_ASSIGNED_MI_NAME"
204
-
$RESOURCE_GROUP="<RESOURCE_GROUP>"
205
-
$LOCATION="LOCATION"
206
-
207
-
# Create the identity
208
-
az identity create --name $USER_ASSIGNED_MI_NAME `
209
-
--resource-group $RESOURCE_GROUP `
210
-
--location $LOCATION
211
-
```
212
-
213
-
---
214
-
215
-
### Enable secret synchronization
216
-
217
-
Use the [az iot ops secretsync enable](/cli/azure/iot/ops) command to set up the Azure IoT Operations instance for secret synchronization. This command:
110
+
This command:
218
111
219
112
* Creates a federated identity credential using the user-assigned managed identity.
220
113
* Adds a role assignment to the user-assigned managed identity for access to the Azure Key Vault.
@@ -272,37 +165,7 @@ Now that secret synchronization setup is complete, you can refer to [Manage Secr
272
165
273
166
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.
274
167
275
-
1. Create a user-assigned managed identity which can be used for cloud connections. Use the [az identity create](/cli/azure/identity#az-identity-create) command to create the user-assigned managed identity.
276
-
277
-
# [Bash](#tab/bash)
278
-
279
-
```azurecli
280
-
# Variable block
281
-
USER_ASSIGNED_MI_NAME="<USER_ASSIGNED_MI_NAME FOR CLOUD CONNECTIONS>"
282
-
RESOURCE_GROUP="<RESOURCE_GROUP>"
283
-
LOCATION="LOCATION"
284
-
285
-
# Create the identity
286
-
az identity create --name $USER_ASSIGNED_MI_NAME \
287
-
--resource-group $RESOURCE_GROUP \
288
-
--location $LOCATION
289
-
```
290
-
291
-
# [PowerShell](#tab/powershell)
292
-
293
-
```azurecli
294
-
# Variable block
295
-
$USER_ASSIGNED_MI_NAME="USER_ASSIGNED_MI_NAME FOR CLOUD CONNECTIONS"
296
-
$RESOURCE_GROUP="<RESOURCE_GROUP>"
297
-
$LOCATION="LOCATION"
298
-
299
-
# Create the identity
300
-
az identity create --name $USER_ASSIGNED_MI_NAME `
301
-
--resource-group $RESOURCE_GROUP `
302
-
--location $LOCATION
303
-
```
304
-
305
-
---
168
+
1. Create a [User Assigned Managed Identity](/entra/identity/managed-identities-azure-resources/overview) which will be used for cloud connections.
306
169
307
170
> [!NOTE]
308
171
> You will need to grant the identity permission to whichever cloud resource this will be used for.
0 commit comments