Skip to content

Commit 8044aa3

Browse files
committed
Remove screenshot
1 parent 668ec46 commit 8044aa3

File tree

2 files changed

+61
-63
lines changed

2 files changed

+61
-63
lines changed

articles/iot-operations/manage-mqtt-broker/howto-configure-authorization.md

Lines changed: 61 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ Because the `principals` field is a logical OR, you can further restrict access
170170

171171
# [Portal](#tab/portal)
172172

173-
In the **Broker authorization details** for your authorization policy, use the following configuration:
173+
In the broker authorization rules for your authorization policy, use the following configuration:
174174

175175
```json
176176
[
@@ -207,6 +207,8 @@ In the **Broker authorization details** for your authorization policy, use the f
207207

208208
# [Bicep](#tab/bicep)
209209

210+
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.
211+
210212
```bicep
211213
param aioInstanceName string = '<AIO_INSTANCE_NAME>'
212214
param customLocationName string = '<CUSTOM_LOCATION_NAME>'
@@ -331,7 +333,7 @@ As the application has an authorization attribute called `authz-sat`, there's no
331333

332334
# [Portal](#tab/portal)
333335

334-
In the **Broker authorization details** for your authorization policy, use the following configuration:
336+
In the Broker authorization rules for your authorization policy, use the following configuration:
335337

336338
```json
337339
[
@@ -370,6 +372,8 @@ In the **Broker authorization details** for your authorization policy, use the f
370372

371373
# [Bicep](#tab/bicep)
372374

375+
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.
376+
373377
```bicep
374378
param aioInstanceName string = '<AIO_INSTANCE_NAME>'
375379
param customLocationName string = '<CUSTOM_LOCATION_NAME>'
@@ -543,7 +547,7 @@ The `method` field specifies the access level.
543547

544548
The `keyType` field specifies the type of key matching.
545549
- `pattern` to use *glob* style pattern matching
546-
- `string` to do exact match, for example when a key contains characters that might be otherwise matched as a pettern (`*`, `?`, `[0-9]`)
550+
- `string` to do exact match, for example when a key contains characters that might be otherwise matched as a pattern (`*`, `?`, `[0-9]`)
547551
- `binary` to match a binary key
548552

549553
The `keys` field specifies the keys to match. The keys can be specified as *Glob* style patterns, token substitutions, or exact strings.
@@ -561,72 +565,66 @@ Here's an example of how you might author your state store resources:
561565

562566
# [Portal](#tab/portal)
563567

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.":::
568+
In the Broker authorization rules for your authorization policy, add a similar configuration:
571569

572-
```json
573-
[
570+
```json
571+
[
572+
{
573+
"brokerResources": [
574574
{
575-
"brokerResources": [
576-
{
577-
"clientIds": [
578-
"{principal.attributes.building}*"
579-
],
580-
"method": "Connect"
581-
},
582-
{
583-
"method": "Publish",
584-
"topics": [
585-
"sensors/{principal.attributes.building}/{principal.clientId}/telemetry/*"
586-
]
587-
},
588-
{
589-
"method": "Subscribe",
590-
"topics": [
591-
"commands/{principal.attributes.organization}"
592-
]
593-
}
575+
"clientIds": [
576+
"{principal.attributes.building}*"
594577
],
595-
"principals": {
596-
"attributes": [
597-
{
598-
"building": "17",
599-
"organization": "contoso"
600-
}
601-
],
602-
"usernames": [
603-
"temperature-sensor",
604-
"humidity-sensor"
605-
]
606-
},
607-
"stateStoreResources": [
608-
{
609-
"method": "Read",
610-
"keyType": "Pattern",
611-
"keys": [
612-
"myreadkey",
613-
"myotherkey?",
614-
"mynumerickeysuffix[0-9]",
615-
"clients/{principal.clientId}/*"
616-
]
617-
},
618-
{
619-
"method": "ReadWrite",
620-
"keyType": "Binary",
621-
"keys": [
622-
"xxxxxxxxxxxxxxxxxxxx"
623-
]
624-
}
578+
"method": "Connect"
579+
},
580+
{
581+
"method": "Publish",
582+
"topics": [
583+
"sensors/{principal.attributes.building}/{principal.clientId}/telemetry/*"
584+
]
585+
},
586+
{
587+
"method": "Subscribe",
588+
"topics": [
589+
"commands/{principal.attributes.organization}"
590+
]
591+
}
592+
],
593+
"principals": {
594+
"attributes": [
595+
{
596+
"building": "17",
597+
"organization": "contoso"
598+
}
599+
],
600+
"usernames": [
601+
"temperature-sensor",
602+
"humidity-sensor"
603+
]
604+
},
605+
"stateStoreResources": [
606+
{
607+
"method": "Read",
608+
"keyType": "Pattern",
609+
"keys": [
610+
"myreadkey",
611+
"myotherkey?",
612+
"mynumerickeysuffix[0-9]",
613+
"clients/{principal.clientId}/*"
614+
]
615+
},
616+
{
617+
"method": "ReadWrite",
618+
"keyType": "Binary",
619+
"keys": [
620+
"xxxxxxxxxxxxxxxxxxxx"
625621
]
626622
}
627623
]
628-
```
629-
624+
}
625+
]
626+
```
627+
630628
# [Bicep](#tab/bicep)
631629

632630
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

Comments
 (0)