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
Next, [create an event hub in the namespace](../../event-hubs/event-hubs-create.md#create-an-event-hub). Each individual event hub corresponds to a Kafka topic. You can create multiple event hubs in the same namespace to represent multiple Kafka topics.
35
35
36
-
### Assign the managed identity to the Event Hubs namespace
36
+
### Assign permission to managed identity
37
37
38
-
To configure a dataflow endpoint for a Kafka endpoint, we recommend using the managed identity of the Azure Arc-enabled Kubernetes cluster. This approach is secure and eliminates the need for secret management.
38
+
Now that the Azure Event Hubs namespace and event hub is created, you need to assign a role to the Azure IoT Operations managed identity that grants permission to send or receive messages to the event hub.
39
39
40
-
1. In Azure portal, go to your Azure IoT Operations instance and select **Overview**.
41
-
1. Copy the name of the extension listed after **Azure IoT Operations Arc extension**. For example, *azure-iot-operations-xxxx7*.
42
-
1. Search for the managed identity in the Azure portal by using the name of the extension. For example, search for *azure-iot-operations-xxxx7*.
43
-
1. Assign the Azure IoT Operations Arc extension managed identity to the Event Hubs namespace with the `Azure Event Hubs Data Sender` or `Azure Event Hubs Data Receiver` role.
40
+
If using system-assigned managed identity, in Azure portal, go to your Azure IoT Operations instance and select **Overview**. Copy the name of the extension listed after **Azure IoT Operations Arc extension**. For example, *azure-iot-operations-xxxx7*. Your system-assigned managed identity can be found using the same name of the Azure IoT Operations Arc extension.
41
+
42
+
Then, go to the Event Hubs namespace > **Access control (IAM)** > **Add role assignment**.
43
+
44
+
1. On the **Role** tab select an appropriate role like `Azure Event Hubs Data Sender` or `Azure Event Hubs Data Receiver` role. This gives the managed identity the necessary permissions to send or receive messages for all event hubs in the namespace. To learn more, see [Authenticate an application with Microsoft Entra ID to access Event Hubs resources](../../event-hubs/authenticate-application.md#built-in-roles-for-azure-event-hubs).
45
+
1. On the **Members** tab:
46
+
1. If using system-assigned managed identity, for **Assign access to**, select **User, group, or service principal** option, then select **+ Select members** and search for the name of the Azure IoT Operations Arc extension.
47
+
1. If using user-assigned managed identity, for **Assign access to**, select **Managed identity** option, then select **+ Select members** and search for your [user-assigned managed identity set up for cloud connections](../deploy-iot-ops/howto-enable-secure-settings.md#set-up-a-user-assigned-managed-identity-for-cloud-connections).
44
48
45
49
### Create dataflow endpoint
46
50
47
-
Finally, create the *DataflowEndpoint* resource. Use your own values to replace the placeholder values like `<ENDPOINT_NAME>`.
51
+
Once the Azure Event Hubs namespace and event hub is configured, you can create a dataflow endpoint for the event hub.
48
52
49
53
# [Portal](#tab/portal)
50
54
@@ -59,7 +63,7 @@ Finally, create the *DataflowEndpoint* resource. Use your own values to replace
| Host | The hostname of the Kafka broker in the format `<NAMEPSACE>.servicebus.windows.net:9093`. Include port number `9093` in the host setting for Event Hubs. |
62
-
| Authentication method| The method used for authentication. Choose *System assigned managed identity*|
66
+
| Authentication method| The method used for authentication. We recommend that you choose *System assigned managed identity* or *User assigned managed identity*.|
63
67
64
68
1. Select **Apply** to provision the endpoint.
65
69
@@ -367,13 +371,16 @@ The secret must be in the same namespace as the Kafka dataflow endpoint. The sec
367
371
368
372
### System-assigned managed identity
369
373
370
-
To use system-assigned managed identity for authentication, assign a role to the Azure IoT Operation managed identity that grants permission to send and receive messages from Event Hubs.
374
+
Before you configure the dataflow endpoint, assign a role to the Azure IoT Operations managed identity that grants permission to connect to the cloud resource:
371
375
372
376
1. In Azure portal, go to your Azure IoT Operations instance and select **Overview**.
373
377
1. Copy the name of the extension listed after **Azure IoT Operations Arc extension**. For example, *azure-iot-operations-xxxx7*.
374
-
1. Search for the managed identity in the Azure portal by using the name of the extension. For example, search for *azure-iot-operations-xxxx7*.
375
-
1. Assign a role to the Azure IoT Operations Arc extension managed identity that grants permission to send and receive messages such as *Azure Event Hubs Data Owner*, *Azure Event Hubs Data Sender*, or *Azure Event Hubs Data Receiver*. To learn more, see [Authenticate an application with Microsoft Entra ID to access Event Hubs resources](../../event-hubs/authenticate-application.md#built-in-roles-for-azure-event-hubs).
376
-
1. Specify the managed identity authentication method in the Kafka settings. In most cases, you don't need to specify other settings.
378
+
1. Your system-assigned managed identity can be found using the same name of the Azure IoT Operations Arc extension.
379
+
1. Go to the cloud resource you need to grant permissions > **Access control (IAM)** > **Add role assignment**.
380
+
1. On the **Role** tab select an appropriate role.
381
+
1. On the **Members** tab, for **Assign access to**, select **User, group, or service principal** option, then select **+ Select members** and search for the name of the Azure IoT Operations Arc extension. For example, *azure-iot-operations-xxxx7*.
382
+
383
+
Then, configure the dataflow endpoint with system-assigned managed identity settings.
377
384
378
385
# [Portal](#tab/portal)
379
386
@@ -435,9 +442,15 @@ kafkaSettings:
435
442
436
443
### User-assigned managed identity
437
444
438
-
To use user-managed identity for authentication, you must first deploy Azure IoT Operations with secure settings enabled. To learn more, see [Enable secure settings in Azure IoT Operations deployment](../deploy-iot-ops/howto-enable-secure-settings.md).
445
+
To use user-assigned managed identity for authentication, you must first deploy Azure IoT Operations with secure settings enabled. Then you need to [set up a user-assigned managed identity for cloud connections](../deploy-iot-ops/howto-enable-secure-settings.md#set-up-a-user-assigned-managed-identity-for-cloud-connections). To learn more, see [Enable secure settings in Azure IoT Operations deployment](../deploy-iot-ops/howto-enable-secure-settings.md).
446
+
447
+
Before you configure the dataflow endpoint, assign a role to the user-assigned managed identity that grants permission to connect to the cloud resource:
448
+
449
+
1. Go to the cloud resource you need to grant permissions > **Access control (IAM)** > **Add role assignment**.
450
+
1. On the **Role** tab select an appropriate role.
451
+
1. On the **Members** tab, for **Assign access to**, select **Managed identity** option, then select **+ Select members** and search for your user-assigned managed identity.
439
452
440
-
Then, specify the user-assigned managed identity authentication method in the Kafka settings along with the client ID and tenant ID of the managed identity.
453
+
Then, configure the dataflow endpoint with user-assigned managed identity settings.
Copy file name to clipboardExpand all lines: articles/iot-operations/connect-to-cloud/howto-configure-mqtt-endpoint.md
+20-19Lines changed: 20 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -220,20 +220,18 @@ In order for dataflows to send or receive messages to Event Grid MQTT broker, yo
220
220
221
221
To quickly get started and for testing, you can create a topic space with the wildcard topic `#` as the topic template.
222
222
223
-
#### Assign permission to managed identity
223
+
### Assign permission to managed identity
224
224
225
-
Now that the topic space is created, you need to assign the managed identity of the Azure IoT Operations Arc extension to the Event Grid namespace or topic space.
226
-
227
-
<!-- TODO: refactor or make the get managed identity / extension name an include? -->
225
+
Now that the topic space is created, you need to assign a role to the Azure IoT Operations managed identity that grants permission to send or receive messages to the Event Grid MQTT broker.
228
226
229
227
If using system-assigned managed identity, in Azure portal, go to your Azure IoT Operations instance and select **Overview**. Copy the name of the extension listed after **Azure IoT Operations Arc extension**. For example, *azure-iot-operations-xxxx7*. Your system-assigned managed identity can be found using the same name of the Azure IoT Operations Arc extension.
230
228
231
229
Then, go to the Event Grid namespace > **Access control (IAM)** > **Add role assignment**.
232
230
233
-
1. On the **Role** tab select an appropriate role like `EventGrid TopicSpaces Publisher` or `EventGrid TopicSpaces Subscriber`. This gives the managed identity the necessary permissions to send or receive messages for all topic spaces in the namespace.
231
+
1. On the **Role** tab select an appropriate role like `EventGrid TopicSpaces Publisher` or `EventGrid TopicSpaces Subscriber`. This gives the managed identity the necessary permissions to send or receive messages for all topic spaces in the namespace. To learn more, see [Microsoft Entra JWT authentication and Azure RBAC authorization to publish or subscribe MQTT messages](../../event-grid/mqtt-client-microsoft-entra-token-and-rbac.md#authorization-to-grant-access-permissions).
234
232
1. On the **Members** tab:
235
233
1. If using system-assigned managed identity, for **Assign access to**, select **User, group, or service principal** option, then select **+ Select members** and search for the name of the Azure IoT Operations Arc extension.
236
-
1. If using user-assigned managed identity, for **Assign access to**, select **Managed identity** option, then select **+ Select members** and search for your previously created user-assigned managed identity.
234
+
1. If using user-assigned managed identity, for **Assign access to**, select **Managed identity** option, then select **+ Select members** and search for your [user-assigned managed identity set up for cloud connections](../deploy-iot-ops/howto-enable-secure-settings.md#set-up-a-user-assigned-managed-identity-for-cloud-connections).
237
235
238
236
Alternatively, you can assign the role at the topic space level. Go to the topic space > **Access control (IAM)** > **Add role assignment**. Assign the managed identity with an appropriate role like `EventGrid TopicSpaces Publisher` or `EventGrid TopicSpaces Subscriber`. This gives the managed identity the necessary permissions to send or receive messages for the specific topic space.
239
237
@@ -254,7 +252,7 @@ Once the Event Grid namespace is configured, you can create a dataflow endpoint
| Host | The hostname and port of the Event Grid MQTT broker. Use the format `<NAMESPACE>.<REGION>-1.ts.eventgrid.azure.net:8883` |
257
-
| Authentication method | The method used for authentication. Choose *System assigned managed identity*, or *User assigned managed identity*. |
255
+
| Authentication method | The method used for authentication. We recommend that you choose *System assigned managed identity* or *User assigned managed identity*. |
258
256
259
257
1. Select **Apply** to provision the endpoint.
260
258
@@ -421,7 +419,7 @@ The following authentication methods are available for MQTT broker dataflow endp
421
419
422
420
Many MQTT brokers, like Event Grid, support X.509 authentication. Dataflows can present a client X.509 certificate and negotiate the TLS communication.
423
421
424
-
To use with dataflows, the certificate and private key must in PEM format and not password protected.
422
+
To use with dataflows, the certificate and private key must be in PEM format and not password protected.
425
423
426
424
> [!TIP]
427
425
> PEM format is a common format for certificates and keys. Certificates and keys in PEM format are base64-encoded ASCII files with a headers that look like `-----BEGIN CERTIFICATE-----` and `-----BEGIN EC PRIVATE KEY----`
@@ -485,15 +483,16 @@ mqttSettings:
485
483
486
484
### System-assigned managed identity
487
485
488
-
To use system-assigned managed identity for authentication, you don't need to create a secret. The system-assigned managed identity is used to authenticate with the MQTT broker.
489
-
490
-
Before you configure the endpoint, make sure that the Azure IoT Operations system-assigned managed identity has the necessary permissions to connect to the MQTT broker.
486
+
Before you configure the dataflow endpoint, assign a role to the Azure IoT Operations managed identity that grants permission to connect to the cloud resource:
491
487
492
488
1. In Azure portal, go to your Azure IoT Operations instance and select **Overview**.
493
489
1. Copy the name of the extension listed after **Azure IoT Operations Arc extension**. For example, *azure-iot-operations-xxxx7*.
494
-
1. Your system-assigned managed identity can be found using the same name of the Azure IoT Operations Arc extension. For example, with Azure Event Grid MQTT broker, go to **Access Control (IAM) > Add role assignment**, and on the **Members** tab, for **Assign access to**, select **User, group, or service principal** option, then select **+ Select members** and search for *azure-iot-operations-xxxx7*.
495
-
1. Assign a role to the Azure IoT Operations Arc extension managed identity that grants permission to connect to the MQTT broker. For example, with Azure Event Grid MQTT broker, assign the managed identity to the Event Grid namespace or topic space with [an appropriate role](../../event-grid/mqtt-client-microsoft-entra-token-and-rbac.md#authorization-to-grant-access-permissions).
496
-
1. Configure the endpoint with system-assigned managed identity settings.
490
+
1. Your system-assigned managed identity can be found using the same name of the Azure IoT Operations Arc extension.
491
+
1. Go to the cloud resource you need to grant permissions > **Access control (IAM)** > **Add role assignment**.
492
+
1. On the **Role** tab select an appropriate role.
493
+
1. On the **Members** tab, for **Assign access to**, select **User, group, or service principal** option, then select **+ Select members** and search for the name of the Azure IoT Operations Arc extension. For example, *azure-iot-operations-xxxx7*.
494
+
495
+
Then, configure the dataflow endpoint with system-assigned managed identity settings.
497
496
498
497
# [Portal](#tab/portal)
499
498
@@ -556,13 +555,15 @@ mqttSettings:
556
555
557
556
### User-assigned managed identity
558
557
559
-
To use user-managed identity for authentication, you must first deploy Azure IoT Operations with secure settings enabled. To learn more, see [Enable secure settings in Azure IoT Operations deployment](../deploy-iot-ops/howto-enable-secure-settings.md).
558
+
To use user-assigned managed identity for authentication, you must first deploy Azure IoT Operations with secure settings enabled. Then you need to [set up a user-assigned managed identity for cloud connections](../deploy-iot-ops/howto-enable-secure-settings.md#set-up-a-user-assigned-managed-identity-for-cloud-connections). To learn more, see [Enable secure settings in Azure IoT Operations deployment](../deploy-iot-ops/howto-enable-secure-settings.md).
559
+
560
+
Before you configure the dataflow endpoint, assign a role to the user-assigned managed identity that grants permission to connect to the cloud resource:
560
561
561
-
Before you configure the endpoint, make sure that the user-assigned managed identity has the necessary permissions to connect to the MQTT broker.
562
+
1. Go to the cloud resource you need to grant permissions > **Access control (IAM)** > **Add role assignment**.
563
+
1. On the **Role** tab select an appropriate role.
564
+
1. On the **Members** tab, for **Assign access to**, select **Managed identity** option, then select **+ Select members** and search for your user-assigned managed identity.
562
565
563
-
1. You need to [create a user-assigned managed identity](/entra/identity/managed-identities-azure-resources/overview#how-can-i-use-managed-identities-for-azure-resources) first.
564
-
1. Assign a role to the user-assigned managed identity that grants permission to connect to the MQTT broker. For example, with Azure Event Grid MQTT broker, in the Azure portal, go to **Access Control (IAM) > Add role assignment** on the Event Grid namespace or topic space, and on the **Role** tab assign [an appropriate role](../../event-grid/mqtt-client-microsoft-entra-token-and-rbac.md#authorization-to-grant-access-permissions). Then, on the **Members** tab, for **Assign access to**, select **Managed identity** option, then select **+ Select members** and search for your previously created user-assigned managed identity.
565
-
1. Specify the user-assigned managed identity authentication method along with the client ID and tenant ID of the managed identity.
566
+
Then, configure the dataflow endpoint with user-assigned managed identity settings.
0 commit comments