Skip to content

Commit 7751379

Browse files
committed
standardize user-assigned and system-assigned
1 parent 71b742d commit 7751379

File tree

2 files changed

+47
-33
lines changed

2 files changed

+47
-33
lines changed

articles/iot-operations/connect-to-cloud/howto-configure-kafka-endpoint.md

Lines changed: 27 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -33,18 +33,22 @@ First, [create a Kafka-enabled Azure Event Hubs namespace](../../event-hubs/even
3333

3434
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.
3535

36-
### Assign the managed identity to the Event Hubs namespace
36+
### Assign permission to managed identity
3737

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.
3939

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).
4448

4549
### Create dataflow endpoint
4650

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.
4852

4953
# [Portal](#tab/portal)
5054

@@ -59,7 +63,7 @@ Finally, create the *DataflowEndpoint* resource. Use your own values to replace
5963
| -------------------- | ------------------------------------------------------------------------------------------------- |
6064
| Name | The name of the dataflow endpoint. |
6165
| 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*. |
6367

6468
1. Select **Apply** to provision the endpoint.
6569

@@ -367,13 +371,16 @@ The secret must be in the same namespace as the Kafka dataflow endpoint. The sec
367371

368372
### System-assigned managed identity
369373

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:
371375

372376
1. In Azure portal, go to your Azure IoT Operations instance and select **Overview**.
373377
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.
377384

378385
# [Portal](#tab/portal)
379386

@@ -435,9 +442,15 @@ kafkaSettings:
435442

436443
### User-assigned managed identity
437444

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.
439452

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.
441454

442455
# [Portal](#tab/portal)
443456

articles/iot-operations/connect-to-cloud/howto-configure-mqtt-endpoint.md

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -220,20 +220,18 @@ In order for dataflows to send or receive messages to Event Grid MQTT broker, yo
220220
221221
To quickly get started and for testing, you can create a topic space with the wildcard topic `#` as the topic template.
222222

223-
#### Assign permission to managed identity
223+
### Assign permission to managed identity
224224

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.
228226

229227
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.
230228

231229
Then, go to the Event Grid namespace > **Access control (IAM)** > **Add role assignment**.
232230

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).
234232
1. On the **Members** tab:
235233
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).
237235

238236
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.
239237

@@ -254,7 +252,7 @@ Once the Event Grid namespace is configured, you can create a dataflow endpoint
254252
| -------------------- | ------------------------------------------------------------------------------------------------- |
255253
| Name | The name of the dataflow endpoint. |
256254
| 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*. |
258256

259257
1. Select **Apply** to provision the endpoint.
260258

@@ -421,7 +419,7 @@ The following authentication methods are available for MQTT broker dataflow endp
421419

422420
Many MQTT brokers, like Event Grid, support X.509 authentication. Dataflows can present a client X.509 certificate and negotiate the TLS communication.
423421

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.
425423

426424
> [!TIP]
427425
> 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:
485483

486484
### System-assigned managed identity
487485

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:
491487

492488
1. In Azure portal, go to your Azure IoT Operations instance and select **Overview**.
493489
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.
497496

498497
# [Portal](#tab/portal)
499498

@@ -556,13 +555,15 @@ mqttSettings:
556555

557556
### User-assigned managed identity
558557

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:
560561

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.
562565

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.
566567

567568
# [Portal](#tab/portal)
568569

0 commit comments

Comments
 (0)