Skip to content

Commit 6a338e1

Browse files
Merge pull request #298119 from PatAltimore/patricka-release-2504-aio
Add CLI tab and feedback
2 parents a87a7c7 + aa53b38 commit 6a338e1

File tree

3 files changed

+269
-9
lines changed

3 files changed

+269
-9
lines changed

articles/iot-operations/connect-to-cloud/howto-configure-dataflow-profile.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ ms.date: 04/09/2025
1717

1818
Data flow profiles can be used to group data flows together so that they share the same configuration. You can create multiple data flow profiles to manage sets of different data flow configurations.
1919

20-
The most important setting is the instance count, which determines the number of instances that run the data flows. For example, you might have a data flow profile with a single instance for development and testing, and another profile with multiple instances for production. Or, you might use a data flow profile with low instance count for low-throughput data flows and a profile with high instance count for high-throughput data flows. Similarly, you can create a data flow profile with different diagnostic settings for debugging purposes.
20+
The most important setting is the instance count. For a given data flow, the instance count determines the number of copies that run on your cluster. For example, you might have a data flow profile with a single instance for development and testing, and another profile with multiple instances for production. Or, you might use a data flow profile with low instance count for low-throughput data flows and a profile with high instance count for high-throughput data flows. Similarly, you can create a data flow profile with different diagnostic settings for debugging purposes.
2121

2222
## Default data flow profile
2323

24-
A data flow profile named *default* is created when Azure IoT Operations is deployed. This data flow profile has a single instance count. You can use this data flow profile to get started with Azure IoT Operations.
24+
A data flow profile named *default* is created when Azure IoT Operations is deployed. You can use this data flow profile to get started with Azure IoT Operations.
2525

2626
# [Portal](#tab/portal)
2727

@@ -122,7 +122,7 @@ spec:
122122
123123
## Scaling
124124
125-
You can scale the data flow profile to adjust the number of instances that run the data flows. Increasing the instance count can improve the throughput of the data flows by creating multiple clients to process the data. When using data flows with cloud services that have rate limits per client, increasing the instance count can help you stay within the rate limits.
125+
You can scale the data flow profile to adjust the number of instances that run the data flows. For a given data flow, instance count is the number of copies that run on your cluster. Increasing the instance count can improve the throughput of the data flows by creating multiple clients to process the data. When using data flows with cloud services that have rate limits per client, increasing the instance count can help you stay within the rate limits.
126126
127127
Scaling can also improve the resiliency of the data flows by providing redundancy in case of failures.
128128
@@ -157,7 +157,7 @@ spec:
157157
158158
## Diagnostic settings
159159
160-
You can configure other diagnostics settings for a data flow profile such as log level and metrics interval.
160+
You can configure other diagnostics settings for a data flow profile such as log level.
161161
162162
In most cases, the default settings are sufficient. However, you can override the log level or other settings for debugging.
163163

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

Lines changed: 263 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ ms.subservice: azure-mqtt-broker
88
ms.topic: how-to
99
ms.custom:
1010
- ignite-2023
11-
ms.date: 02/28/2025
11+
ms.date: 04/10/2025
1212

