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/connect-to-cloud/overview-dataflow.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ ms.author: patricka
6
6
ms.service: azure-iot-operations
7
7
ms.subservice: azure-data-flows
8
8
ms.topic: conceptual
9
-
ms.date: 10/22/2024
9
+
ms.date: 11/11/2024
10
10
11
11
#CustomerIntent: As an operator, I want to understand how I can use dataflows to connect data sources.
12
12
---
@@ -62,7 +62,7 @@ By using dataflows, you can efficiently manage your data paths. You can ensure t
62
62
63
63
Schema registry, a feature provided by Azure Device Registry, is a synchronized repository in the cloud and at the edge. The schema registry stores the definitions of messages coming from edge assets, and then exposes an API to access those schemas at the edge. Southbound connectors like the OPC UA connector can create message schemas and add them to the schema registry or customers can upload schemas to the operations experience web UI.
64
64
65
-
Dataflows uses messages schemas at both the source and destination points. For sources, message schemas can work as filters to identify the specific messages that you want to capture for a dataflow. For destinations, message schemas help to transform the message into the format expected by the destination endpoint.
65
+
Dataflows uses messages schemas to transform the message into the format expected by the destination endpoint.
66
66
67
67
For more information, see [Understand message schemas](./concept-schema-registry.md).
Copy file name to clipboardExpand all lines: articles/iot-operations/manage-mqtt-broker/howto-broker-mqtt-client-options.md
+10-5Lines changed: 10 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ ms.author: patricka
6
6
ms.topic: how-to
7
7
ms.service: azure-iot-operations
8
8
ms.subservice: azure-mqtt-broker
9
-
ms.date: 11/04/2024
9
+
ms.date: 11/11/2024
10
10
11
11
#CustomerIntent: As an operator, I want to configure MQTT broker so that I can control MQTT client interactions.
12
12
---
@@ -62,22 +62,27 @@ The subscriber queue limit has two settings:
62
62
63
63
-**Strategy**: The strategy to use when the queue is full. The two strategies are:
64
64
65
-
<!-- TODO: check for accuracy -->
66
-
-**None**: Messages aren't dropped [unless they expire](#message-expiry), and the queue can grow indefinitely. This is the default behavior.
65
+
-**None**: Messages aren't dropped [unless the session expires](#session-expiry), and the queue can grow indefinitely. This is the default behavior.
67
66
68
67
-**DropOldest**: The oldest message in the queue is dropped.
69
68
70
69
The limit only applies to the subscriber's outgoing queue, which holds messages that haven't been assigned packet IDs because the in-flight queue is full. This limit doesn't apply to the in-flight queue.
71
70
72
-
Since the limit is applied per [backend chain](./howto-configure-availability-scale.md#backend-chain), the broker can't guarantee the total number of outgoing messages for a subscriber across the entire cluster. For example, setting the length to 10,000 doesn't mean the subscriber will receive at most 10,000 messages. Instead, it could receive up to `10,000 * number of chains * number of backend workers` messages.
71
+
Since the limit is applied per [backend partition](./howto-configure-availability-scale.md#backend-chain), the broker can't guarantee the total number of outgoing messages for a subscriber across the entire cluster. For example, setting the length to 10,000 doesn't mean the subscriber will receive at most 10,000 messages. Instead, it could receive up to `10,000 * number of partitions * number of backend workers` messages.
73
72
74
73
### Slow subscribers
75
74
76
75
A slow subscriber is one that can't keep up with the incoming message rate. This can occur if the subscriber processes messages slowly, is disconnected, or is offline. The subscriber queue limit helps prevent a slow subscriber from consuming too much memory.
77
76
78
77
### Message expiry
79
78
80
-
The subscriber queue limit works with the `maxSessionExpirySeconds` setting to ensure messages aren't kept in the queue indefinitely. If a message stays in the queue longer than the maximum expiry time, it's dropped. This helps prevent slow subscribers from using too much memory.
79
+
The `maxMessageExpirySeconds` setting controls how long a message can stay in the queue before it expires. If a message stays in the queue longer than the maximum expiry time, it is marked as expired. However, expired messages are only discarded when they reach the beginning of the queue. This passive expiry mechanism helps manage memory usage by ensuring that old messages are eventually removed.
80
+
81
+
### Session expiry
82
+
83
+
The `maxSessionExpirySeconds` setting works with the subscriber queue limit to ensure that messages aren't kept in the queue indefinitely. If a session expires, all messages in the queue for that session are dropped. This helps prevent slow subscribers from using too much memory by eventually clearing the entire queue.
84
+
85
+
Both message expiry and session expiry are important for managing slow subscribers and ensuring efficient memory usage.
Copy file name to clipboardExpand all lines: articles/iot-operations/manage-mqtt-broker/howto-configure-authentication.md
+21-55Lines changed: 21 additions & 55 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ ms.subservice: azure-mqtt-broker
8
8
ms.topic: how-to
9
9
ms.custom:
10
10
- ignite-2023
11
-
ms.date: 11/02/2024
11
+
ms.date: 11/11/2024
12
12
13
13
#CustomerIntent: As an operator, I want to configure authentication so that I have secure MQTT broker communications.
14
14
---
@@ -330,7 +330,7 @@ To learn more about each of the authentication options, see the next sections fo
330
330
331
331
For more information about enabling secure settings by configuring an Azure Key Vault and enabling workload identities, see [Enable secure settings in Azure IoT Operations deployment](../deploy-iot-ops/howto-enable-secure-settings.md).
332
332
333
-
### X.509
333
+
## X.509
334
334
335
335
A trusted root CA certificate is required to validate the client certificate. Client certificates must be rooted in this CA for MQTT broker to authenticate them. Both EC and RSA keys are supported, but all certificates in the chain must use the same key algorithm. If you're importing your own CA certificates, ensure that the client certificate uses the same key algorithm as the CAs. To import a root certificate that can be used to validate client certificates, import the certificate PEM as *ConfigMap* under the key `client_ca.pem`. For example:
336
336
@@ -363,7 +363,7 @@ BinaryData
363
363
364
364
Once the trusted client root CA certificate and the certificate-to-attribute mapping are imported, enable X.509 client authentication by adding it as one of the authentication methods as part of a *BrokerAuthentication* resource linked to a TLS-enabled listener.
365
365
366
-
#### Certificate attributes for authorization
366
+
### Certificate attributes for authorization
367
367
368
368
X.509 attributes can be specified in the *BrokerAuthentication* resource, and they're used to authorize clients based on their certificate properties. The attributes are defined in the `authorizationAttributes` field.
369
369
@@ -476,13 +476,13 @@ The matching for attributes always starts from the leaf client certificate and t
476
476
477
477
Authorization rules can be applied to clients using X.509 certificates with these attributes. To learn more, see [Authorize clients that use X.509 authentication](./howto-configure-authorization.md).
478
478
479
-
#### Connect mosquitto client to MQTT broker with X.509 client certificate
479
+
### Connect mosquitto client to MQTT broker with X.509 client certificate
480
480
481
481
A client like mosquitto needs three files to be able to connect to MQTT broker with TLS and X.509 client authentication. For example:
- When mosquitto client connects to MQTT broker over TLS, it validates the server certificate. It searches for root certificates in the database to create a trusted chain to the server certificate. Because of this, the server root certificate needs to be copied into this file.
497
497
- When the MQTT broker requests a client certificate from mosquitto client, it also requires a valid certificate chain to send to the server. The `--cert` parameter tells mosquitto which certificate to send, but it's not enough. MQTT broker can't verify this certificate alone because it also needs the intermediate certificate. Mosquitto uses the database file to build the necessary certificate chain. To support this, the `cafile` must contain both the intermediate and root certificates.

502
502
@@ -514,7 +514,7 @@ The following are the steps for client authentication flow:
514
514
1. Authentication service returns decision to frontend broker.
515
515
1. The frontend broker knows the client attributes and if it's allowed to connect. If so, then the MQTT connection is completed and the client can continue to send and receive MQTT packets determined by its authorization rules.
516
516
517
-
### Kubernetes Service Account Tokens
517
+
## Kubernetes Service Account Tokens
518
518
519
519
Kubernetes Service Account Tokens (SATs) are JSON Web Tokens associated with Kubernetes Service Accounts. Clients present SATs to the MQTT broker to authenticate themselves.
520
520
@@ -528,19 +528,19 @@ Launched in Kubernetes 1.13, and becoming the default format in 1.21, bound toke
528
528
529
529
The broker verifies tokens using the [Kubernetes Token Review API](https://kubernetes.io/docs/reference/kubernetes-api/authentication-resources/token-review-v1/). Enable Kubernetes `TokenRequestProjection` feature to specify `audiences` (default since 1.21). If this feature isn't enabled, SATs can't be used.
530
530
531
-
#### Create a service account
531
+
### Create a service account
532
532
533
533
To create SATs, first create a service account. The following command creates a service account called `mqtt-client`.
Clients authentication via SAT can optionally have their SATs annotated with attributes to be used with custom authorization policies. To learn more, see [Authorize clients that use Kubernetes Service Account Tokens](./howto-configure-authentication.md).
542
542
543
-
#### Enable Service Account Token (SAT) authentication
543
+
### Enable Service Account Token (SAT) authentication
544
544
545
545
Modify the `authenticationMethods` setting in a *BrokerAuthentication* resource to specify `ServiceAccountToken` as a valid authentication method. The `audiences` specifies the list of valid audiences for tokens. Choose unique values that identify the MQTT broker service. You must specify at least one audience, and all SATs must match one of the specified audiences.
546
546
@@ -620,67 +620,33 @@ Apply your changes with `kubectl apply`. It might take a few minutes for the cha
620
620
621
621
---
622
622
623
-
#### Test SAT authentication
623
+
### Test SAT authentication
624
624
625
-
SAT authentication must be used from a client in the same cluster as MQTT broker. Only enhanced authentication fields are permitted. Set authentication method to `K8S-SAT` and authentication data to the token.
625
+
SAT authentication must be used from a client in the same cluster as MQTT broker. Only MQTTv5 enhanced authentication fields are permitted. Set authentication method to `K8S-SAT` and authentication data to the token.
626
626
627
-
The following command specifies a pod that has the mosquitto client and mounts the SAT created in the previous steps into the pod.
628
-
629
-
```yaml
630
-
apiVersion: v1
631
-
kind: Pod
632
-
metadata:
633
-
name: mqtt-client
634
-
namespace: azure-iot-operations
635
-
spec:
636
-
serviceAccountName: mqtt-client
637
-
containers:
638
-
- image: efrecon/mqtt-client
639
-
name: mqtt-client
640
-
command: ["sleep", "infinity"]
641
-
volumeMounts:
642
-
- name: mqtt-client-token
643
-
mountPath: /var/run/secrets/tokens
644
-
volumes:
645
-
- name: mqtt-client-token
646
-
projected:
647
-
sources:
648
-
- serviceAccountToken:
649
-
path: mqtt-client-token
650
-
audience: my-audience
651
-
expirationSeconds: 86400
652
-
```
653
-
654
-
Here, the `serviceAccountName` field in the pod configuration must match the service account associated with the token being used. Also, The `serviceAccountToken.audience` field in the pod configuration must be one of the `audiences` configured in the *BrokerAuthentication* resource.
655
-
656
-
Once the pod is created, start a shell in the pod:
627
+
For example using mosquitto (some fields omitted for brevity):
657
628
658
629
```bash
659
-
kubectl exec --stdin --tty mqtt-client -n azure-iot-operations -- sh
Here, `<SERVICE_ACCOUNT>` is the name of the service account you create, and `<AUDIENCE>` is one of the audiences configured in the *BrokerAuthentication* resource.
For an example on how to configure a Kubernetes pod to use SAT authentication, see [Connect to the default listener inside the cluster](./howto-test-connection.md#connect-to-the-default-listener-inside-the-cluster).
676
642
677
-
The mosquitto client uses the service account token mounted at `/var/run/secrets/tokens/broker-sat` to authenticate with the broker. The token is valid for 24 hours. The client also uses the default root CA cert mounted at `/var/run/certs/ca.crt` to verify the broker's TLS certificate chain.
643
+
In the pod configuration, the `serviceAccountName` field in must match the service account associated with the token being used, and the `serviceAccountToken.audience` field must be one of the `audiences` configured in the *BrokerAuthentication* resource.
678
644
679
-
#### Refresh service account tokens
645
+
### Refresh service account tokens
680
646
681
647
Service account tokens are valid for a limited time and configured with `expirationSeconds`. However, Kubernetes [automatically refreshes the token before it expires](https://kubernetes.io/docs/reference/access-authn-authz/service-accounts-admin/). The token is refreshed in the background, and the client doesn't need to do anything other than to fetch it again.
682
648
683
-
For example, if the client is a pod that uses the token mounted as a volume, like in the [test SAT authentication](#test-sat-authentication) example, then the latest token is available at the same path `/var/run/secrets/tokens/mqtt-client-token`. When making a new connection, the client can fetch the latest token and use it to authenticate. The client should also have a mechanism to handle MQTT unauthorized errors by fetching the latest token and retrying the connection.
649
+
For example, if the client is a pod that uses the token mounted as a volume, like in the [test SAT authentication](#test-sat-authentication) example, then the latest token is available at the same path `/var/run/secrets/tokens/broker-sat`. When making a new connection, the client can fetch the latest token and use it to authenticate. The client should also have a mechanism to handle MQTT unauthorized errors by fetching the latest token and retrying the connection.
Copy file name to clipboardExpand all lines: articles/iot-operations/manage-mqtt-broker/howto-encrypt-internal-traffic.md
+4-3Lines changed: 4 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,7 +20,7 @@ Ensuring the security of internal communications within your infrastructure is i
20
20
> [!IMPORTANT]
21
21
> This setting requires modifying the Broker resource and can only be configured at initial deployment time using the Azure CLI or Azure Portal. A new deployment is required if Broker configuration changes are needed. To learn more, see [Customize default Broker](./overview-broker.md#customize-default-broker).
22
22
23
-
The **encrypt internal traffic** feature is used to encrypt the internal traffic between the MQTT broker frontend and backend pods. To use this feature, cert-manager, which is installed by default when using the Azure IoT Operations, is required.
23
+
The **encrypt internal traffic** feature is used to encrypt the internal traffic between the MQTT broker frontend and backend pods. It's enabled by default when you deploy Azure IoT Operations.
24
24
25
25
The benefits include:
26
26
@@ -36,9 +36,10 @@ The benefits include:
36
36
37
37
-**Secure data in the message buffer on disk**: All data in the [message buffer on disk](./howto-disk-backed-message-buffer.md) is encrypted.
38
38
39
-
By default, encrypting internal traffic enabled. To mitigate security threats, we recommend that you keep the encryption enabled. However, disabling the encryption can improve the performance of the MQTT broker, which can be useful in IoT deployments with high throughput requirements.
39
+
To disable encryption, modify the `advanced.encryptInternalTraffic` setting in the Broker resource. This can only be done using the `--broker-config-file` flag during the deployment of Azure IoT Operations with the `az iot ops create` command.
40
40
41
-
To disable the encryption, change the `advanced.encryptInternalTraffic` setting in the Broker resource. Currently, disabling encryption is only supported using the `--broker-config-file` flag when you deploy the Azure IoT Operations using the `az iot ops create` command.
41
+
> [!CAUTION]
42
+
> Disabling encryption can enhance the performance of the MQTT broker, which may be beneficial in high-throughput IoT deployments. However, to safeguard against security threats like man-in-the-middle attacks, we strongly recommended to keep this setting enabled. Only disable encryption in controlled, non-production environments for testing purposes.
Copy file name to clipboardExpand all lines: articles/iot-operations/troubleshoot/known-issues.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -94,5 +94,7 @@ kubectl delete pod aio-opc-opc.tcp-1-f95d76c54-w9v9c -n azure-iot-operations
94
94
95
95
- X.509 authentication for custom Kafka endpoints isn't supported yet.
96
96
97
+
- Deserializing and validating messages using a schema is not supported yet. Specifying `schemaRef` in the source configuration only allows the operations experience UX to display the list of data points, but the data points are not validated against the schema.
98
+
97
99
<!-- TODO: double check -->
98
100
- Creating a X.509 secret in the operations experience portal results in a secret with incorrectly encoded data. To work around this issue, create the [multi-line secrets through Azure Key Vault](/azure/key-vault/secrets/multiline-secrets), then select it from the list of secrets in the operations experience portal.
0 commit comments