Soru

Zorluk: KolayRun Containerized Solutions using Azure Container Instances

You are developing a secure containerized application that will run in Azure Container Instances (ACI). The container needs to read a database connection string from an Azure Key Vault at startup. To follow security best practices, the container group must authenticate to the Key Vault without storing any credentials in the deployment template or container image. Additionally, the identity's lifecycle must be tied directly to the lifecycle of the container group, meaning the identity is automatically deleted when the container group is deleted. Which identity configuration should you apply to the container group?

  1. A system-assigned managed identity enabled on the container groupCevap
  2. B
    A user-assigned managed identity assigned to the container group
  3. C
    A Key Vault access policy that grants GET permissions to the container group's public IP address
  4. D
    A system-assigned managed identity enabled on the parent resource group

Cevap

A system-assigned managed identity enabled on the container group
The correct option is the system-assigned managed identity. A system-assigned managed identity is created directly on the Azure Container Instances (ACI) container group. It is tied to the lifecycle of that specific container group, meaning it is automatically created when the container group is provisioned and automatically deleted when the container group is deleted.

Adım Adım Çözüm

1
Analyze the authentication requirement.
The requirement mandates that the container group authenticates to Azure Key Vault securely without hardcoded credentials.
Managed identities for Azure resources allow authentication to Azure services without embedding secrets in the code or configuration.
2
Evaluate the lifecycle constraint.
The identity's lifecycle must match the container group's lifecycle.
A system-assigned managed identity is tied directly to the resource instance. When the container group is deleted, Azure automatically cleans up the identity.
3
Select the correct identity type.
Select a system-assigned managed identity enabled on the container group.
This configuration satisfies both the credential-free authentication and the lifecycle coupling requirements.

Anahtar Kavram

Azure Container Instances supports managed identities for authenticating to other Microsoft Entra-protected resources such as Azure Key Vault. A system-assigned managed identity is tied to the lifecycle of the resource.
Bu soruyu puanla