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: AKS-Hybrid/aks-edge-workload-identity.md
+49-49Lines changed: 49 additions & 49 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -159,71 +159,71 @@ The following example shows how to use the Azure role-based access control (Azur
159
159
160
160
1. Create a key vault with purge protection and RBAC authorization enabled. You can also use an existing key vault if it is configured for both purge protection and RBAC authorization:
$KVId=$(az keyvault show --resource-group $resource_group_name --name $KVName --query id --output tsv)
167
-
```
165
+
# retrieve the key vault ID for role assignment
166
+
$KVId=$(az keyvault show --resource-group $resource_group_name --name $KVName --query id --output tsv)
167
+
```
168
168
169
169
1. Assign the RBAC [Key Vault Secrets Officer](/azure/role-based-access-control/built-in-roles/security#key-vault-secrets-officer) role to yourself so that you can create a secret in the new key vault. New role assignments can take up to five minutes to propagate and be updated by the authorization server.
170
170
171
-
```azurecli
172
-
az role assignment create --assignee-object-id $MSIPrincipalId --role "Key Vault Secrets Officer" --scope $KVId --assignee-principal-type ServicePrincipal
173
-
```
171
+
```azurecli
172
+
az role assignment create --assignee-object-id $MSIPrincipalId --role "Key Vault Secrets Officer" --scope $KVId --assignee-principal-type ServicePrincipal
173
+
```
174
174
175
175
1. Create a secret in the key vault:
176
176
177
-
```azurecli
178
-
az keyvault secret set --vault-name $KVName --name $KVSecretName --value "Hello!"
179
-
```
177
+
```azurecli
178
+
az keyvault secret set --vault-name $KVName --name $KVSecretName --value "Hello!"
179
+
```
180
180
181
181
1. Assign the [Key Vault Secrets User](/azure/role-based-access-control/built-in-roles/security#key-vault-secrets-user) role to the user-assigned managed identity that you created previously. This step gives the managed identity permission to read secrets from the key vault:
182
182
183
-
```azurecli
184
-
az role assignment create --assignee-object-id $MSIPrincipalId --role "Key Vault Secrets User" --scope $KVId --assignee-principal-type ServicePrincipal
185
-
```
183
+
```azurecli
184
+
az role assignment create --assignee-object-id $MSIPrincipalId --role "Key Vault Secrets User" --scope $KVId --assignee-principal-type ServicePrincipal
185
+
```
186
186
187
187
1. Create an environment variable for the key vault URL:
0 commit comments