You have an Azure subscription that contains 20 virtual machines.You plan to deploy an Azure infrastructure by using Bicep files. The files will be deployed by using self-hosted GitHub runners on the virtual machines.You need to ensure that the GitHub runners can authenticate to Azure. The solution must minimize administrative effort.What should you use?
Answer(s): D
To authenticate a self-hosted GitHub Actions runner with Azure, you'll typically use either a managed identity or a service principal with OpenID Connect (OIDC). Managed identities are generally preferred for simplicity and security, especially with Azure Virtual Machines. Alternatively, you can use a service principal and configure it with a federated identity credential, which can be helpful in more complex scenarios.System-assigned managed identities are tied to a specific Azure resource and are deleted when the resource is deleted, while user-assigned managed identities are separate Azure resources that can be assigned to multiple resources.In this scenario we need only a single user-assigned managed identity.Incorrect:Not A: Managed Identities vs. Service Principals:Managed identities are generally preferred for their simplicity and security. Service principals are needed when managed identities are not feasible.Not B: We would need 20 system-assigned managed identities.Not C: Personal access tokens (PATs) is fine when you are using one single virtual machine.The PAT would also need to be refreshed.
https://learn.microsoft.com/en-us/entra/identity/managed-identities-azure-resources/how-manage-user-assigne d-managed-identities https://learn.microsoft.com/en-us/azure/developer/github/connect-from-azure-identity
DRAG DROP (Drag and Drop is not supported)You need to increase the security of your team’s development process.Which type of security tool should you recommend for each stage of the development process? To answer, drag the appropriate security tools to the correct stages. Each security tool 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:
Answer(s): A
Box 1: Threat modeling -Threat modeling’s motto should be, “The earlier the better, but not too late and never ignore.”Box 2: Static code analysis -Validation in the CI/CD begins before the developer commits his or her code. Static code analysis tools in the IDE provide the first line of defense to help ensure that security vulnerabilities are not introduced into the CI/CD process.Box 3: Penetration testing -Once your code quality is verified, and the application is deployed to a lower environment like development or QA, the process should verify that there are not any security vulnerabilities in the running application. This can be accomplished by executing automated penetration test against the running application to scan it for vulnerabilities.
https://docs.microsoft.com/en-us/azure/devops/articles/security-validation-cicd-pipeline?view=vsts
You have a project in Azure DevOps named Project1.You have an Azure subscription that contains a resource group named RG1.You perform the following actions:-In Project1, create a service connection for the subscription.-Build a container image named Image1.-In RG1, create an Azure App Service web app named WebApp1.You plan to use Azure DevOps to deploy Image1 to WebApp1.You need to recommend a strategy for the deployment. The solution must ensure that the credentials used to provision WebApp1 are never stored in plaintext.What should you recommend?
Automated Security: A Service Principal (SPN) authenticates using secure, underlying Azure OAuth mechanisms.No Plaintext Secrets: The service connection securely stores the credentials inside Azure DevOps, meaning they are completely abstracted from the pipeline code and never exposed in plaintext or variables.Native Integration: The native Azure App Service deploy task handles the handshake automatically without requiring any manual credential management from the developer.Incorrect:[Not B]Storing a client secret in a pipeline variable does not fulfill the requirement of ensuring that credentials are never stored in plaintext. Even when marked as a secret variable in Azure DevOps, the underlying credential must still be maintained, rotated, and handled as a static plaintext string behind the scenes.[Not C]Passing credentials as environment variables risks exposing secrets in pipeline logs, process trees, or environment dumps.[Not D]Publishing profiles contain embedded, static plaintext passwords that must be managed and rotated manually.
https://medium.com/microsoftazure/using-azure-devops-pipelines-to-deploy-azure-functions-written-in-java-d3 38cd50ff84
You have an application that consists of several Azure App Service web apps and Azure functions.You need to assess the security of the web apps and the functions.Which Azure feature can you use to provide a recommendation for the security of the application?
Monitor compute and app services: Compute & apps include the App Services tab, which App services: list of your App service environments and current security state of each.RecommendationsThis section has a set of recommendations for each VM and computer, web and worker roles, Azure App Service Web Apps, and Azure App Service Environment that Security Center monitors. The first column lists the recommendation. The second column shows the total number of resources that are affected by that recommendation. The third column shows the severity of the issue.Note: Microsoft Defender for Cloud was formerly known as the Azure Security Center.Incorrect Answers:C: Smart Detection automatically warns you of potential performance problems, not security problems in your web application.
https://docs.microsoft.com/en-us/azure/azure-monitor/app/proactive-diagnostics
Your company uses Azure DevOps and has a Microsoft Entra tenant.Only users who have accounts in Microsoft Entra can access the Azure DevOps environment.You need to ensure that only devices that are connected to the on-premises network can access the Azure DevOps environment.What should you do?
Answer(s): B
You can configure On-Premises Conditional Access using registered devicesEnable Microsoft Entra Device RegistrationTo configure this scenario, you must configure the device registration capability in Microsoft Entra ID.
https://learn.microsoft.com/en-us/windows-server/identity/ad-fs/operations/configure-device-based-conditional-access-on-premises
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.