Skip to main content
Table of Contents
Print

Configure a customer-managed key for eDig365 Reporter Storage

Use this procedure to change the existing eDig365 Reporter Storage account from Microsoft-managed encryption to a customer-managed key. Perform this post-install hardening operation in place. Do not delete or recreate a working Storage account.

The account uses the same customer-managed key for Blob, Queue, and Table Storage. Azure Storage automatically adopts a new version of the selected key. Do not pin a key version.

Understand the impact

Azure Storage must be able to reach the key whenever it accesses encrypted data. If the key is disabled, deleted, expired, or unreachable, the application can’t access its Storage data. Plan key rotation and key-store network changes before making them.

Use an RSA or RSA-HSM key in Azure Key Vault or Azure Key Vault Managed HSM. Enable soft delete and purge protection on the key store before using the key. For details, see Customer-managed keys for Azure Storage encryption.

You can use the application Key Vault when customer policy allows it and the required access is in place. Use a customer-owned Key Vault or Managed HSM when your policy requires separate ownership or key administration.

Prepare access

You need permission to update the Storage account encryption configuration and to manage its managed identity. You also need permission to assign Azure roles at the key-store scope.

  1. In the Azure portal, open the eDig365 Reporter App Service, and then select Identity > User assigned.
  2. Identify the application’s Azure identity. This identity also has the Storage Blob Data Contributor, Storage Queue Data Contributor, and Storage Table Data Contributor roles on the eDig365 Reporter Storage account. Don’t select the separate Microsoft Graph identity.
  3. Open the eDig365 Reporter Storage account, and then select Identity > User assigned.
  4. Select Add, and attach the application’s existing Azure identity to the Storage account. Don’t create or substitute a different identity.
  5. Open the Key Vault or Managed HSM that contains the encryption key.
  6. On Access control (IAM), assign the Key Vault Crypto Service Encryption User role to that identity. Scope the assignment to the key store or the individual key, according to your policy.

The identity needs this role before Azure Storage can use the key. For Key Vault access and network requirements, see Configure customer-managed keys for an existing Storage account.

If the key store uses private networking or a firewall, allow the Azure Storage service and its managed identity to reach it by using the network model supported by your key-store design. Validate that path before changing Storage encryption.

Configure the key

  1. In the Azure portal, open the eDig365 Reporter Storage account.
  2. Select Encryption.
  3. Under Customer-managed keys, select the option to use a customer-managed key.
  4. Select the existing user-assigned managed identity.
  5. Select the Key Vault or Managed HSM, then select the RSA or RSA-HSM key.
  6. Select the option for Azure Storage to automatically update to the latest key version.
  7. Save the configuration and wait for the update to complete.

Keep the Queue and Table encryption key type set to Account. Blob Storage also uses the account encryption key. Do not select a versioned key URI or manually configure a key version.

For the Azure portal procedure, see Configure customer-managed keys for an existing Storage account.

Validate the change

  1. On the Storage account Overview page, confirm that the resource ID is unchanged.
  2. On Encryption, confirm that the key source is customer-managed and that automatic key-version updates are enabled.
  3. Validate application access by starting a normal eDig365 Reporter workflow that reads and writes its data.
  4. In the Storage account, verify that Blob, Queue, and Table operations continue to succeed. Check application logs and Storage metrics for authorization, encryption, or key-access failures.
  5. Restart the App Service during an approved maintenance window, then confirm https://<app-name>.azurewebsites.net/api/info/health returns successfully.

Keep the key enabled and retain prior key versions until the Storage account has adopted the replacement version and validation is complete. Azure Storage checks for a new key version daily, so wait at least 24 hours after rotation before disabling the previous version. For key rotation guidance, see Configure customer-managed keys for an existing Storage account.

Related documentation