1313
#CustomerIntent: As an operator, I want to configure authentication so that I have secure MQTT broker communications.
1414
---
@@ -47,6 +47,14 @@ Azure IoT Operations deploys a default BrokerAuthentication resource named `defa
4747

4848
To add new authentication methods, select **Add method**.
4949

50+
# [Azure CLI](#tab/cli)
51+
52+
Use the [az iot ops broker authn show](/cli/azure/iot/ops/broker/authn#az-iot-ops-broker-authn-show) command to view the local MQTT broker default authentication policy.
53+
54+
```azurecli
55+
az iot ops broker authn show --resource-group <ResourceGroupName> --instance <AioInstanceName> --broker default --name default
56+
```
57+
5058
# [Bicep](#tab/bicep)
5159

5260
To edit the default endpoint, create a Bicep `.bicep` file with the following content. Update the settings as needed. Replace the placeholder values like `<AIO_INSTANCE_NAME>` with your own.
@@ -184,6 +192,81 @@ To add an authentication method to a policy:
184192

185193
:::image type="content" source="media/howto-configure-authentication/create-authentication-policy.png" alt-text="Screenshot that shows using the Azure portal to add an MQTT broker authentication policy method.":::
186194

195+
# [Azure CLI](#tab/cli)
196+
197+
Use the [az iot ops broker authn apply](/cli/azure/iot/ops/broker/authn#az-iot-ops-broker-authn-apply) command to create or change an MQTT broker authentication policy.
198+
199+
```azurecli
200+
az iot ops broker authn apply --resource-group <ResourceGroupName> --instance <AioInstanceName> --broker <BrokerName> --name <AuthenticationResourceName> --config-file <ConfigFilePathAndName>
201+
```
202+
203+
The `--config-file` parameter is the path and file name of a JSON configuration file containing the resource properties.
204+
205+
In this example, assume a configuration file named `my-authn-policy.json` with the following content stored in the user's home directory:
206+
207+
```json
208+
{
209+
"authenticationMethods": [
210+
{
211+
"customSettings": {
212+
"auth": {
213+
"x509": {
214+
"secretRef": "custom-auth-client-cert"
215+
}
216+
},
217+
"caCertConfigMap": "custom-auth-ca",
218+
"endpoint": "https://auth-server-template",
219+
"headers": {
220+
"header_key": "header_value"
221+
}
222+
},
223+
"method": "Custom"
224+
},
225+
{
226+
"method": "ServiceAccountToken",
227+
"serviceAccountTokenSettings": {
228+
"audiences": [
229+
"my-audience"
230+
]
231+
}
232+
},
233+
{
234+
"method": "X509",
235+
"x509Settings": {
236+
"authorizationAttributes": {
237+
"intermediate": {
238+
"attributes": {
239+
"city": "seattle",
240+
"foo": "bar"
241+
},
242+
"subject": "CN = Contoso Intermediate CA"
243+
},
244+
"root": {
245+
"attributes": {
246+
"organization": "contoso"
247+
},
248+
"subject": "CN = Contoso Root CA Cert, OU = Engineering, C = US"
249+
},
250+
"smartfan": {
251+
"attributes": {
252+
"building": "17"
253+
},
254+
"subject": "CN = smart-fan"
255+
}
256+
},
257+
"trustedClientCaCert": "client-ca"
258+
}
259+
}
260+
]
261+
}
262+
```
263+
264+
An example command to create a new authentication policy named `my-policy` is as follows:
265+
266+
```azurecli
267+
az iot ops broker authn apply --resource-group myResourceGroupName --instance myAioInstanceName --broker default --name my-policy --config-file ~/my-authn-policy.json
268+
```
269+
187270
# [Bicep](#tab/bicep)
188271

189272
```bicep
@@ -427,6 +510,37 @@ After the trusted CA certificate is imported, enable X.509 client authentication
427510
1. Optionally, add authorization attributes for clients by using X.509 certificates. To learn more, see [Certificate attributes for authorization](#optional-certificate-attributes-for-authorization).
428511
1. Select **Apply** to save the changes.
429512
513+
# [Azure CLI](#tab/cli)
514+
515+
Use the [az iot ops broker authn apply](/cli/azure/iot/ops/broker/authn#az-iot-ops-broker-authn-apply) command to create or change an MQTT broker authentication policy.
516+
517+
```azurecli
518+
az iot ops broker authn apply --resource-group <ResourceGroupName> --instance <AioInstanceName> --broker <BrokerName> --name <AuthenticationResourceName> --config-file <ConfigFilePathAndName>
519+
```
520+
521+
The `--config-file` parameter is the path and file name of a JSON configuration file containing the resource properties.
522+
523+
In this example, assume a configuration file named `my-authn-policy.json` with an X.509 method is stored in the user's home directory:
524+
525+
```json
526+
{
527+
"authenticationMethods": [
528+
{
529+
"method": "X509",
530+
"x509Settings": {
531+
"trustedClientCaCert": "client-ca"
532+
}
533+
}
534+
]
535+
}
536+
```
537+
538+
An example command to create a new authentication policy named `my-policy` with an X.509 method is as follows:
539+
540+
```azurecli
541+
az iot ops broker authn apply --resource-group myResourceGroupName --instance myAioInstanceName --broker default --name my-policy --config-file ~/my-authn-policy.json
542+
```
543+
430544
# [Bicep](#tab/bicep)
431545

432546
```bicep
@@ -470,7 +584,6 @@ resource myBrokerAuthentication 'Microsoft.IoTOperations/instances/brokers/authe
470584
]
471585
}
472586
}
473-
474587
```
475588

476589
Replace `<TRUSTED_CA_CONFIGMAP>` with the name of the ConfigMap that contains the trusted CA certificate. For example, use `client-ca`.
@@ -534,7 +647,59 @@ In the Azure portal, when you configure the X.509 authentication method, add the
534647
}
535648
}
536649
```
537-
650+
651+
# [Azure CLI](#tab/cli)
652+
653+
Use the [az iot ops broker authn apply](/cli/azure/iot/ops/broker/authn#az-iot-ops-broker-authn-apply) command to create or change an MQTT broker authentication policy.
654+
655+
```azurecli
656+
az iot ops broker authn apply --resource-group <ResourceGroupName> --instance <AioInstanceName> --broker <BrokerName> --name <AuthenticationResourceName> --config-file <ConfigFilePathAndName>
657+
```
658+
659+
The `--config-file` parameter is the path and file name of a JSON configuration file containing the resource properties.
660+
661+
In this example, assume a configuration file named `my-authn-policy.json` with an X.509 method and certificate properties is stored in the user's home directory
662+
663+
```json
664+
{
665+
"authenticationMethods": [
666+
{
667+
"method": "X509",
668+
"x509Settings": {
669+
"authorizationAttributes": {
670+
"intermediate": {
671+
"attributes": {
672+
"city": "seattle",
673+
"foo": "bar"
674+
},
675+
"subject": "CN = Contoso Intermediate CA"
676+
},
677+
"root": {
678+
"attributes": {
679+
"organization": "contoso"
680+
},
681+
"subject": "CN = Contoso Root CA Cert, OU = Engineering, C = US"
682+
},
683+
"smartfan": {
684+
"attributes": {
685+
"building": "17"
686+
},
687+
"subject": "CN = smart-fan"
688+
}
689+
},
690+
"trustedClientCaCert": "client-ca"
691+
}
692+
}
693+
]
694+
}
695+
```
696+
697+
An example command to create a new authentication policy named `my-policy` is as follows:
698+
699+
```azurecli
700+
az iot ops broker authn apply --resource-group myResourceGroupName --instance myAioInstanceName --broker default --name my-policy --config-file ~/my-authn-policy.json
701+
```
702+
538703
# [Bicep](#tab/bicep)
539704

540705
```bicep
@@ -708,6 +873,39 @@ Modify the `authenticationMethods` setting in a BrokerAuthentication resource to
708873

