mediumMultiple ChoiceObjective-mapped
AZ-400 A company uses Azure DevOps for CI/CD Practice Question
A company uses Azure DevOps for CI/CD. They have multiple pipelines that deploy to different environments. They want to ensure that secrets like API keys are not exposed in pipeline logs. What is the best approach?
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
✓
Create a Variable Group linked to Azure Key Vault
Variable Groups linked to Azure Key Vault allow you to securely store secrets in Key Vault and reference them in pipelines without exposing the actual values in logs or output. Option A is incorrect: Azure App Configuration with Key Vault references is designed for application configuration, not for managing pipeline secrets directly. Option C is incorrect: Azure Kubernetes Service (AKS) secrets are specific to Kubernetes workloads and not intended for general pipeline secret management. Option D is incorrect: Pipeline variables marked as 'secret' are masked in logs, but they are still stored in Azure DevOps and lack the centralized security and auditing capabilities of Key Vault.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Use Azure App Configuration with Key Vault references
Why it's wrong here
Azure App Configuration with Key Vault references is designed for application runtime configuration, not for Azure Pipelines variable resolution. While it can reference Key Vault secrets, the pipeline itself cannot natively consume those references as pipeline variables without custom tasks or API calls, adding overhead and an external dependency that does not integrate with the pipeline's variable model. In contrast, a Variable Group linked to Key Vault is a first-class Azure Pipelines construct that makes secrets available directly to tasks at runtime.
- ✓
Create a Variable Group linked to Azure Key Vault
Why this is correct
Creating a Variable Group linked to Azure Key Vault is the recommended approach because the Variable Group stores only references to secret names in Key Vault, not the secret values themselves. At pipeline runtime, Azure Pipelines fetches the actual secret values from Key Vault using a service connection, ensuring secrets never reside in pipeline definitions, logs, or the Azure DevOps database. This also provides centralized access control via Key Vault permissions, supports secret rotation, and integrates natively with pipeline consumers.
- ✗
Use Azure Kubernetes Service secrets
Why it's wrong here
Azure Kubernetes Service (AKS) secrets are designed to store sensitive configuration for workloads running inside a Kubernetes cluster, not for Azure DevOps pipeline execution. Pipeline tasks that need to authenticate to external services or deploy to AKS must retrieve secrets from Azure DevOps constructs like Variable Groups or service connections, so using AKS secrets would not make the secrets available to the pipeline at runtime and would create an unnecessary dependency on cluster access.
- ✗
Use pipeline variables marked as 'secret'
Why it's wrong here
Pipeline variables marked as 'secret' are masked in logs, but the underlying values are still stored in plaintext within the pipeline definition, whether in YAML or the classic UI. Anyone with edit permissions to the pipeline can read the actual secret value from the pipeline settings, and it remains at rest in Azure DevOps storage. This violates the principle of least privilege and increases exposure risk, whereas Key Vault-linked Variable Groups keep the secret value entirely out of the pipeline system.
Go deeper
Related to this question
Learn chapter
Introduction to DevOps and Azure DevOps
Key term
Azure Key Vault
Azure Key Vault is a cloud service for securely storing and managing sensitive information like passwords, encryption keys, and certificates.
Key term
Anthos
Anthos is a Google Cloud platform that lets you run applications consistently across different computing environments, like on-premises data centers and multiple public clouds.
About these practice questions
Courseiva writes every AZ-400 question from scratch — 823 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This AZ-400 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-400 exam.