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/iot-operations/manage-mqtt-broker/howto-configure-authorization.md
+215-3Lines changed: 215 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ ms.subservice: azure-mqtt-broker
7
7
ms.topic: how-to
8
8
ms.custom:
9
9
- ignite-2023
10
-
ms.date: 11/07/2024
10
+
ms.date: 11/08/2024
11
11
12
12
#CustomerIntent: As an operator, I want to configure authorization so that I have secure MQTT broker communications.
13
13
ms.service: azure-iot-operations
@@ -43,7 +43,7 @@ The following example shows how to create a *BrokerAuthorization* resource using
43
43
44
44
# [Bicep](#tab/bicep)
45
45
46
-
To edit the default endpoint, create a Bicep `.bicep` file with the following content. Update the settings as needed, and replace the placeholder values like `<AIO_INSTANCE_NAME>` with your own.
46
+
To edit an authorization policy, create a Bicep `.bicep` file with the following content. Update the settings as needed, and replace the placeholder values like `<AIO_INSTANCE_NAME>` with your own.
@@ -482,14 +482,59 @@ Since clients have access to the topic, you can specify keys and access levels u
482
482
483
483
The `stateStoreResources` section format consists of access level, a pattern indicator, and the pattern.
484
484
485
+
# [Portal](#tab/portal)
486
+
487
+
Include the `stateStoreResources` section in the rules for your authorization policy.
488
+
489
+
```json
490
+
"stateStoreResources": [
491
+
{
492
+
"method": "", // Values: read, write, readwrite
493
+
"keyType": "", //Values: string, pattern, binary. Default is pattern
494
+
"keys": [
495
+
// List of patterns to match
496
+
]
497
+
},
498
+
]
499
+
```
500
+
501
+
# [Bicep](#tab/bicep)
502
+
503
+
In Bicep, include the `stateStoreResources` section in your authorization policy.
504
+
505
+
```bicep
506
+
stateStoreResources: [
507
+
{
508
+
method: '' // Values: read, write, readwrite
509
+
keyType: '' //Values: string, pattern, binary. Default is pattern
510
+
keys: [
511
+
// List of patterns to match
512
+
]
513
+
}
514
+
{
515
+
method: 'ReadWrite'
516
+
keyType: 'Binary'
517
+
keys: [
518
+
'xxxxxxxxxxxxxxxxxxxx'
519
+
]
520
+
}
521
+
]
522
+
```
523
+
524
+
# [Kubernetes](#tab/kubernetes)
525
+
526
+
In your custom resource definition, include the `stateStoreResources` section in your authorization policy.
527
+
485
528
``` yaml
486
529
stateStoreResources:
487
530
- method: # Values: read, write, readwrite
488
531
keyType: # Values: string, pattern, binary. Default is pattern
489
532
keys:
490
-
- # List of patterns to match.
533
+
- # List of patterns to match
491
534
```
492
535
536
+
---
537
+
493
538
The `method` field specifies the access level.
494
539
- Read access is specified with `read`, write access with `write`, and both with `readwrite`.
495
540
- Access level is required.
@@ -514,6 +559,172 @@ The `keys` field specifies the keys to match. The keys can be specified as *Glob
514
559
515
560
Here's an example of how you might author your state store resources:
516
561
562
+
# [Portal](#tab/portal)
563
+
564
+
1. In the Azure portal, navigate to your IoT Operations instance.
565
+
1. Under **Azure IoT Operations resources**, select **MQTT Broker**.
566
+
1. Select the **Authorization** tab.
567
+
1. Choose an existing authentication policy or create a new one by selecting **Create authorization policy**.
568
+
1. In the **Rules** field, add a configuration similar to the following:
569
+
570
+
:::image type="content" source="media/howto-configure-authorization/state-store-resources.png" alt-text="Screenshot using the Azure portal to configure a broker policy with state store resources.":::
To edit an authorization policy, create a Bicep `.bicep` file with the following content. Update the settings as needed, and replace the placeholder values like `<AIO_INSTANCE_NAME>` with your own.
0 commit comments