Skip to content

Commit 70ccfa9

Browse files
authored
Merge pull request #298031 from dominicbetts/release-2504-aio-custom-rbac
AIO 2504: Add custom RBAC article
2 parents 45686b5 + 506bc3d commit 70ccfa9

File tree

4 files changed

+107
-49
lines changed

4 files changed

+107
-49
lines changed

articles/iot-operations/.openpublishing.redirection.iot-operations.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -510,6 +510,11 @@
510510
"redirect_url": "/azure/iot-operations/end-to-end-tutorials/tutorial-add-assets",
511511
"redirect_document_id": false
512512
},
513+
{
514+
"source_path_from_root": "/articles/iot-operations/discover-manage-assets/howto-secure-assets.md",
515+
"redirect_url": "/azure/iot-operations/reference/custom-rbac",
516+
"redirect_document_id": true
517+
},
513518
{
514519
"source_path_from_root": "/articles/iot-operations/manage-devices-assets/howto-autodetect-opcua-assets-using-akri.md",
515520
"redirect_url": "/azure/iot-operations/discover-manage-assets/howto-autodetect-opc-ua-assets-use-akri",

articles/iot-operations/discover-manage-assets/howto-secure-assets.md

Lines changed: 0 additions & 47 deletions
This file was deleted.
Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
---
2+
title: Custom RBAC for your resources
3+
description: Use the Azure portal to secure access to Azure IoT Operations resources such as data flows and assets by using Azure role-based access control.
4+
author: dominicbetts
5+
ms.author: dobett
6+
ms.topic: reference
7+
ms.date: 04/16/2025
8+
9+
#CustomerIntent: As an IT administrator, I want configure Azure RBAC custom roles on resources in my Azure IoT Operations instance to control access to them.
10+
---
11+
12+
# Custom RBAC for your Azure IoT Operations resources
13+
14+
To define custom roles that grant specific permissions to users, you can use Azure RBAC. For example, you can define an **Onboarding** role that grants sufficient permissions to a user to complete the Azure Arc connect process and deploy Azure IoT Operations securely.
15+
16+
This article includes a list of example that you can download and use in your environment. These custom roles are JSON files that list the specific permissions and scope for the role.
17+
18+
To learn more about custom roles in Azure RBAC, see [Azure custom roles](/azure/role-based-access-control/custom-roles).
19+
20+
## Example custom roles
21+
22+
The following sections list the example Azure IoT Operations custom roles you can download and use:
23+
24+
### Onboarding roles
25+
26+
| Custom role | Description |
27+
| ----------- | ----------- |
28+
| [Onboarding](https://github.com/Azure-Samples/explore-iot-operations/blob/main/samples/custom-rbac/Onboarding.json) | This is privileged role. The user can complete Azure Arc connect process and deploy Azure IoT Operations securely. |
29+
30+
### Viewer roles
31+
32+
| Custom role | Description |
33+
| ----------- | ----------- |
34+
| [Instance viewer](https://github.com/Azure-Samples/explore-iot-operations/blob/main/samples/custom-rbac/Instance%20Viewer.json) | This role allows the user to view the Azure IoT Operations instance. |
35+
| [Asset viewer](https://github.com/Azure-Samples/explore-iot-operations/blob/main/samples/custom-rbac/Asset%20Viewer.json) | This role allows the user to view the assets in the Azure IoT Operations instance. |
36+
| [Asset endpoint viewer](https://github.com/Azure-Samples/explore-iot-operations/blob/main/samples/custom-rbac/Asset%20Endpoint%20Viewer.json) | This role allows the user to view the asset endpoints in the Azure IoT Operations instance. |
37+
| [Data flow viewer](https://github.com/Azure-Samples/explore-iot-operations/blob/main/samples/custom-rbac/Data%20Flow%20Viewer.json) | This role allows the user to view the data flows in the Azure IoT Operations instance. |
38+
| [Data flow destination viewer](https://github.com/Azure-Samples/explore-iot-operations/blob/main/samples/custom-rbac/Data%20Flow%20Destination%20Viewer.json) | This role allows the user to view the data flow destinations in the Azure IoT Operations instance. |
39+
| [MQ viewer](https://github.com/Azure-Samples/explore-iot-operations/blob/main/samples/custom-rbac/MQ%20Viewer.json) | This role allows the user to view the MQTT broker in the Azure IoT Operations instance. |
40+
| [Viewer](https://github.com/Azure-Samples/explore-iot-operations/blob/main/samples/custom-rbac/Viewer.json) | This role allows the user to view the Azure IoT Operations instance. This role is a combination of the **Instance viewer**, **Asset viewer**, **Asset endpoint viewer**, **Data flow viewer**, **Data flow destination viewer**, and **MQ viewer** roles. |
41+
42+
### Administrator roles
43+
44+
| Custom role | Description |
45+
| ----------- | ----------- |
46+
| [Instance administrator](https://github.com/Azure-Samples/explore-iot-operations/blob/main/samples/custom-rbac/Instance%20Administrator.json) | This is privileged role. The user can deploy an instance. The role includes permissions to create and update instances, brokers, authentications, listeners, dataflow profiles, dataflow endpoints, schema registries, and user assigned identities. The role also includes permission to delete instances. |
47+
| [Asset administrator](https://github.com/Azure-Samples/explore-iot-operations/blob/main/samples/custom-rbac/Asset%20Administrator.json) | The user can create and manage assets in the Azure IoT Operations instance. |
48+
| [Asset endpoint administrator](https://github.com/Azure-Samples/explore-iot-operations/blob/main/samples/custom-rbac/Asset%20Endpoint%20Administrator.json) | The user can create and manage asset endpoints in the Azure IoT Operations instance. |
49+
| [Data flow administrator](https://github.com/Azure-Samples/explore-iot-operations/blob/main/samples/custom-rbac/Data%20Flow%20Administrator.json) | The user can create and manage data flows in the Azure IoT Operations instance. |
50+
| [Data flow destination administrator](https://github.com/Azure-Samples/explore-iot-operations/blob/main/samples/custom-rbac/Data%20Flow%20Destination%20Administrator.json) | The user can create and manage data flow destinations in the Azure IoT Operations instance. |
51+
| [MQ administrator](https://github.com/Azure-Samples/explore-iot-operations/blob/main/samples/custom-rbac/MQ%20Administrator.json) | The user can create and manage the MQTT broker in the Azure IoT Operations instance. |
52+
| [Administrator](https://github.com/Azure-Samples/explore-iot-operations/blob/main/samples/custom-rbac/Administrator.json) | This is privileged role. The user can create and manage the Azure IoT Operations instance. This role is a combination of the **Instance administrator**, **Asset administrator**, **Asset endpoint administrator**, **Data flow administrator**, **Data flow destination administrator**, and **MQ administrator** roles. |
53+
54+
> [!NOTE]
55+
> The example _Assets endpoint administrator_ and _Data flow destination administrator_ roles have access to Azure Key Vault and the **Manage secrets** page in the operations experience web UI. However, even if these custom roles are assigned at the subscription level, users can only see the list of key vaults from the specific resource group. Access to schema registries is also restricted to the resource group level.
56+
57+
> [!IMPORTANT]
58+
> Currently, the operations experience web UI displays a misleading error message when a user tries to access a resource they don't have permissions for. Access to the resource is blocked as expected.
59+
60+
## Create a custom role definition
61+
62+
To prepare one of the sample custom roles:
63+
64+
1. Download the JSON file for the custom role you want to create. The JSON file contains the role definition, including the permissions and scope for the role.
65+
66+
1. Edit the JSON file to replace the placeholder value in the `assignableScopes` field with your subscription ID. Save your changes.
67+
68+
To add the custom role to your Azure subscription using the Azure portal:
69+
70+
1. Go to your subscription in the Azure portal.
71+
72+
1. Select **Access control (IAM)**.
73+
74+
1. Select **Add > Add custom role**.
75+
76+
1. Enter a name, such as **Onboarding**, and a description for the role.
77+
78+
1. Select **Start from JSON** and then select the JSON file you downloaded. The custom role name and description are populated from the file.
79+
80+
1. Optionally, review the permissions and assignable scopes.
81+
82+
1. To add the custom role to your subscription, select **Review + create** and then **Create**.
83+
84+
## Configure and use a custom role
85+
86+
After you create the custom roles in your subscription, you can assign them to users, groups, or applications. You can assign roles at the subscription or resource group level. Assigning roles at the level of a resource group enables the most granular control.
87+
88+
To assign the custom role to a user at the resource group level using the Azure portal:
89+
90+
1. Go to your resource group in the Azure portal.
91+
92+
1. Select **Access control (IAM)**.
93+
94+
1. Select **Add > Add role assignment**.
95+
96+
1. Search for and select the custom role you want to assign. Select **Next**.
97+
98+
1. Select the user or users you want to assign the role to. You can search for users by name or email address.
99+
100+
1. Select **Review + assign** to review the role assignment. If everything looks good, select **Assign**.

articles/iot-operations/toc.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,6 @@ items:
5151
href: discover-manage-assets/overview-akri.md
5252
- name: Manage your assets
5353
href: discover-manage-assets/howto-manage-assets-remotely.md
54-
- name: Secure access to your assets
55-
href: discover-manage-assets/howto-secure-assets.md
5654
- name: OPC UA (connect to your assets)
5755
items:
5856
- name: What is connector for OPC UA?
@@ -219,6 +217,8 @@ items:
219217
href: /cli/azure/iot/ops
220218
- name: Azure IoT Operations REST API
221219
href: /rest/api/iotoperations
220+
- name: Custom RBAC
221+
href: reference/custom-rbac.md
222222
- name: Available metrics for observability
223223
items:
224224
- name: MQTT broker

0 commit comments

Comments
 (0)