Skip to content

Commit 89f2d00

Browse files
authored
Merge pull request #217391 from ntrogh/alt-rbac
[Azure Load Testing] Updated built-in roles and permissions documentation
2 parents f8e4d55 + 810581d commit 89f2d00

File tree

4 files changed

+277
-29
lines changed

4 files changed

+277
-29
lines changed

articles/load-testing/how-to-assign-roles.md

Lines changed: 120 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
---
22
title: Manage roles in Azure Load Testing
3-
description: Learn how to access to an Azure Load Testing resource using Azure role-based access control (Azure RBAC).
3+
description: Learn how to manage access to an Azure load testing resource using Azure role-based access control (Azure RBAC).
44
author: ntrogh
55
ms.author: nicktrog
66
services: load-testing
77
ms.service: load-testing
88
ms.topic: how-to
9-
ms.date: 03/15/2022
9+
ms.date: 11/07/2022
1010
ms.custom: template-how-to
1111
---
1212

1313
# Manage access to Azure Load Testing
1414

15-
In this article, you learn how to manage access (authorization) to an Azure Load Testing resource. [Azure role-based access control (Azure RBAC)](../role-based-access-control/overview.md) is used to manage access to Azure resources, such as the ability to create new resources or use existing ones. Users in your Azure Active Directory (Azure AD) are assigned specific roles, which grant access to resources.
15+
In this article, you learn how to manage access (authorization) to an Azure load testing resource. [Azure role-based access control (Azure RBAC)](../role-based-access-control/overview.md) is used to manage access to Azure resources, such as the ability to create new resources or use existing ones. You can grant role-based access to users using the Azure portal, Azure Command-Line tools, or Azure Management APIs.
1616

