Explain it simpler
Many apps read settings such as a database password from environment variables, which are like labeled notes the hosting platform hands to the app when it starts. Writing the real password on that note is risky. A Key Vault reference lets you write a pointer on the note instead, such as "get the password from vault shop-kv, secret db-password". When the app starts, the Azure platform follows the pointer, fetches the real value from Key Vault and hands it to the app. The app's code does not change at all. For this to work, the app needs an identity that Key Vault trusts and permission to read that secret. If something is wrong, the app receives the pointer text itself, which is a clear sign the lookup failed.
Monday at Meridian Pet Supply, and the new checkout site will not connect to its database. Kenji, who deployed it, pastes the error into the team chat: login failed for user, password incorrect. You open the app's environment variables to check, and instead of a password you see a long string of text that begins with @Microsoft.KeyVault. The app is literally trying to log in with that string as its password. Kenji swears the secret exists in the vault and the app has an identity. Something between the app setting and the vault is not connecting, and the release window closes in an hour. Where do you look first?
Many applications read their configuration from environment variables, and rewriting them to call the Key Vault software development kit (SDK) may not be practical, especially for third-party or legacy code. Key Vault references solve this. They let the hosting platform fetch a secret from Key Vault and present it to your app as an ordinary app setting or secret. The value never appears in the app's configuration, in source control or in deployment templates; only a pointer to the secret does.
Keep reading for free
Create a free StudyToCert account to read the rest of this lesson: 9 more sections, 5 key terms, a real-world example, an exam tip and self-check questions. Every lesson, lab and practice test is free with an account.