Saltear al contenido principal

Az Role Definition Create

When these roles are defined, return to Microsoft Azure to connect your Azure account to InsightCloudSec. If the built-in Azure roles don`t meet the specific needs of your organization, you can create your own custom roles. For this tutorial, you`ll use the Azure CLI to create a custom role named Reader Support Tickets. The custom role allows the user to view everything in a subscription`s control plane and open support tickets. To create the new custom role, use the az role definition create command and specify the JSON role definition file. You can now use the following command in the Azure CLI to find the newly created custom role. If you don`t have an Azure subscription, create a free account before you start. If you want to work in read-only mode, which prevents InsightCloudSec from taking action against your Microsoft Azure resources, we recommend that you use the standard InsightCloudSec user role. This role grants InsightCloudSec read-only permissions on supported resources so that it can collect and report on data. The Microsoft.ContainerRegistry/registries/pull/read permission is included in the Power User, Standard User, and Reader roles because it must be explicit if none of the built-in owner, contributor, or AcrPull roles are used. This article describes how to create or customize roles in Microsoft Azure. However, for most scenarios in InsightCloudSec, using roles created by Azure is appropriate. You must add explicit subscription IDs, otherwise you will not be able to import the role into your subscription.

Under Actions, add the Microsoft.Resources/deployments/* action to create and manage resource group deployments. Make sure that a comma is inserted after the previous action. To update a custom role, first use the az role definition list to retrieve the role definition. Second, make the desired changes to the role definition. Finally, use the az role definition update to save the updated role definition. Use it only if the role or assignment has been added at the resource group level. Create a role with read-only access to storage and network resources and the ability to start or restart virtual machines. (Bash) The following example adds the Microsoft.Insights/diagnosticSettings/ action to Actions and AssignableScopes for the Virtual Machine Operator custom role. Adding an administrative group to AssignableScopes is currently in preview. Copy the JSON of the custom role that you want to modify into a new file and make the desired changes to the role definition.

Then, update the role in Azure. The easiest way to create a custom role is to start with a JSON template, add your changes, and then create a new role. Remove all role assignments that use the custom role. For more information, see Find Role Assignments to Remove a Custom Role. If you want to use InsightCloudSec to manage your Microsoft Azure resources directly or using bots, use the InsightCloudSec Power User role. The InsightCloudSec Power User role grants InsightCloudSec all permissions on supported resources so that it can respond to cloud resources in addition to monitoring and reporting. The following example creates a custom role named Virtual Machine Operator. This custom role assigns access to all read actions of Microsoft.Compute, Microsoft.Storage, and Microsoft.Network resource providers, and assigns access to boot, restart, and monitoring virtual machines. This custom role can be used in two subscriptions. This example uses a JSON file as input. [!div class=»nextstepaction»] Create or update Azure custom roles using the Azure CLI To list all your custom roles, use the az Role Definition List command with the –custom-role-only parameter. A description of a role that exists as a JSON or path to a file that contains a JSON description.

This is the Azure CLI command to create a new role in Azure, where RoleInfo.json is the on-premises file with all the configurations, scopes, actions, and data actions related to that role. For more information about the different properties, see Azure Custom Roles. The new custom role is now available and can be assigned to users, groups, or service principals such as built-in roles. Use the az role definition delete command and specify the role name or ID to delete the custom role. To access services through InsightCloudSec, we recommend that you use a read-only role or a power user role. To create a custom role only for provisioning MKE compute resources: Update a role using the az role definition list output. (Bash) To update the custom role, update the JSON file, and then update the custom role. You can create your own custom Azure roles for use with MKE. You can assign these roles to users, groups, and service principals in administrative group scopes (preview only), subscriptions, and resource groups.

Use az role definition delete to delete the custom role. To specify the role to delete, use the role name or ID. To determine the role ID, use the az role definition list. To add one of these roles to your account, copy the JSON of one of the above roles to a file and use PowerShell or the Azure CLI from the command line to create the role.

Volver arriba