Skip to content

Commit 4ac996a

Browse files
committed
Change file name
1 parent eb9329d commit 4ac996a

File tree

6 files changed

+57
-7
lines changed

6 files changed

+57
-7
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ For more information about enabling secure settings by configuring an Azure Key
332332
## X.509
333333

334334
> [!TIP]
335-
> For an end-to-end example of how to configure X.509 authentication, see [Tutorial: TLS, X.509 client authentication, and attribute-based access control (ABAC) authorization](./tutorial-tls-and-x509.md).
335+
> For an end-to-end example of how to configure X.509 authentication, see [Tutorial: TLS, X.509 client authentication, and attribute-based access control (ABAC) authorization](./tutorial-tls-x509.md).
336336

337337
With X.509 authentication, the MQTT broker uses a **trusted CA certificate** to validate client certificates. This trusted CA can be a root or intermediate CA. The broker checks the client certificate chain against the trusted CA certificate. If the chain is valid, the client is authenticated.
338338

@@ -608,7 +608,7 @@ To get a TLS-enabled listener port, see [Enable TLS manual certificate managemen
608608
>
609609
> After enabling X.509 authentication, ensure that clients trust the broker's server certificate by having the *server-side* CA certificate in their trust store. Don't confuse trusting the *server-side* CA certificate with the *client-side* CA certificate used for client authentication that is specified in the `trustedClientCaCert` field.
610610
>
611-
> For a full example, see [Tutorial: TLS, X.509 client authentication, and attribute-based access control (ABAC) authorization](./tutorial-tls-and-x509.md).
611+
> For a full example, see [Tutorial: TLS, X.509 client authentication, and attribute-based access control (ABAC) authorization](./tutorial-tls-x509.md).
612612

613613
### Connect mosquitto client to MQTT broker with X.509 client certificate
614614

@@ -894,4 +894,4 @@ Successful reauthentication updates the client's credential expiry with the expi
894894

895895
- About [BrokerListener resource](howto-configure-brokerlistener.md)
896896
- [Configure authorization for a BrokerListener](./howto-configure-authorization.md)
897-
- [Tutorial: TLS, X.509 client authentication, and attribute-based access control (ABAC) authorization](./tutorial-tls-and-x509.md)
897+
- [Tutorial: TLS, X.509 client authentication, and attribute-based access control (ABAC) authorization](./tutorial-tls-x509.md)

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -786,4 +786,4 @@ With MQTT 3.1.1, when a publish is denied, the client receives the PUBACK with n
786786

787787
- About [BrokerListener resource](howto-configure-brokerlistener.md)
788788
- [Configure authentication for a BrokerListener](./howto-configure-authentication.md)
789-
- [Tutorial: TLS, X.509 client authentication, and attribute-based access control (ABAC) authorization](./tutorial-tls-and-x509.md)
789+
- [Tutorial: TLS, X.509 client authentication, and attribute-based access control (ABAC) authorization](./tutorial-tls-x509.md)

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -921,4 +921,4 @@ From here, follow the same steps as previously to create a server certificate wi
921921

922922
- [Configure MQTT broker authorization](howto-configure-authorization.md)
923923
- [Configure MQTT broker authentication](howto-configure-authentication.md)
924-
- [Tutorial: TLS, X.509 client authentication, and attribute-based access control (ABAC) authorization](./tutorial-tls-and-x509.md)
924+
- [Tutorial: TLS, X.509 client authentication, and attribute-based access control (ABAC) authorization](./tutorial-tls-x509.md)

articles/iot-operations/manage-mqtt-broker/howto-test-connection.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -615,4 +615,4 @@ spec:
615615

616616
- [Configure TLS with manual certificate management to secure MQTT communication](howto-configure-tls-manual.md)
617617
- [Configure authentication](howto-configure-authentication.md)
618-
- [Tutorial: TLS, X.509 client authentication, and attribute-based access control (ABAC) authorization](./tutorial-tls-and-x509.md)
618+
- [Tutorial: TLS, X.509 client authentication, and attribute-based access control (ABAC) authorization](./tutorial-tls-x509.md)

articles/iot-operations/manage-mqtt-broker/tutorial-tls-and-x509.md renamed to articles/iot-operations/manage-mqtt-broker/tutorial-tls-x509.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,55 @@ Client thermostat sending DISCONNECT
264264

265265
To restrict access to MQTT topics based on the client certificate attributes, create an authorization policy that maps the client certificate attributes to allowed actions on specific topics.
266266

267+
The provided command is using the `mosquitto_pub` utility to publish a message to an MQTT broker with TLS encryption and client certificate authentication. Here's a breakdown of the command and the authorization system being set up:
268+
269+
### Command Breakdown
270+
- `mosquitto_pub`: The command-line utility to publish messages to an MQTT broker.
271+
- `-t "example/topic"`: Specifies the topic to which the message is published.
272+
- `-m "example temperature measurement"`: The message payload.
273+
- `-i thermostat`: The client ID used to identify the publisher.
274+
- `-q 1`: Quality of Service level 1, ensuring the message is delivered at least once.
275+
- `-V mqttv5`: Specifies the MQTT version 5.
276+
- `-d`: Enables debug mode for detailed output.
277+
- `-h localhost`: The hostname of the MQTT broker.
278+
- `--key thermostat.key`: The client's private key file.
279+
- `--cert thermostat.crt`: The client's certificate file.
280+
- `--cafile contoso_root_ca.crt`: The CA certificate file to verify the broker's certificate.
281+
282+
### Authorization System
283+
1. **Certificates Created**:
284+
- **Client Certificate (thermostat.crt)**: Issued to the client (thermostat) and signed by an intermediate CA.
285+
- **Client Private Key (thermostat.key)**: Corresponding private key for the client certificate.
286+
- **Intermediate CA Certificate**: Signed by the root CA, used to sign client certificates.
287+
- **Root CA Certificate (contoso_root_ca.crt)**: The trusted root certificate used to verify the chain of trust.
288+
289+
2. **Attributes Mapping**:
290+
- **Client Certificate Attributes**: Includes details like Common Name (CN), Organization (O), and Organizational Unit (OU) that can be used for authorization.
291+
- **Intermediate CA**: Ensures that client certificates are issued by a trusted entity.
292+
293+
3. **Authorization Rules**:
294+
- The MQTT broker uses the client certificate to authenticate the client.
295+
- The broker verifies the certificate chain up to the root CA.
296+
- Authorization rules can be defined based on certificate attributes (e.g., CN, O, OU) to control access to specific topics.
297+
298+
### Mermaid Diagram
299+
```mermaid
300+
graph TD
301+
A[Client: thermostat] -->|thermostat.crt| B[Intermediate CA]
302+
B -->|Signed by| C[Root CA: contoso_root_ca.crt]
303+
A -->|thermostat.key| D[MQTT Broker]
304+
D -->|Verify| C
305+
D -->|Authorize| E[Authorization Rules]
306+
E -->|Access Control| F[MQTT Topics]
307+
```
308+
309+
### Explanation
310+
1. The client (thermostat) uses its certificate (`thermostat.crt`) and private key (`thermostat.key`) to authenticate with the MQTT broker.
311+
2. The broker verifies the client's certificate against the intermediate CA, which is in turn verified against the root CA (`contoso_root_ca.crt`).
312+
3. The broker applies authorization rules based on the client's certificate attributes to control access to MQTT topics.
313+
314+
This setup ensures secure communication and controlled access to the MQTT broker using TLS and client certificate authentication.
315+
267316
1. In the Azure portal, navigate to your IoT Operations instance.
268317
1. Under **Components**, select **MQTT Broker**.
269318
1. Select the **Authorization** tab.
@@ -354,6 +403,7 @@ To restrict access to MQTT topics based on the client certificate attributes, cr
354403
}
355404
]
356405
```
406+
357407
1. Select **Add** to save the changes.
358408

359409
:::image type="content" source="media/tutorial-tls-and-x509/abac-authz.png" alt-text="Screenshot showing Azure portal for setting up an authorization policy.":::

articles/iot-operations/toc.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ items:
190190
- name: Send data to Data Lake Storage
191191
href: connect-to-cloud/tutorial-opc-ua-to-data-lake.md
192192
- name: Secure communication with TLS, X.509, and ABAC
193-
href: manage-mqtt-broker/tutorial-tls-and-x509.md
193+
href: manage-mqtt-broker/tutorial-tls-x509.md
194194
- name: Troubleshoot
195195
items:
196196
- name: Troubleshoot

0 commit comments

Comments
 (0)