Question 646 of 997
Develop Azure compute solutionsmediumMultiple ChoiceObjective-mapped

Quick Answer

The correct answer is that embedding the storage account key directly in the ARM template exposes a long-lived secret in plaintext, creating a critical security concern. This is because the AzureWebJobsStorage connection string, when hardcoded with the account key, can be compromised if the template is stored in source control, shared, or logged, granting an attacker full access to the storage account and violating the principle of least privilege. On the AZ-204 exam, this scenario tests your understanding of secure infrastructure as code practices, often appearing as a trap where candidates overlook the risk of plaintext secrets versus using managed identities or Key Vault references. A common memory tip is to think of ARM templates as code that should never contain keys—always use the `listKeys` function dynamically or reference Azure Key Vault. Remember: if you see a key in the template, it’s a security leak.

AZ-204 Develop Azure compute solutions Practice Question

This AZ-204 practice question tests your understanding of develop azure compute solutions. Match the stated requirement to the specific cloud service, access model, or configuration option — many options are valid in isolation but not for this scenario. After answering, compare your reasoning against the explanation and wrong-answer breakdown below. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.

Exhibit

Refer to the exhibit.

{
  "type": "Microsoft.Web/sites/config",
  "apiVersion": "2023-01-01",
  "name": "[concat(parameters('siteName'), '/appsettings')]",
  "properties": {
    "WEBSITE_RUN_FROM_PACKAGE": "1",
    "FUNCTIONS_WORKER_RUNTIME": "dotnet-isolated",
    "AzureWebJobsStorage": "[concat('DefaultEndpointsProtocol=https;AccountName=', parameters('storageAccountName'), ';AccountKey=', listKeys(resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccountName')), '2023-01-01').keys[0].value, ';EndpointSuffix=core.windows.net')]"
  }
}

You are deploying an Azure Functions app using ARM template. The exhibit shows a portion of the template. You notice that the AzureWebJobsStorage connection string includes the account key directly. What is the MOST important security concern?

Question 1mediummultiple choice
Full question →

Exhibit

Refer to the exhibit.

{
  "type": "Microsoft.Web/sites/config",
  "apiVersion": "2023-01-01",
  "name": "[concat(parameters('siteName'), '/appsettings')]",
  "properties": {
    "WEBSITE_RUN_FROM_PACKAGE": "1",
    "FUNCTIONS_WORKER_RUNTIME": "dotnet-isolated",
    "AzureWebJobsStorage": "[concat('DefaultEndpointsProtocol=https;AccountName=', parameters('storageAccountName'), ';AccountKey=', listKeys(resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccountName')), '2023-01-01').keys[0].value, ';EndpointSuffix=core.windows.net')]"
  }
}

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

The storage account key is exposed in the template, which could be compromised.

Option C is correct because embedding the storage account key directly in an ARM template exposes a long-lived secret in plaintext. If the template is stored in source control, shared, or logged, the key can be compromised, granting an attacker full access to the storage account. This violates the principle of least privilege and security best practices for infrastructure as code.

Key principle: Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • The FUNCTIONS_WORKER_RUNTIME is set to dotnet-isolated, which is outdated.

    Why it's wrong here

    dotnet-isolated is valid; this is not a security concern.

  • The storage account name is hardcoded in the connection string.

    Why it's wrong here

    The account name is parameterized, not hardcoded.

  • The storage account key is exposed in the template, which could be compromised.

    Why this is correct

    Hardcoding keys in templates is insecure; use managed identities or Key Vault.

    Related concept

    Read the scenario before looking for a memorised answer.

  • The connection string does not use HTTPS.

    Why it's wrong here

    HTTPS is used by default; the issue is the hardcoded key.

Common exam traps

Common exam trap: answer the scenario, not the keyword

The trap here is that candidates often focus on superficial issues like hardcoded names or protocol strings, missing the fundamental security risk of embedding a secret (the account key) in plaintext within an ARM template.

Detailed technical explanation

How to think about this question

Under the hood, the AzureWebJobsStorage connection string is used by the Functions runtime to bind to the Azure Storage account for core operations like checkpointing, lease management, and queue triggers. Exposing the account key in an ARM template means anyone with read access to the template—or to deployment logs—can extract the key and authenticate to the storage account via Shared Key authorization (Authorization header with HMAC-SHA256). A more secure approach is to use managed identities with role-based access control (e.g., Storage Blob Data Contributor) and reference the connection string via the 'listKeys' function or Azure Key Vault references in the template.

KKey Concepts to Remember

  • Read the scenario before looking for a memorised answer.
  • Find the constraint that changes the correct option.
  • Eliminate answers that are true in general but not in this case.

TExam Day Tips

  • Watch for words such as best, first, most likely and least administrative effort.
  • Review why wrong options are wrong, not only why the correct option is correct.

Key takeaway

Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Real-world example

How this comes up in practice

A media company stores terabytes of video archives that are accessed once a year for audit purposes. Moving these objects to a cold storage tier (Azure Archive, S3 Glacier, or Google Nearline) costs a fraction of hot storage. Questions like this test whether you understand storage tiers, access frequency tradeoffs, and retrieval latency requirements.

What to study next

Got this wrong? Here's your next step.

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

Related practice questions

Related AZ-204 practice-question pages

Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.

Practice this exam

Start a free AZ-204 practice session

Short sessions build daily habit. Longer sessions build exam-day stamina. Try a timed session to simulate real conditions.

FAQ

Questions learners often ask

What does this AZ-204 question test?

Develop Azure compute solutions — This question tests Develop Azure compute solutions — Read the scenario before looking for a memorised answer..

What is the correct answer to this question?

The correct answer is: The storage account key is exposed in the template, which could be compromised. — Option C is correct because embedding the storage account key directly in an ARM template exposes a long-lived secret in plaintext. If the template is stored in source control, shared, or logged, the key can be compromised, granting an attacker full access to the storage account. This violates the principle of least privilege and security best practices for infrastructure as code.

What should I do if I get this AZ-204 question wrong?

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

What is the key concept behind this question?

Read the scenario before looking for a memorised answer.

About these practice questions

Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Last reviewed: Jun 24, 2026

Question Discussion

Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.

Loading comments…

Sign in to join the discussion.

This AZ-204 practice question is part of Courseiva's free Microsoft certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the AZ-204 exam.