Overview
Here I practised role-based access control in Azure. I reviewed the roles and permissions on my subscription, created a resource group and assigned roles at that level. I gave different users the built-in Reader and Virtual Machine Contributor roles. I then created my own role called VM Operator - Limited and assigned it to a test user.
What I set out to do
- Give least-privilege access at resource group level.
- Create a custom role that limits what a user can do with VMs.
What I did
- I reviewed the Owner role I inherit from the subscription and the built-in role permissions.
- I assigned Reader and Virtual Machine Contributor on rg-rbac-lab.
- I created VM Operator - Limited. It can view, start and restart VMs but cannot delete VMs or assign roles.
- I assigned the custom role to a lab user on the resource group.
Screenshots
They are in the same order as in my repository. Click one to see it full size.
I painted over my Azure subscription ID in red. Everything else is as I captured it.
1. Subscription Role AssignmentsShows the Owner role assignment inherited at subscription scope. 2. Built-in Role PermissionsShows the permissions associated with the built-in Azure RBAC roles. 3. Resource Group Role AssignmentsShows the built-in and custom Azure RBAC roles created and assigned to the respective user accounts at the `rg-rbac-lab` resource-group scope, including Reader, Virtual Machine Contributor and VM Operator - Limited. 4. Custom Role CreationShows the creation of the VM Operator - Limited custom role with permissions to read, start and restart virtual machines. 5. Custom Role AssignmentShows the VM Operator - Limited role assigned to Tinashe Sibanda at the resource-group scope.
How I tested it
- The role assignments, including my custom role, showed correctly on rg-rbac-lab.
Repository
My full notes and the original screenshots are on GitHub: azure-administrator-labs/03-azure-rbac