How should App Service or Functions read secrets?
IntermediateConceptCompute and App Platforms
Answer
Use Key Vault references in app settings, resolved by the platform with the app's managed identity:
[email protected](SecretUri=https://kv-shop.vault.azure.net/secrets/db-password/)
Grant the identity Key Vault Secrets User. Omit the version to pick up rotations (refreshed within 24 hours, or on restart). Even better, use Entra auth to the database directly (Azure SQL, PostgreSQL Flexible Server support it) so there is no password at all.
More on Compute and App Platforms
What are the main VM families and how do you pick one?BeginnerAvailability sets vs availability zones vs VMSS flexible orchestration.IntermediateWhat is a Virtual Machine Scale Set and how does autoscale work?BeginnerWhat are VMSS upgrade policies?IntermediateWhat are Spot VMs and where do they fit?IntermediateWhat is the temporary disk on a VM and why does it matter?Beginner