Azure Key Vault · AZ-204: Developing Solutions for Microsoft Azure Implement Azure Security

An application stores a database connection string in an Azure Key Vault secret named DbConnection. The operations team rotates the value by setting…

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

medium · MCQ · Q-E9725F

An application stores a database connection string in an Azure Key Vault secret named DbConnection. The operations team rotates the value by setting a new version of the same secret name. The application must begin using the new value without being redeployed. Which approach should the developer use?

  1. A.Call GetSecretAsync("DbConnection") without specifying a version, and refresh the cached value according to the application's rotation strategy.Correct answer
  2. B.Use the original secret version ID permanently so that the application has a stable value.
  3. C.Delete the secret before every read so that Key Vault creates the newest version automatically.
  4. D.Read the secret only through an Azure Storage access key because Key Vault versions cannot be accessed by applications.

Solution

A Key Vault secret can have multiple versions under the same name. Retrieving the secret without a version requests the current version, while specifying a version deliberately retrieves that particular version. The application should also refresh any local cache after rotation.

More from Azure Key Vault

All of Azure Key Vault

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