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
- Convert non-standard placeholders to lowercase kebab-case
- Wrap prose placeholders in backticks to fix disallowed-html-tag warnings
- Update ms.date for modified files
Part of placeholder standardization series.
#customer intent: As an Azure Key Vault administrator, I want to migrate from access policies to Azure RBAC so that I can improve security and simplify access management.
@@ -53,7 +53,7 @@ After checking your configuration:
53
53
1. Use the [az keyvault show](/cli/azure/keyvault#az-keyvault-show) command to retrieve vault details:
54
54
55
55
```azurecli
56
-
az keyvault show --name <KeyVaultName> --resource-group <ResourceGroupName>
56
+
az keyvault show --name <vault-name> --resource-group <resource-group>
57
57
```
58
58
59
59
1. Check the **Enabled for RBAC Authorization** property (`enableRbacAuthorization`) for the key vault.
@@ -78,7 +78,7 @@ Use the [az keyvault list](/cli/azure/keyvault#az-keyvault-list) command to list
78
78
79
79
```azurecli
80
80
# List all key vaults in the resource group and check Azure RBAC status
81
-
az keyvault list --resource-group <ResourceGroupName> --query "[].{name:name, rbacEnabled:properties.enableRbacAuthorization}" --output table
81
+
az keyvault list --resource-group <resource-group> --query "[].{name:name, rbacEnabled:properties.enableRbacAuthorization}" --output table
82
82
```
83
83
84
84
# [PowerShell](#tab/azure-powershell)
@@ -113,7 +113,7 @@ az keyvault list --resource-group <ResourceGroupName> --query "[].{name:name, rb
113
113
1. Name the resource group you want to run your function for:
114
114
115
115
```azurepowershell
116
-
$resourceGroupName = "<ResourceGroupName>"
116
+
$resourceGroupName = "<resource-group>"
117
117
```
118
118
119
119
1. Call function `Get-KeyVaultsFromResourceGroup` to see which vaults in the resource group from step 2 have access policies vs Azure RBAC enabled.
The following uses the Azure PowerShell [Set-AzKeyVaultSecret](/powershell/module/az.keyvault/set-azkeyvaultsecret) cmdlet to add a secret named MyApiKey to the keyvault and sets the secret to expire after 180 days:
@@ -120,8 +120,8 @@ You can run the Azure CLI [az monitor scheduled-query create](/cli/azure/monitor
120
120
```azurecli
121
121
az monitor scheduled-query create \
122
122
--name "Suspicious Access Alert" \
123
-
--resource-group myResourceGroup \
124
-
--scopes {log-analytics-workspace-resource-id} \
123
+
--resource-group <resource-group> \
124
+
--scopes <log-analytics-workspace-resource-id> \
125
125
--condition "AzureDiagnostics | where ResourceType == 'VAULTS' | where OperationName == 'SecretGet' | where ResultSignature == 'Unauthorized'"
126
126
```
127
127
@@ -130,14 +130,14 @@ az monitor scheduled-query create \
130
130
You can run the Azure PowerShell [New-AzScheduledQueryRule](/powershell/module/az.monitor/new-azscheduledqueryrule) cmdlet to monitor logs in the specified Log Analytics workspace for unauthorized access attempts to Azure Key Vault secrets and trigger an alert if any matching unauthorized access attempt is detected:
You can create firewall rules on the Azure Key Vault instance using the Azure CLI [az keyvault network-rule add](/cli/azure/keyvault/network-rule#az-keyvault-network-rule-add) command, substituting the appropriate key vault names, resource groups, subnet, and subnet mask information:
170
170
171
171
```azurecli
172
172
az keyvault network-rule add \
173
-
--name {key-vault-name} \
174
-
--resource-group myResourceGroup \
175
-
--ip-address {trusted-ip-address}/32
173
+
--name <vault-name> \
174
+
--resource-group <resource-group> \
175
+
--ip-address <trusted-ip-address>/32
176
176
```
177
177
178
178
# [Azure PowerShell](#tab/azure-powershell)
179
179
You can create a private endpoint using the Azure PowerShell [New-AzPrivateEndpoint](/powershell/module/az.network/new-azprivateendpoint) cmdlet:
You can create firewall rules on the Azure Key Vault instance using the Azure PowerShell [Add-AzKeyVaultNetworkRule](/powershell/module/az.keyvault/add-azkeyvaultnetworkrule) cmdlet, substituting the appropriate key vault names, resource groups, subnet, and subnet mask information:
You need only include `-PermissionsToSecrets`, `-PermissionsToKeys`, and `-PermissionsToCertificates` when assigning permissions to those particular types. The allowable values for `<secret-permissions>`, `<key-permissions>`, and `<certificate-permissions>` are given in the [Set-AzKeyVaultAccessPolicy - Parameters](/powershell/module/az.keyvault/set-azkeyvaultaccesspolicy#parameters) documentation.
0 commit comments