You are configuring a deployment pipeline in Azure DevOps. The deployment requires a database connection string and an API key. These secrets must not be stored in plaintext in the YAML pipeline file or the repository. What is the most secure and natively integrated way to handle these secrets?

Direct Answer (Verified)Reviewed by Sunny (Senior Cloud Engineer)

Correct Answer: Store the secrets in an Azure Key Vault and link it to a Variable Group in Azure Pipelines

Azure Key Vault provides secure storage for secrets. In Azure DevOps, you can create a Variable Group and link it to an Azure Key Vault. The pipeline can then retrieve the secrets ...

๐Ÿ“‹Part of Microsoft Certified: DevOps Engineer Expert (AZ-400) ยท Azure Certification Practice
Real Exam ScenarioSecurity and Compliance

You are configuring a deployment pipeline in Azure DevOps. The deployment requires a database connection string and an API key. These secrets must not be stored in plaintext in the YAML pipeline file or the repository. What is the most secure and natively integrated way to handle these secrets?

โœ“ Correct Answer & ExplanationSecurity and Compliance

Correct Answer

Store the secrets in an Azure Key Vault and link it to a Variable Group in Azure Pipelines

Why This Answer Is Correct

Azure Key Vault provides secure storage for secrets. In Azure DevOps, you can create a Variable Group and link it to an Azure Key Vault. The pipeline can then retrieve the secrets dynamically at runtime without ever exposing them in the repository or pipeline definition. The secrets are automatically masked in the pipeline logs.

๐Ÿ“š What This Question Tests

This question evaluates your knowledge of Security and Compliance โ€” a core concept tested in Microsoft Certified: DevOps Engineer Expert (AZ-400). Understanding Security and Compliance is essential for designing scalable, secure, and cost-effective cloud architectures. Mastery of this topic will help you answer scenario-based questions confidently on exam day.