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?
- A.Call GetSecretAsync("DbConnection") without specifying a version, and refresh the cached value according to the application's rotation strategy.Correct answer
- B.Use the original secret version ID permanently so that the application has a stable value.
- C.Delete the secret before every read so that Key Vault creates the newest version automatically.
- 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
- An ASP.NET Core application runs in Azure App Service and must read a database password from Azure Key Vault without storing credentials in…
- A company requires that deleted secrets in a production Key Vault remain recoverable for 90 days and cannot be permanently purged early, ev…
- An Azure App Service uses a system-assigned managed identity to read secret values from an Azure Key Vault. The identity must not create, u…
- A .NET application must digitally sign data with an RSA key stored in Azure Key Vault. The private key must remain non-exportable and must…
Practise more Implement Azure Security
Sign up free for adaptive practice on this chapter, with instant feedback and hints on every question.
Start practising freeFree to start · No credit card needed