Managed Identities · AZ-204: Developing Solutions for Microsoft Azure Implement Azure Security

An Azure Function must read secrets from an Azure Key Vault without storing credentials in application settings. The Key Vault uses Azure role-based…

Practice question from Managed Identities (AZ-204: Developing Solutions for Microsoft Azure Implement Azure Security), with the correct answer and a step-by-step solution.

easy · MCQ · Q-BFEC30

An Azure Function must read secrets from an Azure Key Vault without storing credentials in application settings. The Key Vault uses Azure role-based access control. Which configuration is most appropriate?

  1. A.Enable a system-assigned managed identity for the Function App and assign it the Key Vault Secrets User role on the vault.Correct answer
  2. B.Store the Key Vault access key in an application setting and use it from the Function.
  3. C.Create a user-assigned managed identity but do not assign it any role on the Key Vault.
  4. D.Use the Function App's deployment publishing profile credentials to authenticate to the Key Vault.

Solution

A system-assigned managed identity provides the Function App with an Azure-managed service principal. Assigning the Key Vault Secrets User role grants it permission to read secrets without storing credentials in the application.

More from Managed Identities

All of Managed Identities

Practise more Implement Azure Security

Sign up free for adaptive practice on this chapter, with instant feedback and hints on every question.

Start practising free

Free to start · No credit card needed