Initialize Data Privacy Encryption in Microsoft Fabric¶
Learn how to securely enable encryption and decryption for data privacy in Microsoft Fabric.
Prerequisites¶
Before you start, ensure you have access to an Azure Key Vault. You do not need to generate or provide an encryption key yourself: keys are created and managed automatically (see below).
Key Vaults and Access¶
- During customer enrollment, an Azure Key Vault is created per environment in the customer's Azure environment.
- In the same enrollment, the customer provides an Entra group. This group is granted read and write access on all of these Key Vaults, through the Key Vault Crypto Officer and Key Vault Secrets Officer roles.
Key Vault Access¶
The identity used to run the encryption needs permission to create keys and to read and write secrets in the Key Vault. These permissions come from the Key Vault Crypto Officer and Key Vault Secrets Officer roles that the Entra group has (see Key Vaults and Access), so make sure the workspace identity is a member of that group. If the KEK cannot be created, the process stops with an error that indicates missing access to the Key Vault.
Store the Keys in Azure Key Vault¶
The default Key Vault provided by the NCC can be used, or a new Key Vault can be created to store the KEK and the wrapped DEKs.
Important
Never share keys or commit them to source control. Do not delete the KEK or the wrapped-dek-<entity> secrets: without them, data encrypted for that entity can no longer be decrypted.
Set the Environment as Default¶
To set this environment as the default:
- Go to Workspace settings
- Select Data Engineering/Science
- Navigate to Spark settings > Environment
- Select Set default environment
- Choose your newly created environment
- Click Save
Add the data_privacy_key_vault Variable¶
The variable key_vault or data_privacy_key_vault must be defined in the Tenant variable tab and set to the name of the key vault that contains the KEK and the wrapped DEKs.
It can also be passed using the value EncryptionKeyVault in the Entity values section in LandingZone when creating a privacyEntity in the EntityWizard.
First EncryptionKeyVault is checked, if not found data_privacy_key_vault is used, finally key_vault is used when passed.
Your Fabric environment is now configured for secure data operations, with encryption and decryption features enabled for data privacy workflows.