You are developing a web application that will be hosted on an Azure App Service. The application must securely retrieve database connection strings from an Azure Key Vault. You decide to use a managed identity to authenticate to the Key Vault. The identity must be dedicated to this specific App Service instance, and its lifecycle must be tied directly to the App Service so that deleting the App Service automatically deletes the identity. Which identity type should you implement?
- A system-assigned managed identityCevap
- BA user-assigned managed identity
- CAn Azure AD App Registration service principal with a client secret
- DA system-assigned managed identity configured with an external access policy secret
Cevap
A system-assigned managed identity
A system-assigned managed identity is directly associated with a single Azure resource instance. Enabling it creates an identity in Azure Active Directory (Microsoft Entra ID) that is tied to that resource's lifecycle. When the App Service is deleted, the identity is automatically removed by Azure, fulfilling the scenario's lifecycle requirement without manual management.
Adım Adım Çözüm
Anahtar Kavram
Managed Identity Lifecycle Boundaries