HOTSPOT - You need to retrieve the database connection string. Which values should you use? To answer, select the appropriate options in the answer area. NOTE: Each correct selection is worth one point. Hot Area:
Suggested Answer:
Azure database connection string retrieve REST API vault.azure.net/secrets/
Box 1: cpandlkeyvault - We specify the key vault, cpandlkeyvault. Scenario: The database connection string is stored in Azure Key Vault with the following attributes: Azure Key Vault name: cpandlkeyvault
Box 2: PostgreSQLConn - We specify the secret, PostgreSQLConn Example, sample request: https://myvault.vault.azure.net//secrets/mysecretname/4387e9f3d6e14c459867679a90fd0f79?api-version=7.1
As per requirement:
- Azure Key Vault name: cpandlkeyvault
- Secret name: PostgreSQLConn
- Id: 80df3e46ffcd4f1cb187f79905e9a1e8
https://myvault.vault.azure.net//secrets/mysecretname/4387e9f3d6e14c459867679a90fd0f79?api-version=7.1
Box 1: cpandlkeyvault
We specify the key vault, cpandlkeyvault.
Box 2: PostgreSQLConn
We specify the secret, PostgreSQLConn.
Box 3: Environment
If a reference is not resolved properly, the reference value will be used instead. This means that for application settings, an environment variable would be created
I think the last one is Environment, as it is possible to create env variables that point to Vault. So the env variable in the function config doesn't contain the secret itself, but rather gets it from vault when read:
https://learn.microsoft.com/en-us/azure/app-service/app-service-key-vault-references?tabs=azure-cli
To prevent reading the cases multiple times:
Please see the spots below where you can find the questions (page/topic/question/subject)
City Power & Light company
50 13 1 API endpoint to Key Vault + variable
50 13 2 create and import certificate in azure web app
50 13 3 configure APIM for authentication with JWT
50 13 4 authenticate user by JWT
50 13 5 MI Authentication to Azure Logic app
51 13 6 Azure Service Bus to Event Grid integration Tier of bus + RBAC role
52 17 1 Application Insights/Monitor/Log Analytics
52 17 2 Azure Blob storage settings SAS or MI, file auditing
52 18 1 solve function timeout
55 24 1 cli for integration Azure Service Bus and Azure Event Grid
55 24 2 ingestion for Grid events
58 32 1 create appropriate storage account + geo settings + cool/hot
No way it can be query string. It doesn't have query params for the REST operation. And for environment "If a reference is not resolved properly, the reference value will be used instead. This means that for application settings, an environment variable would be created" This text no longer exists or was copied from stackoverflow.
This variable type comes from: https://learn.microsoft.com/en-us/power-automate/guidance/automation-kit/setup/environment-variables#get-the-url-path-for-your-azure-key-vault-secrets
"The Azure Key Vault secrets are using the environment variable type. These environment variables need to be in the following format." I think the question is wrong. But either way, select environment. Other options are more incorrect.
I got this question on my exam, 2023Dec, go with what I remember was the most voted answer. Score 902, most of the questions were here, slightly different on wording because the Azure Ad <-> Entra Id change. Case was City Power & Light. Good luck!
Important tip, you have access to microsoft learn during the exam!
Query string makes nonsense.
You'll have to specify a new version every time it updates in the query string. If you use it as environment variable the following will happen.
If a version is not specified in the reference, then the app will use the latest version that exists in the key vault. When newer versions become available, such as with a rotation event, the app will automatically update and begin using the latest version within 24 hours. The delay is because App Service caches the values of the key vault references and refetches it every 24 hours. Any configuration changes to the app that results in a site restart causes an immediate refetch of all referenced secrets.
https://learn.microsoft.com/en-us/azure/app-service/app-service-key-vault-references?tabs=azure-cli
The most debated is the third, I guess Microsoft probably mean how to give this secret reference to the app. It is using appsettings, that is a type of Environment variable. So, I will go for that and hope for the best
Because "The connection information is updated frequently. The application must always use the latest information to connect to the database." It has to be a keyvault reference (or not). These are trick questions to be asked in an interview to start an hour long discussion on various options.
"variable type to access azure key vault secret value" < this probably does not mean where the response comes. That comes in "value" property. The question creator probably means how to access keyvault key itself. How to pass that authorization. But considering this is functions I do not think query string is correct.
Correct Answer:
Box 1: cpandlkeyvault
Name of the key vault.
Box 2: PostgreSQLConn
Name of the secret.
Box 3: QueryString
Variable type to access the secret (100% correct - Not environment)
I have an issue with the "original question" meaning, they are assuming that we would send ID of the secret version to the HTTP GET. This means that we would ALWAYS retrieve the SAME version of the secret, and would not get the latest version. And they specifically said that the latest version should be used, so based on the information on page
https://docs.microsoft.com/en-us/rest/api/keyvault/getsecret/getsecret
we see that the ID is OPTIONAL, and if we do omit it the latest version will be retrieved.
My comment is just to point out the possibility that the proposed solution by Microsoft is invalid.
This section is not available anymore. Please use the main Exam Page.AZ-204 Exam Questions
Log in to ExamTopics
Sign in:
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
mlantonis
Highly Voted 4 years agocmmr
6 months agocool_tool
3 years, 9 months agodavidkerr7
1 year, 11 months agocoffecold
Highly Voted 2 years, 7 months agoOPT_001122
2 years, 5 months agoYogendra_examtopic
1 year, 8 months ago4b6d959
Most Recent 9 months, 3 weeks ago[Removed]
9 months, 2 weeks agooskx2
1 year, 2 months agoraymond_abcd
1 year, 3 months agoCarlosTheBoldest
1 year, 5 months agoAbidooKing
1 year, 10 months agonekkilodeon
2 years, 1 month agokociuba
2 years, 5 months agoadilkhan
2 years, 4 months agogmishra88
2 years, 7 months agogmishra88
2 years, 7 months agogmishra88
2 years, 8 months agoPize
2 years, 10 months agovavra
2 years, 11 months agoSivajiTheBoss
3 years, 2 months agolugospod
3 years, 4 months agolugospod
3 years, 5 months agolugospod
3 years, 5 months agolugospod
3 years, 5 months ago