DRAG DROP (Drag and Drop is not supported)You are configuring an Azure DevOps deployment pipeline. The deployed application will authenticate to a web service by using a secret stored in an Azure key vault.You need to use the secret in the deployment pipeline.Which three actions should you perform in sequence? To answer, move the appropriate actions from the list of actions to the answer area and arrange them in the correct order.Select and Place:
Answer(s): A
Step 1: Create a service principal in Microsoft Entra ID.You will need a service principal to deploy an app to an Azure resource from Azure Pipelines.Step 2: Configure an access policy in the key vault.You need to secure access to your key vaults by allowing only authorized applications and users. To access the data from the vault, you will need to provide read (Get) permissions to the service principal that you will be using for authentication in the pipeline.Select Access policy and then select + Add Access Policy to setup a new policy.Step 3: Add an Azure Resource Manager service connection to the pipelineYou need to authorize the pipeline to deploy to Azure:1. Select Pipelines | Pipelines,2. Go to Releases under Pipelines and then select and Edit your pipeline.3. Under Tasks, notice the release definition for Dev stage has a Azure Key Vault task. This task downloads Secrets from an Azure Key Vault. You will need to point to the subscription and the Azure Key Vault resource.4. Click Manage, this will redirect to the Service connections page.5.Click on New Service connection -> Azure Resource Manager -> Service Principal (manual). Fill the information from previously created service principal.
https://azuredevopslabs.com/labs/vstsextend/azurekeyvault/
Note: This question is part of a series of questions that present the same scenario. Each question in the series contains a unique solution that might meet the stated goals. Some question sets might have more than one correct solution, while others might not have a correct solution.After you answer a question in this section, you will NOT be able to return to it. As a result, these questions will not appear in the review screen.You plan to update the Azure DevOps strategy of your company.You need to identify the following issues as they occur during the company's development process:-Licensing violations-Prohibited librariesSolution: You implement automated security testing.Does this meet the goal?
Correct:* You implement automated security testing.Incorrect:* You implement continuous deployment.* You implement continuous integration* You implement pre-deployment gates.Note:You can use Mend Bolt with Azure DevOps to automatically detect alerts on vulnerable open source components, outdated libraries, and license compliance issues in your code.Azure DevOps integration with Mend Bolt will enable you to:Detect and remedy vulnerable open source components.* Generate comprehensive open source inventory reports per project or build.*-> Enforce open source license compliance, including dependencies’ licenses.* Identify outdated open source libraries with recommendations to update.Note 2: WhiteSource is the leader in continuous open source software security and compliance management. WhiteSource integrates into your build process, irrespective of your programming languages, build tools, or development environments. It works *automatically*, continuously, and silently in the background, checking the security, licensing, and quality of your open source components against WhiteSource constantly-updated definitive database of open source repositories.
https://azuredevopslabs.com/labs/vstsextend/whitesource/
You have an Azure DevOps organization named Contoso.You need to recommend an authentication mechanism that meets the following requirements:-Supports authentication from Git-Minimizes the need to provide credentials during authenticationWhat should you recommend?
Personal access tokens (PATs) give you access to Azure DevOps and Team Foundation Server (TFS), without using your username and password directly. These tokens have an expiration date from when they're created. You can restrict the scope of the data they can access. Use PATs to authenticate if you don't already have SSH keys set up on your system or if you need to restrict the permissions that are granted by the credential.Incorrect Answers:B: Azure DevOps no longer supports Alternate Credentials authentication since the beginning of March 2,2020. If you're still using Alternate Credentials, we [Microsoft] strongly encourage you to switch to a more secure authentication method (for example, personal access tokens).
https://docs.microsoft.com/en-us/azure/devops/repos/git/auth-overview
You have a GitHub repository that uses GitHub Actions and stores access keys by using GitHub encrypted secrets.You plan to update the secrets by using the GitHub REST API.You need to wrap the secrets before adding them to a REST-based call.Which encryption library should you use?
Answer(s): C
Encrypting secrets for the REST APIEncrypting a secret using Node.jsIf you are using Node.js, you can encrypt your secret using the libsodium-wrappers library.Note: The sodium crypto library compiled to WebAssembly and pure JavaScript using Emscripten, with automatically generated wrappers to make it easy to use in web applications.The complete library weighs 188 KB (minified, gzipped, includes pure JS + WebAssembly versions) and can run in a web browser as well as server-side.
https://docs.github.com/en/rest/guides/encrypting-secrets-for-the-rest-api?apiVersion=2022-11-28https://www.npmjs.com/package/libsodium-wrappers
DRAG DROP (Drag and Drop is not supported)You are implementing a package management solution for a Node.js application by using Azure Artifacts.You need to configure the development environment to connect to the package repository. The solution must minimize the likelihood that credentials will be leaked.Which file should you use to configure each connection? To answer, drag the appropriate files to the correct connections. Each file may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content.Note: Each correct selection is worth one point.Select and Place:
Box 1: The .npmrc file in the projectFeed registry information:All Azure Artifacts feeds require authentication, so you'll need to store credentials for the feed before you can install or publish packages. npm uses .npmrc configuration files to store feed URLs and credentials. Azure DevOps Services recommends using two .npmrc files.One .npmrc should live at the root of your git repo adjacent to your project's package.json. It should contain a "registry" line for your feed and it should not contain credentials since it will be checked into git.Box 2: The .npmrc file in the user's home folderCredentials:On your development machine, you will also have a .npmrc in $home for Linux or Mac systems or $env.HOME for win systems. This .npmrc should contain credentials for all of the registries that you need to connect to. The NPM client will look at your project's .npmrc, discover the registry, and fetch matching credentials from $home/.npmrc or $env.HOME/.npmrc.
https://docs.microsoft.com/en-us/azure/devops/artifacts/npm/npmrc
Post your Comments and Discuss Microsoft AZ-400 exam prep with other Community members:
Our website is free, but we have to fight against AI bots and content theft. We're sorry for the inconvenience caused by these security measures. You can access the rest of the AZ-400 content, but please register or login to continue.