1717
> [!IMPORTANT]
1818
> Azure Load Testing is currently in preview. For legal terms that apply to Azure features that are in beta, in preview, or otherwise not yet released into general availability, see the [Supplemental Terms of Use for Microsoft Azure Previews](https://azure.microsoft.com/support/legal/preview-supplemental-terms/).
@@ -23,11 +23,11 @@ To assign Azure roles, you must have:
2323

2424
* `Microsoft.Authorization/roleAssignments/write` permissions, such as [User Access Administrator](../role-based-access-control/built-in-roles.md#user-access-administrator) or [Owner](../role-based-access-control/built-in-roles.md#owner).
2525

26-
## Default roles
26+
## Roles in Azure Load Testing
2727

28-
Azure Load Testing resources have three built-in roles that are available by default. When you add users to a resource, you can assign one of the built-in roles to grant permissions:
28+
In Azure Load Testing, access is granted by assigning the appropriate Azure role to users, groups, and applications at the load testing resource scope. Following are the built-in roles supported by a load testing resource:
2929

30-
| Role | Access level |
30+
| Role | Description |
3131
| --- | --- |
3232
| **Load Test Reader** | Read-only actions in the Load Testing resource. Readers can list and view tests and test runs in the resource. Readers can't create, update, or run tests. |
3333
| **Load Test Contributor** | View, create, edit, or delete (where applicable) tests and test runs in a Load Testing resource. |
@@ -42,28 +42,129 @@ You'll encounter this message if your account doesn't have the necessary permiss
4242
> [!IMPORTANT]
4343
> Role access can be scoped to multiple levels in Azure. For example, someone with owner access to a resource may not have owner access to the resource group that contains the resource. For more information, see [How Azure RBAC works](../role-based-access-control/overview.md#how-azure-rbac-works).
4444
45-
## Manage resource access
45+
## Role permissions
4646

47-
You can manage access to the Azure Load Testing resource by using the Azure portal:
47+
The following tables describe the specific permissions given to each role. This can include Actions, which give permissions, and Not Actions, which restrict them.
4848

49-
1. In the [Azure portal](https://portal.azure.com), go to your Azure Load Testing resource.
49+
### Load Test Owner
5050

51-
1. On the left pane, select **Access Control (IAM)**, and then select **Add role assignment**.
51+
A Load Test Owner can manage everything, including access. The following table shows the permissions granted for the role:
5252

53-
:::image type="content" source="media/how-to-assign-roles/load-test-access-control.png" alt-text="Screenshot that shows how to configure access control.":::
53+
| Actions | Description |
54+
| ------- | ----------- |
55+
| Microsoft.Resources/deployments/* | Create and manage resource group deployments. |
56+
| Microsoft.Resources/subscriptions/resourceGroups/read | Gets or lists resource groups. |
57+
| Microsoft.Insights/alertRules/* | Create and manage alert rules. |
58+
| Microsoft.Authorization/*/read | Read authorization. |
59+
| Microsoft.LoadTestService/* | Create and manage load testing resources. |
5460

55-
1. Assign one of the Azure Load Testing [built-in roles](#default-roles). For details about how to assign roles, see [Assign Azure roles using the Azure portal](../role-based-access-control/role-assignments-portal.md).
61+
| DataActions | Description |
62+
| ------- | ----------- |
63+
| Microsoft.LoadTestService/loadtests/* | Start, stop, and manage load tests. |
5664

57-
The role assignments might take a few minutes to become active for your account. Refresh the webpage for the user interface to reflect the updated permissions.
65+
### Load Test Contributor
5866

59-
:::image type="content" source="media/how-to-assign-roles/add-role-assignment.png" alt-text="Screenshot that shows the role assignment screen.":::
67+
A Load Test Contributor can manage everything except access. The following table shows the permissions granted for the role:
6068

61-
Alternatively, you can manage access without using the Azure portal:
69+
| Actions | Description |
70+
| ------- | ----------- |
71+
| Microsoft.Resources/deployments/* | Create and manage resource group deployments. |
72+
| Microsoft.Resources/subscriptions/resourceGroups/read | Gets or lists resource groups. |
73+
| Microsoft.Insights/alertRules/* | Create and manage alert rules. |
74+
| Microsoft.Authorization/*/read | Read authorization. |
75+
| Microsoft.LoadTestService/*/read | Create and manage load testing resources. |
6276

63-
- [PowerShell](../role-based-access-control/role-assignments-powershell.md)
64-
- [Azure CLI](../role-based-access-control/role-assignments-cli.md)
65-
- [REST API](../role-based-access-control/role-assignments-rest.md)
66-
- [Azure Resource Manager templates](../role-based-access-control/role-assignments-template.md)
77+
| DataActions | Description |
78+
| ------- | ----------- |
79+
| Microsoft.LoadTestService/loadtests/* | Start, stop, and manage load tests. |
80+
81+
### Load Test Reader
82+
83+
A Load Test Reader can view all the resources in a load testing resource but can't make any changes. The following table shows the permissions granted for the role:
84+
85+
| Actions | Description |
86+
| ------- | ----------- |
87+
| Microsoft.Resources/deployments/* | Create and manage resource group deployments. |
88+
| Microsoft.Resources/subscriptions/resourceGroups/read | Gets or lists resource groups. |
89+
| Microsoft.Insights/alertRules/* | Create and manage alert rules. |
90+
| Microsoft.Authorization/*/read | Read authorization. |
91+
| Microsoft.LoadTestService/*/read | Create and manage load testing resources. |
92+
93+
| DataActions | Description |
94+
| ------- | ----------- |
95+
| Microsoft.LoadTestService/loadtests/readTest/action | Read load tests. |
96+
97+
## Configure Azure RBAC for your load testing resource
98+
99+
The following section shows you how to configure Azure RBAC on your load testing resource through the Azure portal and PowerShell.
100+
101+
### Configure Azure RBAC using the Azure portal
102+
103+
1. Sign in to the [Azure portal](https://portal.azure.com/) and open your load testing resource from the **Azure Load Testing** page.
104+
105+
1. Select **Access control (IAM)** and select a role from the list of available roles. You can choose any of the available built-in roles that an Azure load testing resource supports or any custom role you might have defined. Assign the role to a user to which you want to give permissions.
106+
107+
For detailed steps, see [Assign Azure roles using the Azure portal](/azure/role-based-access-control/role-assignments-portal).
108+
109+
#### Remove role assignments from a user
110+
111+
You can remove the access permission for a user who isn't managing the Azure load testing resource, or who no longer works for the organization. The following steps show how to remove the role assignments from a user. For detailed steps, see [Remove Azure role assignments](/azure/role-based-access-control/role-assignments-remove):
112+
113+
1. Open **Access control (IAM)** at a scope, such as management group, subscription, resource group, or resource, where you want to remove access.
114+
115+
1. Select the **Role assignments** tab to view all the role assignments at this scope.
116+
117+
1. In the list of role assignments, add a checkmark next to the user with the role assignment you want to remove.
118+
119+
1. Select **Remove**, and then select **Yes** to confirm.
120+
121+
### Configure Azure RBAC using PowerShell
122+
123+
You can also configure role-based access to a load testing resource using the following [Azure PowerShell cmdlets](/azure/role-based-access-control/role-assignments-powershell):
124+
125+
* [Get-AzRoleDefinition](/powershell/module/Az.Resources/Get-AzRoleDefinition) lists all Azure roles that are available in Azure Active Directory. You can use this cmdlet with the Name parameter to list all the actions that a specific role can perform.
126+
127+
```azurepowershell-interactive
128+
Get-AzRoleDefinition -Name 'Load Test Contributor'
129+
```
130+
131+
The following is the example output:
132+
133+
```output
134+
Name : Load Test Contributor
135+
Id : 00000000-0000-0000-0000-000000000000
136+
IsCustom : False
137+
Description : View, create, update, delete and execute load tests. View and list load test resources but can not make any changes.
138+
Actions : {Microsoft.LoadTestService/*/read, Microsoft.Authorization/*/read, Microsoft.Resources/deployments/*, Microsoft.Resources/subscriptions/resourceGroups/read…}
139+
NotActions : {}
140+
DataActions : {Microsoft.LoadTestService/loadtests/*}
141+
NotDataActions : {}
142+
AssignableScopes : {/}
143+
```
144+
145+
* [Get-AzRoleAssignment](/powershell/module/az.resources/get-azroleassignment) lists Azure role assignments at the specified scope. Without any parameters, this cmdlet returns all the role assignments made under the subscription. Use the `ExpandPrincipalGroups` parameter to list access assignments for the specified user, as well as the groups that the user belongs to.
146+
147+
**Example**: Use the following cmdlet to list all the users and their roles within a load testing resource.
148+
149+
```azurepowershell-interactive
150+
Get-AzRoleAssignment -Scope '/subscriptions/<SubscriptionID>/resourcegroups/<Resource Group Name>/Providers/Microsoft.LoadTestService/loadtests/<Load Test Name>'
151+
```
152+
153+
* Use [New-AzRoleAssignment](/powershell/module/Az.Resources/New-AzRoleAssignment) to assign access to users, groups, and applications to a particular scope.
154+
155+
**Example**: Use the following command to assign the "Load Test Reader" role for a user in the load testing resource scope.
156+
157+
```azurepowershell-interactive
158+
New-AzRoleAssignment -SignInName <sign-in Id of a user you wish to grant access> -RoleDefinitionName 'Load Test Reader' -Scope '/subscriptions/<SubscriptionID>/resourcegroups/<Resource Group Name>/Providers/Microsoft.LoadTestService/loadtests/<Load Testing resource name>'
159+
```
160+
161+
* Use [Remove-AzRoleAssignment](/powershell/module/Az.Resources/Remove-AzRoleAssignment) to remove access of a specified user, group, or application from a particular scope.
162+
163+
**Example**: Use the following command to remove the user from the Load Test Reader role in the load testing resource scope.
164+
165+
```azurepowershell-interactive
166+
Remove-AzRoleAssignment -SignInName <sign-in Id of a user you wish to remove> -RoleDefinitionName 'Load Test Reader' -Scope '/subscriptions/<SubscriptionID>/resourcegroups/<Resource Group Name>/Providers/Microsoft.LoadTestService/loadtests/<Load Testing resource name>'
167+
```
67168
68169
## Next steps
69170
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)