You have an Azure DevOps project named Project1 and an Azure subscription named Sub1.You need to prevent releases from being deployed unless the releases comply with the Azure Policy rules assigned to Sub1.What should you do in the release pipeline of Project1?
Answer(s): A
You can check policy compliance with gates.You can extend the approval process for the release by adding a gate. Gates allow you to configure automated calls to external services, where the results are used to approve or reject a deployment.You can use gates to ensure that the release meets a wide range or criteria, without requiring user intervention.
https://docs.microsoft.com/en-us/azure/devops/pipelines/release/deploy-using-approvals
DRAG DROP (Drag and Drop is not supported)You have a Microsoft Entra tenant. The tenant contains three groups named Group1, Group2, and Group3.You create a new project in Azure DevOps named Project1.You need to secure the service connections for Project1. The solution must meet the following requirements:-The members of Group1 must be able to share and unshare a service connection with other projects.-The members of Group2 must be able to rename a service connection and update the description.-The members of Group3 must be able to use the service connection within build or release pipelines.-The principle of least privilege must be followed.Which permission should you grant to each group? To answer, drag the appropriate permissions to the correct groups. Each permission 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: Organization-level AdministratorThe members of Group1 must be able to share and unshare a service connection with other projects.Add members to the Project Collection Administrators groupWhen you create an organization, you become a member of the Project Collection Administrators group. This group has the authority to manage the organization’s settings, policies, and processes. It can also create and manage all the projects and extensions in the organization.Incorrect:* Project-level AdministratorsAdd members to the Project Administrators groupThe person who creates a project is automatically added as a member to the Project Administrators group. Members of this group have permissions to manage project configuration, repositories, pipeline resources, teams, and all project-level permissions.It's always a good idea to have more than one person who has administrative privileges. To add a user to this group, see Change permissions at the project level, Add members to the Project Administrators group.Grant or restrict permissionsPermissions are managed at the following three levels and through role-based assignments.object project organization or collectionAs a member of the Project Administrators group, you can grant or restrict permissions for all objects and at the project-level. To delegate specific tasks to others, we recommend that you add them to a built-in or custom security group, or add them to a specific role.Box 2: CreatorThe members of Group2 must be able to rename a service connection and update the description.You can create, view, use, and manage a service connection based on your assigned user roles.Role CreatorMembers of this role can create the service connection in the project. Contributors are added as members by defaultBox 3: UserThe members of Group3 must be able to use the service connection within build or release pipelines. Role UserMembers of this role can use the service connection when authoring build or release pipelines or authorize yaml pipelines.Note: User permissions on service connections
https://learn.microsoft.com/en-us/azure/devops/user-guide/manage-organization-collection https://learn.microsoft.com/en-us/azure/devops/pipelines/library/service-endpoints https://learn.microsoft.com/en-us/azure/devops/user-guide/project-admin-tutorial
You have an Azure subscription that contains four Azure virtual machines.You need to configure the virtual machines to use a single identity. The solution must meet the following requirements:-Ensure that the credentials for the identity are managed automatically.-Support granting privileges to the identity.Which type of identity should you use?
Managed Service Identities are automatically managed by Azure. They enable authentication to services that support Microsoft Entra authentication, without needing to embed credentials into your code.Managed identity typesThere are two types of managed identities:* System-assigned. Some Azure resources, such as virtual machines allow you to enable a managed identity directly on the resource. When you enable a system-assigned managed identity:- A service principal of a special type is created in Microsoft Entra ID for the identity. The service principal is tied to the lifecycle of that Azure resource. When the Azure resource is deleted, Azure automatically deletes the service principal for you.* User-assigned. You may also create a managed identity as a standalone Azure resource. You can create a user-assigned managed identity and assign it to one or more Azure Resources. When you enable a user-assigned managed identity:A service principal of a special type is created in Microsoft Entra ID for the identity. The service principal is managed separately from the resources that use it.*-> User-assigned identities can be used by multiple resources.You authorize the managed identity to have access to one or more services.
https://learn.microsoft.com/en-us/entra/identity/managed-identities-azure-resources/overview
You have an Azure DevOps organization named Contoso, an Azure DevOps project named Project1, an Azure subscription named Sub1, and an Azure key vault named vault1.You need to ensure that you can reference the values of the secrets stored in vault1 in all the pipelines of Project1. The solution must prevent the values from being stored in the pipelines.What should you do?
Use a variable group to store values that you want to control and make available across multiple pipelines.
https://docs.microsoft.com/en-us/azure/devops/pipelines/library/variable-groups
You use release pipelines in Azure Pipelines to deploy an app. Secrets required by the pipeline are stored as pipeline variables. Logging of commands is enabled for the Azure Pipelines agent.You need to prevent the values of the secrets from being logged.What should you do?
Answer(s): C
Azure Pipelines, Set secret variablesWe make an effort to mask secrets from appearing in Azure Pipelines output, but you still need to take precautions. Never echo secrets as output. Some operating systems log command line arguments. Never pass secrets on the command line. Instead, we suggest that you map your secrets into environment variables.
https://learn.microsoft.com/en-us/azure/devops/pipelines/process/set-secret-variables
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.