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
Thefollowingexampleshowshowtouse [AzureBlobStorageandAzureKeyVault (`PersistKeysToAzureBlobStorage`/`ProtectKeysWithAzureKeyVault`)](xref:security/data-protection/configuration/overview#protect-keys-with-azure-key-vault-protectkeyswithazurekeyvault) forthesharedkeyring. Theserviceconfigurationsarebasecasescenariosfordemonstrationpurposes. Beforedeployingproductionapps, familiarizeyourselfwiththeAzureservicesandadoptbestpracticesusingtheAzureservices' dedicated documentation sets, which are cross-linked at the end of this section.
`{BLOBURI}`:FullURItothekeyfile. TheURIisgeneratedbyAzureStorage when you create the key file. Do not use a SAS.
189
189
190
-
`{BLOBURIWITHSAS}`:ThefullURIwherethekeyfileshouldbestoredwiththeSAStokenasaquerystringparameter. TheURIisgeneratedbyAzureStorage when you request a SAS for the uploaded key file.
190
+
`{BLOBURIWITHSAS}`:*ThisapproachonlyappliesifyouoptnottouseanAzureManagedIdentity.*ThefullURIwherethekeyfileshouldbestoredwiththeSAStokenasaquerystringparameter. TheURIisgeneratedbyAzureStorage when you request a SAS for the uploaded key file.
191
191
192
192
`{KEYIDENTIFIER}`:AzureKeyVaultkeyidentifierusedforkeyencryption. Anaccesspolicyallowstheapplicationtoaccessthekeyvaultwith `Get`, `UnwrapKey`, and `WrapKey` permissions. ThekeyidentifierisobtainedfromthekeyintheEntraorAzureportalafterit'screated. Ifyouenableautorotationofthekeyvaultkey, makesurethatyouuseaversionlesskeyidentifierintheapp's key vault configuration, where no key GUID is placed at the end of the identifier (example: `https://contoso.vault.azure.net/keys/data-protection`).
193
193
@@ -229,6 +229,7 @@ For more information, see the following resources:
Thefollowingexampleshowshowtouse [AzureBlobStorageandAzureKeyVault (`PersistKeysToAzureBlobStorage`/`ProtectKeysWithAzureKeyVault`)](xref:security/data-protection/configuration/overview#protect-keys-with-azure-key-vault-protectkeyswithazurekeyvault) for the shared key ring. The service configurations are base case scenarios for demonstration purposes. Before deploying production apps, familiarize yourself with the Azure services and adopt best practices using their dedicated documentation sets, which are listed at the end of this section.
766
+
Thefollowingexampleshowshowtouse [AzureBlobStorageandAzureKeyVault (`PersistKeysToAzureBlobStorage`/`ProtectKeysWithAzureKeyVault`)](xref:security/data-protection/configuration/overview#protect-keys-with-azure-key-vault-protectkeyswithazurekeyvault) for the shared key ring. The service configurations are base case scenarios for demonstration purposes. Before deploying production apps, familiarize yourself with the Azure services and adopt best practices using the Azure services' dedicated documentation sets, which are cross-linked at the end of this section.
767
767
768
768
Confirm the presence of the following packages in the server project of the Blazor Web App:
`{BLOB URI}`: Full URI to the key file. The URI is generated by Azure Storage when you create the key file. Do not use a SAS.
820
816
821
-
`{BLOB URI WITH SAS}`: The full URI where the key file should be stored with the SAS token as a query string parameter. The URI is generated by Azure Storage when you request a SAS for the uploaded key file.
817
+
`{BLOB URI WITH SAS}`: *This approach only applies if you opt not to use an Azure Managed Identity.*The full URI where the key file should be stored with the SAS token as a query string parameter. The URI is generated by Azure Storage when you request a SAS for the uploaded key file.
822
818
823
819
`{KEY IDENTIFIER}`: Azure Key Vault key identifier used for key encryption. An access policy allows the application to access the key vault with `Get`, `Unwrap Key`, and `Wrap Key` permissions. The version of the key is obtained from the key in the Entra or Azure portal after it's created. If you enable autorotation of the key vault key, make sure that you use a versionless key identifier in the app's key vault configuration, where no key GUID is placed at the end of the identifier (example: `https://contoso.vault.azure.net/keys/data-protection`).
824
820
825
821
> [!NOTE]
826
-
> The preceding example uses <xref:Azure.Identity.DefaultAzureCredential> locally (non-Production environment) to simplify authentication while developing apps that deploy to Azure by combining credentials used in Azure hosting environments with credentials used in local development. When moving to production, an alternative is a better choice, such as the <xref:Azure.Identity.ManagedIdentityCredential> shown in the preceding example. For more information, see [Authenticate Azure-hosted .NET apps to Azure resources using a system-assigned managed identity](/dotnet/azure/sdk/authentication/system-assigned-managed-identity).
822
+
> The preceding example uses <xref:Azure.Identity.DefaultAzureCredential> locally (non-Production environment) to simplify authentication while developing apps that deploy to Azure by combining credentials used in Azure hosting environments with credentials used in local development. For more information, see [Authenticate Azure-hosted .NET apps to Azure resources using a system-assigned managed identity](/dotnet/azure/sdk/authentication/system-assigned-managed-identity).
827
823
828
824
Alternatively, you can configure the app to supply the values from app settings files using the JSON Configuration Provider. Add the following to the app settings file:
829
825
@@ -845,10 +841,13 @@ Example `DataProtection` section:
> The key identifier in the preceding example is *versionless*. There's no GUID key version on the end of the identifier. This is particularly important if you opt to configure automatic key rotation for the key. For more information, see [Configure cryptographic key auto-rotation in Azure Key Vault: Key rotation policy](/azure/key-vault/keys/how-to-configure-key-rotation#key-rotation-policy).
*[Provide access to Key Vault keys, certificates, and secrets with Azure role-based access control](/azure/key-vault/general/rbac-guide?tabs=azure-cli)
Copy file name to clipboardExpand all lines: aspnetcore/release-notes/aspnetcore-9/includes/delete_keys.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,4 +2,4 @@
2
2
3
3
Prior to .NET 9, data protection keys were ___not___ deletable by design, to prevent data loss. Deleting a key renders its protected data irretrievable. Given their small size, the accumulation of these keys generally posed minimal impact. However, to accommodate extremely long-running services, we have introduced the option to delete keys. Generally, only old keys should be deleted. Only delete keys when you can accept the risk of data loss in exchange for storage savings. We recommend data protection keys should ___not___ be deleted.
0 commit comments