709874
:::image type="content" source="media/howto-configure-authentication/sat-method.png" alt-text="Screenshot that shows using the Azure portal to set the MQTT broker SAT authentication method.":::
710875

876+
# [Azure CLI](#tab/cli)
877+
878+
Use the [az iot ops broker authn apply](/cli/azure/iot/ops/broker/authn#az-iot-ops-broker-authn-apply) command to create or change an MQTT broker authentication policy.
879+
880+
```azurecli
881+
az iot ops broker authn apply --resource-group <ResourceGroupName> --instance <AioInstanceName> --broker <BrokerName> --name <AuthenticationResourceName> --config-file <ConfigFilePathAndName>
882+
```
883+
884+
The `--config-file` parameter is the path and file name of a JSON configuration file containing the resource properties.
885+
886+
In this example, assume a configuration file named `my-authn-policy.json` with a Kubernetes SAT method is stored in the user's home directory:
887+
888+
```json
889+
{
890+
"authenticationMethods": [
891+
{
892+
"method": "ServiceAccountToken",
893+
"serviceAccountTokenSettings": {
894+
"audiences": [
895+
"my-audience"
896+
]
897+
}
898+
}
899+
]
900+
}
901+
```
902+
903+
An example command to create a new authentication policy named `my-policy` with a Kubernetes SAT method is as follows:
904+
905+
```azurecli
906+
az iot ops broker authn apply --resource-group myResourceGroupName --instance myAioInstanceName --broker default --name my-policy --config-file ~/my-authn-policy.json
907+
```
908+
711909
# [Bicep](#tab/bicep)
712910

713911
```bicep
@@ -838,6 +1036,54 @@ Modify the **Authentication methods** setting in a BrokerAuthentication resource
8381036

8391037
:::image type="content" source="media/howto-configure-authentication/custom-method.png" alt-text="Screenshot that shows using the Azure portal to set the MQTT broker Custom authentication method.":::
8401038

1039+
# [Azure CLI](#tab/cli)
1040+
1041+
Use the [az iot ops broker authn apply](/cli/azure/iot/ops/broker/authn#az-iot-ops-broker-authn-apply) command to create or change an MQTT broker authentication policy.
1042+
1043+
```azurecli
1044+
az iot ops broker authn apply --resource-group <ResourceGroupName> --instance <AioInstanceName> --broker <BrokerName> --name <AuthenticationResourceName> --config-file <ConfigFilePathAndName>
1045+
```
1046+
1047+
The `--config-file` parameter is the path and file name of a JSON configuration file containing the resource properties.
1048+
1049+
In this example, assume a configuration file named `my-authn-policy.json` with a custom method is stored in the user's home directory:
1050+
1051+
```json
1052+
{
1053+
"authenticationMethods": [
1054+
{
1055+
"method": "Custom",
1056+
"customSettings": {
1057+
"auth": {
1058+
"x509": {
1059+
"secretRef": "custom-auth-client-cert"
1060+
}
1061+
},
1062+
"caCertConfigMap": "custom-auth-ca",
1063+
"endpoint": "https://auth-server-template",
1064+
"headers": {
1065+
"header_key": "header_value"
1066+
}
1067+
}
1068+
},
1069+
{
1070+
"method": "ServiceAccountToken",
1071+
"serviceAccountTokenSettings": {
1072+
"audiences": [
1073+
"my-audience"
1074+
]
1075+
}
1076+
}
1077+
]
1078+
}
1079+
```
1080+
1081+
An example command to create a new authentication policy named `my-policy` with a Kubernetes SAT method is as follows:
1082+
1083+
```azurecli
1084+
az iot ops broker authn apply --resource-group myResourceGroupName --instance myAioInstanceName --broker default --name my-policy --config-file ~/my-authn-policy.json
1085+
```
1086+
8411087
# [Bicep](#tab/bicep)
8421088

8431089
```bicep
@@ -930,6 +1176,20 @@ For testing, you can disable authentication for a broker listener port. We don't
9301176
1. Select the broker listener you want to edit from the list.
9311177
1. On the port where you want to disable authentication, select **None** in the authentication dropdown.
9321178

1179+
# [Azure CLI](#tab/cli)
1180+
1181+
Use the [az iot ops broker listener port add](/cli/azure/iot/ops/broker/listener#az-iot-ops-broker-listener-port-add) command to disable authentication for a port. To disable authentication, don't include the `--authn-ref` parameter.
1182+
1183+
```azurecli
1184+
az iot ops broker listener port add --resource-group <ResourceGroupName> --instance <AioInstanceName> --broker default --name <ListenerName> --port <ListenerServicePort>
1185+
```
1186+
1187+
The following example disables authentication for port 8884 to the listener named `aio-broker-loadbalancer`:
1188+
1189+
```azurecli
1190+
az iot ops broker listener port add --resource-group myResourceGroupName --instance myAioInstanceName --broker default --name aio-broker-loadbalancer --port 8884
1191+
```
1192+
9331193
# [Bicep](#tab/bicep)
9341194

9351195
To disable authentication, omit `authenticationRef` in the `ports` setting of your BrokerListener resource.

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -620,7 +620,7 @@ The following example is a BrokerListener resource that enables TLS on port 8884
620620

621621
# [Azure CLI](#tab/cli)
622622

623-
Use the [az iot ops broker listener port add](/cli/azure/iot/ops/broker/listener#az-iot-ops-broker-listener-port-add) command to add or change a TCP port configuration to an MQTT broker listener service.
623+
Use the [az iot ops broker listener port add](/cli/azure/iot/ops/broker/listener#az-iot-ops-broker-listener-port-add) command to add or change a TCP port configuration to an MQTT broker listener service. If the listener exists, the command updates the existing listener. If the listener doesn't exist, the command creates a new listener.
624624

625625
```azurecli
626626
az iot ops broker listener port add --resource-group <ResourceGroupName> --instance <AioInstanceName> --broker default --name <ListenerName> --port <ListenerServicePort> --authn-ref default --tls-issuer-ref name=<IssuerName> kind=<IssuerKind> group=<IssuerGroup>
@@ -838,7 +838,7 @@ The following example shows a BrokerListener resource that enables TLS on port 8
838838

839839
# [Azure CLI](#tab/cli)
840840

841-
Use the [az iot ops broker listener port add](/cli/azure/iot/ops/broker/listener#az-iot-ops-broker-listener-port-add) command to add or change the port configuration for an MQTT broker listener service.
841+
Use the [az iot ops broker listener port add](/cli/azure/iot/ops/broker/listener#az-iot-ops-broker-listener-port-add) command to add or change a TCP port configuration to an MQTT broker listener service. If the listener exists, the command updates the existing listener. If the listener doesn't exist, the command creates a new listener.
842842

843843
```azurecli
844844
az iot ops broker listener port add --resource-group <ResourceGroupName> --instance <AioInstanceName> --broker default --listener <ListenerName> --port <ListenerServicePort> --authn-ref default --tls-man-secret-ref <SecretReferenceName>

0 commit comments

Comments
 (0)