You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/digital-twins/concepts-route-events.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ titleSuffix: Azure Digital Twins
5
5
description: Learn how to route Azure Digital Twins events, both within the service and externally to other Azure services.
6
6
author: baanders
7
7
ms.author: baanders # Microsoft employees only
8
-
ms.date: 07/18/2022
8
+
ms.date: 11/15/2022
9
9
ms.topic: conceptual
10
10
ms.service: digital-twins
11
11
ms.custom: contperf-fy23q1
@@ -63,6 +63,8 @@ When defining an endpoint, you'll need to provide:
63
63
* The primary connection string and secondary connection string to authenticate
64
64
* The topic path of the endpoint, such as `your-topic.westus2.eventgrid.azure.net`
65
65
66
+
Optionally, you can choose to create your endpoint with identity-based authentication, to use the endpoint with a [system-assigned or user-assigned managed identity](concepts-security.md#managed-identity-for-accessing-other-resources). This option is only available for Event Hubs and Service Bus-type endpoints (it's not supported for Event Grid).
67
+
66
68
The endpoint APIs that are available in control plane are:
Copy file name to clipboardExpand all lines: articles/digital-twins/concepts-security.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -91,11 +91,11 @@ If a user attempts to perform an action not allowed by their role, they may rece
91
91
92
92
Setting up an [Azure Active Directory (Azure AD)](../active-directory/fundamentals/active-directory-whatis.md)*managed identity* for an Azure Digital Twins instance can allow the instance to easily access other Azure AD-protected resources, such as [Azure Key Vault](../key-vault/general/overview.md). The identity is managed by the Azure platform, and doesn't require you to provision or rotate any secrets. For more about managed identities in Azure AD, see [Managed identities for Azure resources](../active-directory/managed-identities-azure-resources/overview.md).
93
93
94
-
Azure supports two types of managed identities: system-assigned and user-assigned. Currently, Azure Digital Twins supports only *system-assigned identities*.
94
+
Azure Digital Twins supports both types of managed identities, *system-assigned* and *user-assigned*.
95
95
96
-
You can use a system-assigned managed identity for your Azure Digital Instance to authenticate to a [custom-defined endpoint](concepts-route-events.md#create-an-endpoint). Azure Digital Twins supports system-assigned identity-based authentication to endpoints for [Event Hubs](../event-hubs/event-hubs-about.md) and [Service Bus](../service-bus-messaging/service-bus-messaging-overview.md) destinations, and to an [Azure Storage Container](../storage/blobs/storage-blobs-introduction.md) endpoint for [dead-letter events](concepts-route-events.md#dead-letter-events). [Event Grid](../event-grid/overview.md) endpoints are currently not supported for managed identities.
96
+
You can use either of these managed identity types to authenticate to a [custom-defined endpoint](concepts-route-events.md#create-an-endpoint). Azure Digital Twins supports identity-based authentication to endpoints for [Event Hubs](../event-hubs/event-hubs-about.md) and [Service Bus](../service-bus-messaging/service-bus-messaging-overview.md) destinations, and to an [Azure Storage Container](../storage/blobs/storage-blobs-introduction.md) endpoint for [dead-letter events](concepts-route-events.md#dead-letter-events). [Event Grid](../event-grid/overview.md) endpoints are currently not supported for managed identities.
97
97
98
-
For instructions on how to enable a system-managed identity for Azure Digital Twins and use it to route events, see [Route events with a managed identity](how-to-route-with-managed-identity.md).
98
+
For instructions on how to enable a managed identity for Azure Digital Twins and use it to route events, see [Route events with a managed identity](how-to-route-with-managed-identity.md).
Copy file name to clipboardExpand all lines: articles/digital-twins/how-to-manage-routes.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -81,10 +81,10 @@ To create a new endpoint, go to your instance's page in the [Azure portal](https
81
81
1. Enter a **Name** for your endpoint and choose the **Endpoint type**.
82
82
83
83
1. Complete the other details that are required for your endpoint type, including your subscription and the endpoint resources described [above](#prerequisite-create-endpoint-resources).
84
-
1. For Event Hubs and Service Bus endpoints only, you must select an **Authentication type**. You can use key-based authentication with a pre-created authorization rule, or identity-based authentication if you'll be using the endpoint with a [managed identity](concepts-security.md#managed-identity-for-accessing-other-resources) for your Azure Digital Twins instance.
85
-
86
-
:::image type="content" source="media/how-to-manage-routes/create-endpoint-event-hub-authentication.png" alt-text="Screenshot of creating an endpoint of type Event Hubs in the Azure portal.":::
84
+
1. For Event Hubs and Service Bus endpoints only, you must select an **Authentication type**. You can use key-based authentication with a pre-created authorization rule, or select the option for a [system-assigned or user-assigned managed identity](concepts-security.md#managed-identity-for-accessing-other-resources).
87
85
86
+
:::image type="content" source="media/how-to-manage-routes/create-endpoint-event-hub-authentication.png" alt-text="Screenshot of creating an endpoint of type Event Hubs in the Azure portal." lightbox="media/how-to-manage-routes/create-endpoint-event-hub-authentication.png":::
87
+
88
88
1. Finish creating your endpoint by selecting **Save**.
89
89
90
90
>[!IMPORTANT]
@@ -125,7 +125,7 @@ After successfully running these commands, the Event Grid topic, event hub, or S
125
125
126
126
#### Create an endpoint with identity-based authentication
127
127
128
-
You can also create an endpoint that has identity-based authentication, to use the endpoint with a [managed identity](concepts-security.md#managed-identity-for-accessing-other-resources). This option is only available for Event Hubs and Service Bus-type endpoints (it's not supported for Event Grid).
128
+
You can use optional command parameters to create an endpoint that has identity-based authentication, to use the endpoint with a [system-assigned or user-assigned managed identity](concepts-security.md#managed-identity-for-accessing-other-resources). This option is only available for Event Hubs and Service Bus-type endpoints (it's not supported for Event Grid).
129
129
130
130
For instructions on how to do this, see [Create an endpoint with identity-based authentication](how-to-route-with-managed-identity.md?tabs=cli#create-an-endpoint-with-identity-based-authentication).
# Enable a managed identity for routing Azure Digital Twins events
20
20
21
-
This article describes how to use a [system-assigned identity for an Azure Digital Twins instance](concepts-security.md#managed-identity-for-accessing-other-resources) when forwarding events to supported routing destinations. Setting up a managed identity isn't required for routing, but it can help the instance to easily access other Azure AD-protected resources, such as [Event Hubs](../event-hubs/event-hubs-about.md), [Service Bus](../service-bus-messaging/service-bus-messaging-overview.md) destinations, and [Azure Storage Container](../storage/blobs/storage-blobs-introduction.md).
21
+
This article describes how to use a [managed identity for an Azure Digital Twins instance](concepts-security.md#managed-identity-for-accessing-other-resources) when forwarding events to supported routing destinations. Setting up a managed identity isn't required for routing, but it can help the instance to easily access other Azure AD-protected resources, such as [Event Hubs](../event-hubs/event-hubs-about.md), [Service Bus](../service-bus-messaging/service-bus-messaging-overview.md) destinations, and [Azure Storage Container](../storage/blobs/storage-blobs-introduction.md). Managed identities can be *system-assigned* or *user-assigned*.
22
22
23
23
Here are the steps that are covered in this article:
24
24
25
-
1. Create an Azure Digital Twins instance with a system-assigned identity or enable system-assigned identity on an existing Azure Digital Twins instance.
25
+
1. Create an Azure Digital Twins instance with a managed identity, or enable managed identity on an existing Azure Digital Twins instance.
26
26
1. Add an appropriate role or roles to the identity. For example, assign the **Azure Event Hub Data Sender** role to the identity if the endpoint is Event Hubs, or **Azure Service Bus Data Sender role** if the endpoint is Service Bus.
27
-
1. Create an endpoint in Azure Digital Twins that can use system-assigned identities for authentication.
27
+
1. Create an endpoint in Azure Digital Twins that can use managed identities for authentication.
28
28
29
29
## Create an Azure Digital Twins instance with a managed identity
30
30
31
-
If you already have an Azure Digital Twins instance, ensure that you've enabled a [system-managed identity](how-to-set-up-instance-cli.md#enabledisable-system-managed-identity-for-the-instance) for it.
31
+
If you already have an Azure Digital Twins instance, ensure that you've enabled a [managed identity](how-to-set-up-instance-cli.md#enabledisable-managed-identity-for-the-instance) for it.
32
32
33
-
If you don't have an Azure Digital Twins instance, follow the instructions in [Create the instance with a system-managed identity](how-to-set-up-instance-cli.md#create-the-instance-with-a-system-managed-identity) to create an Azure Digital Twins instance with a managed identity for the first time.
33
+
If you don't have an Azure Digital Twins instance, follow the instructions in [Create the instance with a managed identity](how-to-set-up-instance-cli.md#create-the-instance-with-a-managed-identity) to create an Azure Digital Twins instance with a managed identity for the first time.
34
34
35
35
Then, make sure you have *Azure Digital Twins Data Owner* role on the instance. You can find instructions in [Set up user access permissions](how-to-set-up-instance-cli.md#set-up-user-access-permissions).
36
36
37
37
## Assign Azure roles to the identity
38
38
39
-
Once a system-assigned identity is created for your Azure Digital Twins instance, you'll need to assign it appropriate roles to authenticate with different types of [endpoints](concepts-route-events.md) for routing events to supported destinations. This section describes the role options and how to assign them to the system-assigned identity.
39
+
Once a managed identity is created for your Azure Digital Twins instance, you'll need to assign it appropriate roles to authenticate with different types of [endpoints](concepts-route-events.md) for routing events to supported destinations. This section describes the role options and how to assign them to the managed identity.
40
40
41
41
>[!NOTE]
42
42
> This is an important step—without it, the identity won't be able to access your endpoints and events won't be delivered.
43
43
44
44
### Supported destinations and Azure roles
45
45
46
-
Here are the minimum roles that an identity needs to access an endpoint, depending on the type of destination. Roles with higher permissions (like Data Owner roles) will also work.
46
+
Here are the minimum roles that your Azure Digital Twins identity needs to access an endpoint, depending on the type of destination. Roles with higher permissions (like Data Owner roles) will also work.
47
47
48
48
| Destination | Azure role |
49
49
| --- | --- |
@@ -73,17 +73,17 @@ To assign a role to the identity, start by opening the [Azure portal](https://po
73
73
74
74
| Setting | Value |
75
75
| --- | --- |
76
-
| Role | Select the desired role from the dropdown menu. |
| Members | Select the managed identity of your Azure Digital Twins instance that's being assigned the role. The name of the managed identity matches the name of the instance, so choose the name of your Azure Digital Twins instance. |
76
+
| Role | Select the desired role from the options. |
77
+
| Assign access to |**Managed identity**|
78
+
| Members | Select the user-assigned or system-assigned managed identity of your Azure Digital Twins instance that's being assigned the role. A user-assigned identity will have the name you chose when you created the identity, and a system-assigned identity will have a name that matches the name of your Azure Digital Twins instance. |
79
79
80
80
:::image type="content" source="../../includes/role-based-access-control/media/add-role-assignment-page.png" alt-text="Screenshot of the 'Add role assignment' page for an Azure Digital Twins instance." lightbox="../../includes/role-based-access-control/media/add-role-assignment-page.png":::
81
81
82
82
# [CLI](#tab/cli)
83
83
84
84
You can add the `--scopes` parameter onto the `az dt create` command to assign the identity to one or more scopes with a specified role. The command with this parameter can be used when first creating the instance, or later by passing in the name of an instance that already exists.
85
85
86
-
Here's an example that creates an instance with a system managed identity, and assigns that identity a custom role called `MyCustomRole` in an event hub.
86
+
Here's an example that creates an instance with a system-assigned managed identity, and assigns that identity a custom role called `MyCustomRole` in an event hub.
@@ -97,7 +97,7 @@ You can also use the [az role assignment](/cli/azure/role/assignment) command gr
97
97
98
98
## Create an endpoint with identity-based authentication
99
99
100
-
After setting up a system-managed identity for your Azure Digital Twins instance and assigning it the appropriate role(s), you can create Azure Digital Twins [endpoints](how-to-manage-routes.md#create-an-endpoint-for-azure-digital-twins) that can use the identity for authentication. This option is only available for Event Hubs and Service Bus-type endpoints (it's not supported for Event Grid).
100
+
After setting up a managed identity for your Azure Digital Twins instance and assigning it the appropriate role(s), you can create Azure Digital Twins [endpoints](how-to-manage-routes.md#create-an-endpoint-for-azure-digital-twins) that can use the identity for authentication. This option is only available for Event Hubs and Service Bus-type endpoints (it's not supported for Event Grid).
101
101
102
102
>[!NOTE]
103
103
> You cannot edit an endpoint that has already been created with key-based identity to change to identity-based authentication. You must choose the authentication type when the endpoint is first created.
@@ -108,25 +108,36 @@ Use the tabs below to select instructions for your preferred experience.
108
108
109
109
Start following the [instructions to create an Azure Digital Twins endpoint](how-to-manage-routes.md#create-an-endpoint-for-azure-digital-twins).
110
110
111
-
When you get to the step of completing the details required for your endpoint type, make sure to select**Identity-based** for the Authentication type.
111
+
When you get to the step of completing the details required for your endpoint type, select either **System-assigned** or**User-assigned (preview)** for the Authentication type.
112
112
113
113
:::image type="content" source="media/how-to-manage-routes/create-endpoint-event-hub-authentication.png" alt-text="Screenshot of creating an endpoint of type Event Hubs." lightbox="media/how-to-manage-routes/create-endpoint-event-hub-authentication.png":::
114
114
115
115
Finish setting up your endpoint and select **Save**.
116
116
117
117
# [CLI](#tab/cli)
118
118
119
-
Creating the endpoint with the CLI is done by adding a `--auth-type` parameter to the `az dt endpoint create` command that's used to create the endpoint. (For more information about this command, see its [reference documentation](/cli/azure/dt/endpoint/create) or the [general instructions for setting up an Azure Digital Twins endpoint](how-to-manage-routes.md#create-the-endpoint)).
119
+
Managed identities are added to an endpoint by adding a `--auth-type` parameter to the `az dt endpoint create` command that's used to create the endpoint. (For more information about this command, see its [reference documentation](/cli/azure/dt/endpoint/create) or the [general instructions for setting up an Azure Digital Twins endpoint](how-to-manage-routes.md#create-the-endpoint)).
120
120
121
-
To create an endpoint that uses identity-based authentication, specify the `IdentityBased` authentication type with the `--auth-type` parameter. The example below illustrates this functionality for an Event Hubs endpoint.
121
+
Use the CLI command below for your chosen type of managed identity.
122
+
123
+
#### System-assigned identity command
124
+
125
+
To create an endpoint that uses system-assigned authentication, specify the `IdentityBased` authentication type with the `--auth-type` parameter. The example below illustrates this functionality for an Event Hubs endpoint.
To create an endpoint that uses user-assigned identity authentication, specify the user assigned identity resource ID with the `--user` parameter. The example below illustrates this functionality for an Event Hubs endpoint.
## Considerations for disabling system-managed identities
140
+
## Considerations for disabling managed identities
130
141
131
142
Because an identity is managed separately from the endpoints that use it, it's important to consider the effects that any changes to the identity or its roles can have on the endpoints in your Azure Digital Twins instance. If the identity is disabled, or a necessary role for an endpoint is removed from it, the endpoint can become inaccessible and the flow of events will be disrupted.
0 commit comments