A company uses Azure SQL Database with Transparent Data Encryption (TDE) protected by a customer-managed key (CMK) stored in Azure Key Vault. The Key Vault has a firewall enabled that denies all public network access. The SQL server is in the same region and has a system-assigned managed identity with the 'Key Vault Crypto Service Encryption User' role assigned at the key scope. However, TDE operations fail because the SQL server cannot access the Key Vault. What additional configuration is required to allow the SQL server to access the Key Vault for TDE operations?
Trap 1: Configure a private endpoint for the SQL server to the Key Vault.
While a private endpoint could provide connectivity, it is not necessary because Azure SQL Database is a trusted service that can be granted an exception to the Key Vault firewall. Using a private endpoint would also require additional networking setup and is not the simplest solution.
Trap 2: Change the Key Vault firewall to allow all Azure services.
Allowing all Azure services is a broader setting than necessary and could expose the Key Vault to other services. The trusted service exception is the recommended and more secure option.
Trap 3: Create a VNet service endpoint for Microsoft.KeyVault on the SQL…
Service endpoints enable a more secure connection from a VNet to Azure services, but they do not grant permission for a trusted managed service to bypass the Key Vault firewall. The trusted service exception is required.
- A
Configure a private endpoint for the SQL server to the Key Vault.
Why wrong: While a private endpoint could provide connectivity, it is not necessary because Azure SQL Database is a trusted service that can be granted an exception to the Key Vault firewall. Using a private endpoint would also require additional networking setup and is not the simplest solution.
- B
Enable the 'Allow trusted Microsoft services to bypass the firewall' setting on the Key Vault.
This setting allows trusted Azure services, including Azure SQL Database, to access the Key Vault even when the firewall is enabled. Since the SQL server's managed identity already has the cryptographic role, this is the missing piece to allow TDE operations.
- C
Change the Key Vault firewall to allow all Azure services.
Why wrong: Allowing all Azure services is a broader setting than necessary and could expose the Key Vault to other services. The trusted service exception is the recommended and more secure option.
- D
Create a VNet service endpoint for Microsoft.KeyVault on the SQL server's subnet.
Why wrong: Service endpoints enable a more secure connection from a VNet to Azure services, but they do not grant permission for a trusted managed service to bypass the Key Vault firewall. The trusted service exception is required.