Skip to content

Commit 88d9137

Browse files
authored
Merge pull request #2074 from msmbaldwin/akv-misc
Access control default change
2 parents 40088e7 + b7148e7 commit 88d9137

4 files changed

Lines changed: 279 additions & 5 deletions

File tree

articles/cloud-hsm/authentication.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Authentication is a crucial aspect of securely accessing and operating within Az
1515

1616
## Cloud HSM CLI authentication
1717

18-
You can authenticate by using CLI tools like `azcloudhsm_util` in either interactive mode or single-command mode. In interactive mode, use the `loginHSM` command. For single-command mode, include `singlecmd` and parameters for `loginHSM`. We advise you to securely store your HSM credentials when your application isn't using them.
18+
You can authenticate by using CLI tools like `azcloudhsm_util` in either interactive mode or single-command mode. In interactive mode, use the `login` command. For single-command mode, include `singlecmd` and parameters for `loginHSM`. We advise you to securely store your HSM credentials when your application isn't using them.
1919

2020
### Interactive mode
2121

Lines changed: 276 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,276 @@
1+
---
2+
title: Migrate Azure Key Vault from access policies to Azure RBAC
3+
description: Learn how to migrate Azure Key Vault access control from access policies to Azure role-based access control (Azure RBAC) to improve security and management.
4+
author: msmbaldwin
5+
ms.author: mbaldwin
6+
ms.service: azure-key-vault
7+
ms.subservice: general
8+
ms.topic: how-to
9+
ms.date: 11/17/2025
10+
ms.custom: devx-track-azurepowershell, devx-track-azurecli, sfi-image-nochange
11+
12+
#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.
13+
14+
---
15+
16+
# Prepare for Key Vault API version 2026-02-01: Azure RBAC as default access control
17+
18+
> [!WARNING]
19+
> Starting February 2026, Azure Key Vault API version 2026-02-01 establishes Azure RBAC as the default access control model. All API versions before 2026-02-01 retire on February 27, 2027.
20+
>
21+
> This change breaks compatibility. Before February 27, 2027, you **must either**:
22+
> - **Azure RBAC (recommended)**: [Set new and existing vaults to Azure RBAC](#step-4-migrate-to-azure-rbac-recommended) and adopt API version 2026-02-01.
23+
> - **Access policies (legacy)**: [Set new vaults to use access policies](#step-5-continue-using-access-policies) and adopt API version 2026-02-01.
24+
>
25+
> **Azure Cloud Shell users**: Cloud Shell always uses the latest API version, so you'll automatically start using API version 2026-02-01 as soon as it releases. Follow the steps in this article before the release of API version 2026-02-01 to avoid disruption.
26+
27+
Azure Key Vault is implementing an important security enhancement in API version 2026-02-01, releasing in February 2026. To help protect your key vaults and reduce security risks, **the new Key Vault API version establishes Azure RBAC as the default access control model**, consistent with the Azure portal experience.
28+
29+
The ramifications of this change are as follows:
30+
31+
- **New key vaults created with API version 2026-02-01**: All key vaults created with API version 2026-02-01 default to Azure RBAC (`enableRbacAuthorization` = `true`) unless you set `enableRbacAuthorization` to `false` during creation to use access policies.
32+
33+
- **Existing key vaults**: Existing key vaults continue using their current access control model. You can migrate vaults between access control models by changing the `enableRbacAuthorization` property.
34+
35+
> [!IMPORTANT]
36+
> To change the `enableRbacAuthorization` property for a key vault, you must have the `Microsoft.Authorization/roleAssignments/write` permission. This permission is included in roles such as Owner and User Access Administrator. For more information, see [Enable Azure RBAC permissions on Key Vault](rbac-guide.md#enable-azure-rbac-permissions-on-key-vault).
37+
38+
Migrate key vaults that currently use access policies to Azure RBAC for improved security. For more information on why Azure RBAC is recommended, see [Azure role-based access control (Azure RBAC) vs. access policies](rbac-access-policy.md).
39+
40+
Follow the steps in this article to check your current configuration and then use either Azure RBAC (recommended) or access policies (legacy).
41+
42+
## Step 1: Check current configurations
43+
44+
Check if your vault's access configuration is set to Azure RBAC or access policies. Check this configuration through the Azure CLI or PowerShell commands.
45+
46+
After checking your configuration:
47+
- If your vaults use **Azure RBAC** (`enableRbacAuthorization` = `true`), go to [Step 2: For vaults already using Azure RBAC](#step-2-for-vaults-already-using-azure-rbac).
48+
- If your vaults use **access policies** (`enableRbacAuthorization` = `false`), go to [Step 3: For vaults using access policies](#step-3-for-vaults-using-access-policies).
49+
50+
### Check a single vault
51+
52+
# [Azure CLI](#tab/azure-cli)
53+
54+
1. Use the [az keyvault show](/cli/azure/keyvault#az-keyvault-show) command to retrieve vault details:
55+
56+
```azurecli
57+
az keyvault show --name <KeyVaultName> --resource-group <ResourceGroupName>
58+
```
59+
60+
1. Check the **Enabled for RBAC Authorization** property (`enableRbacAuthorization`) for the key vault.
61+
62+
# [PowerShell](#tab/azure-powershell)
63+
64+
1. Use the [Get-AzKeyVault](/powershell/module/az.keyvault/get-azkeyvault) cmdlet to get vault details:
65+
66+
```azurepowershell
67+
Get-AzKeyVault -ResourceGroupName $resourceGroupName -VaultName $keyVaultName
68+
```
69+
70+
1. Check the **Enabled for RBAC Authorization** property (`enableRbacAuthorization`) for the key vault.
71+
72+
---
73+
74+
### Check multiple vaults by resource group
75+
76+
# [Azure CLI](#tab/azure-cli)
77+
78+
Use the [az keyvault list](/cli/azure/keyvault#az-keyvault-list) command to list all vaults in a resource group and check their RBAC authorization status:
79+
80+
```azurecli
81+
# List all key vaults in the resource group and check Azure RBAC status
82+
az keyvault list --resource-group <ResourceGroupName> --query "[].{name:name, rbacEnabled:properties.enableRbacAuthorization}" --output table
83+
```
84+
85+
# [PowerShell](#tab/azure-powershell)
86+
87+
1. Create the following function in PowerShell:
88+
89+
```azurepowershell
90+
function Get-KeyVaultsFromResourceGroup {
91+
# Get all key vaults in the specified resource group (basic information)
92+
$keyVaults = Get-AzKeyVault -ResourceGroupName $resourceGroupName
93+
94+
# Iterate through each key vault by name and fetch full properties
95+
foreach ($keyVault in $keyVaults) {
96+
$keyVaultName = $keyVault.VaultName
97+
98+
# Get the full key vault properties
99+
$keyVaultDetails = Get-AzKeyVault -ResourceGroupName $resourceGroupName -VaultName $keyVaultName
100+
101+
# Access the 'enabledForRbacAuthorization' property
102+
$enabledForRbac = $keyVaultDetails.EnableRbacAuthorization
103+
104+
# Output key vault status based on the 'enabledForRbacAuthorization' property
105+
if ($enabledForRbac -eq $true) {
106+
Write-Output "${keyVaultName}: RBAC is enabled"
107+
} else {
108+
Write-Output "${keyVaultName}: Access Policies are enabled"
109+
}
110+
}
111+
}
112+
```
113+
114+
1. Name the resource group you want to run your function for:
115+
116+
```azurepowershell
117+
$resourceGroupName = "<ResourceGroupName>"
118+
```
119+
120+
1. Call function `Get-KeyVaultsFromResourceGroup` to see which vaults in the resource group from step 2 have access policies vs Azure RBAC enabled.
121+
122+
---
123+
124+
### Check multiple vaults by subscription ID
125+
126+
# [Azure CLI](#tab/azure-cli)
127+
128+
Use the [az keyvault list](/cli/azure/keyvault#az-keyvault-list) command to list all vaults in your subscription and check their RBAC authorization status:
129+
130+
```azurecli
131+
# List all key vaults in the subscription and check Azure RBAC status
132+
az keyvault list --query "[].{name:name, rbacEnabled:properties.enableRbacAuthorization}" --output table
133+
```
134+
135+
# [PowerShell](#tab/azure-powershell)
136+
137+
1. Create the following function in PowerShell:
138+
139+
```azurepowershell
140+
function Get-KeyVaultsFromSubscription {
141+
# Get all key vaults in the subscription (basic information)
142+
$keyVaults = Get-AzKeyVault
143+
144+
# Iterate through each key vault by name and fetch full properties
145+
foreach ($keyVault in $keyVaults) {
146+
$keyVaultName = $keyVault.VaultName
147+
$resourceGroupName = $keyVault.ResourceGroupName
148+
149+
# Get the full key vault properties
150+
$keyVaultDetails = Get-AzKeyVault -ResourceGroupName $resourceGroupName -VaultName $keyVaultName
151+
152+
# Access the 'enabledForRbacAuthorization' property
153+
$enabledForRbac = $keyVaultDetails.EnableRbacAuthorization
154+
155+
# Output key vault status based on the 'enabledForRbacAuthorization' property
156+
if ($enabledForRbac -eq $true) {
157+
Write-Output "${keyVaultName}: RBAC is enabled"
158+
} else {
159+
Write-Output "${keyVaultName}: Access Policies are enabled"
160+
}
161+
}
162+
}
163+
```
164+
165+
1. Call function `Get-KeyVaultsFromSubscription` to see which vaults in the subscription have access policies versus Azure RBAC enabled. Depending on the number of vaults in your subscription, the function might take more than 10 minutes to run.
166+
167+
---
168+
169+
## Step 2: For vaults already using Azure RBAC
170+
171+
If your key vaults already use Azure RBAC as their access control model, update all Key Vault ARM, BICEP, Terraform templates, and [REST API](/rest/api/keyvault/) calls to use API version 2026-02-01.
172+
173+
## Step 3: For vaults using access policies
174+
175+
If your key vaults use access policies (`enableRbacAuthorization` = `false`), decide if you want to migrate to role-based access (recommended) or continue using access policies. For more information on access control models, see [Use Azure RBAC for managing access to Key Vault](rbac-guide.md) and [Azure Key Vault best practices](secure-key-vault.md).
176+
177+
**Choose your path:**
178+
- **Recommended**: Go to [Step 4: Migrate to Azure RBAC](#step-4-migrate-to-azure-rbac-recommended)
179+
- **Legacy**: Go to [Step 5: Continue using access policies](#step-5-continue-using-access-policies)
180+
181+
## Step 4: Migrate to Azure RBAC (recommended)
182+
183+
Use this opportunity to increase your security posture by migrating from vault access policy to Azure RBAC for managing access. For detailed migration guidance, see [Migrate from vault access policy to an Azure role-based access control permission model](rbac-migration.md).
184+
185+
Update all Key Vault ARM, BICEP, Terraform templates, and REST API calls to use API version 2026-02-01.
186+
187+
## Step 5: Continue using access policies
188+
189+
To continue using access policies, follow the instructions in this section.
190+
191+
Choose one of the following methods based on your scenario:
192+
- [Using ARM, BICEP, Terraform templates](#using-arm-bicep-terraform-templates)
193+
- [Using Create Key Vault commands](#using-create-key-vault-commands)
194+
- [Using Create Resource commands](#using-create-resource-commands)
195+
196+
#### Using ARM, BICEP, Terraform templates
197+
198+
When creating new key vaults by using API version 2026-02-01, set `enableRbacAuthorization` to `false` in all Key Vault ARM, BICEP, Terraform templates, and [REST API](/rest/api/keyvault/) calls to use access policies.
199+
200+
#### Using Create Key Vault commands
201+
202+
When creating new key vaults by using API version 2026-02-01, you must specify access policies configuration to avoid defaulting to Azure RBAC.
203+
204+
Make sure you have the latest version of the Azure CLI or PowerShell modules.
205+
206+
# [Azure CLI](#tab/azure-cli)
207+
208+
Update Azure CLI to the latest version. For more information, see [How to update the Azure CLI](/cli/azure/update-azure-cli).
209+
210+
# [PowerShell](#tab/azure-powershell)
211+
212+
Update your PowerShell modules to the latest version:
213+
- [Update-Module (PowerShellGet)](/powershell/module/powershellget/update-module)
214+
- [Update-AzModule (Az.Tools.Installer)](/powershell/module/az.tools.installer/update-azmodule)
215+
216+
---
217+
Use the appropriate command to create a key vault with access policies:
218+
219+
# [Azure CLI](#tab/azure-cli)
220+
221+
Use the [az keyvault create](/cli/azure/keyvault#az-keyvault-create) command and set `--enable-rbac-authorization false`:
222+
223+
```azurecli
224+
az keyvault create --name "testCreateTutorial" --resource-group "testResourceGroup" --enable-rbac-authorization false
225+
```
226+
227+
# [PowerShell](#tab/azure-powershell)
228+
229+
Use the [New-AzKeyVault](/powershell/module/az.keyvault/new-azkeyvault) cmdlet and set `-DisableRbacAuthorization`:
230+
231+
```azurepowershell
232+
New-AzKeyVault -Name "testCreateTutorial" -ResourceGroupName "testResourceGroup" -Location "EastUS" -DisableRbacAuthorization
233+
```
234+
235+
---
236+
237+
#### Using Create Resource commands
238+
239+
When you create new key vaults by using API version 2026-02-01, set `enableRbacAuthorization` to `false` to use access policies. If you don't specify this property, it defaults to `true` (Azure RBAC).
240+
241+
# [Azure CLI](#tab/azure-cli)
242+
243+
Use the [az resource create](/cli/azure/resource#az-resource-create) command and set `"enableRbacAuthorization": false` and `--api-version "2026-02-01"`:
244+
245+
```azurecli
246+
az resource create --resource-group $resourceGroup --name $vaultName --resource-type "Microsoft.KeyVault/vaults" --location $location --api-version "2026-02-01" --properties '{"sku": { "family": "A", "name": "standard" }, "tenantId": $tenantID,"enableRbacAuthorization": false, "accessPolicies": []}'
247+
```
248+
249+
# [PowerShell](#tab/azure-powershell)
250+
251+
Use the [New-AzResource](/powershell/module/az.resources/new-azresource) cmdlet and set `enableRbacAuthorization = $false` and `-ApiVersion "2026-02-01"`:
252+
253+
```azurepowershell
254+
New-AzResource `
255+
-ResourceGroupName $resourceGroupName `
256+
-ResourceType "Microsoft.KeyVault/vaults" `
257+
-ResourceName $keyVaultName `
258+
-Location $location `
259+
-ApiVersion "2026-02-01" `
260+
-Properties @{
261+
sku = @{ family = "A"; name = "standard" }
262+
tenantId = $TenantId
263+
enableRbacAuthorization = $false
264+
accessPolicies = @()}
265+
```
266+
267+
---
268+
269+
## Next steps
270+
271+
- [Azure role-based access control (Azure RBAC) vs. access policies](rbac-access-policy.md)
272+
- [Migrate from vault access policy to an Azure role-based access control permission model](rbac-migration.md)
273+
- [Use an Azure RBAC for managing access to Key Vault](rbac-guide.md)
274+
- [Secure your key vault](secure-key-vault.md)
275+
- [Azure Key Vault REST API reference](/rest/api/keyvault/)
276+

articles/key-vault/general/toc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,8 @@ items:
7979
items:
8080
- name: Authorize access
8181
items:
82+
- name: Prepare for Azure RBAC as default
83+
href: access-control-default.md
8284
- name: RBAC vs. access policy (legacy)
8385
href: rbac-access-policy.md
8486
- name: Azure RBAC permission model

articles/key-vault/keys/how-to-configure-key-rotation.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ ms.author: mbaldwin
1515
# Configure cryptographic key auto-rotation in Azure Key Vault
1616

1717
## Overview
18-
1918
Automated cryptographic key rotation in [Key Vault](../general/overview.md) allows users to configure Key Vault to automatically generate a new key version at a specified frequency. To configure rotation you can use key rotation policy, which can be defined on each individual key.
2019

2120
Our recommendation is to rotate encryption keys at least every two years to meet cryptographic best practices.
@@ -25,9 +24,6 @@ For more information about how objects in Key Vault are versioned, see [Key Vaul
2524
## Integration with Azure services
2625
This feature enables end-to-end zero-touch rotation for encryption at rest for Azure services with customer-managed key (CMK) stored in Azure Key Vault. Please refer to specific Azure service documentation to see if the service covers end-to-end rotation.
2726

28-
> [!NOTE]
29-
> When rotating customer-managed keys used by Azure services, the time required for each service to detect and apply the new key version varies (from one hour to 24 hours or more). Consult the specific Azure service documentation for guidance on when you can safely disable the old key version after rotation.
30-
3127
For more information about data encryption in Azure, see:
3228
- [Azure Encryption at Rest](/azure/security/fundamentals/encryption-atrest#azure-encryption-at-rest-components)
3329
- [Azure services data encryption support table](/azure/security/fundamentals/encryption-models#supporting-services)

0 commit comments

Comments
 (0)