Skip to content

Commit 311d7fb

Browse files
committed
Add feedback
1 parent dddc356 commit 311d7fb

File tree

3 files changed

+26
-14
lines changed

3 files changed

+26
-14
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,7 @@ Finally, once the trusted client root CA certificate and the certificate-to-attr
191191
spec:
192192
authenticationMethods:
193193
- method: x509Credentials
194+
x509Credentials:
194195
trustedClientCaCert: client-ca
195196
attributes:
196197
secretName: x509-attributes
@@ -268,6 +269,7 @@ Modify the `authenticationMethods` setting in a BrokerAuthentication resource to
268269
spec:
269270
authenticationMethods:
270271
- method: ServiceAccountToken
272+
serviceAccountToken:
271273
audiences:
272274
- aio-mq
273275
- my-audience

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

Lines changed: 22 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ ms.subservice: azure-mqtt-broker
77
ms.topic: how-to
88
ms.custom:
99
- ignite-2023
10-
ms.date: 07/27/2024
10+
ms.date: 08/03/2024
1111

1212
#CustomerIntent: As an operator, I want understand options to secure MQTT communications for my IoT Operations solution.
1313
---
@@ -72,7 +72,7 @@ To inspect the listener, run:
7272
kubectl get brokerlistener listener -n azure-iot-operations -o yaml
7373
```
7474

75-
The output should look like this, with most metadata removed for brevity:
75+
The output should look similar to this, with most metadata removed for brevity:
7676

7777
```yaml
7878
apiVersion: mq.iotoperations.azure.com/v1beta1
@@ -82,6 +82,8 @@ metadata:
8282
namespace: azure-iot-operations
8383
spec:
8484
brokerRef: broker
85+
serviceName: aio-mq-dmqtt-frontend
86+
serviceType: ClusterIp
8587
ports:
8688
- authenticationRef: authn
8789
port: 8883
@@ -93,18 +95,24 @@ spec:
9395
kind: Issuer
9496
name: mq-dmqtt-frontend
9597
mode: Automatic
96-
serviceName: aio-mq-dmqtt-frontend
97-
serviceType: ClusterIp
9898
```
9999
100100
To learn more about the default BrokerAuthentication resource linked to this listener, see [Default BrokerAuthentication resource](howto-configure-authentication.md#default-brokerauthentication-resource).
101101
102+
### Update the default BrokerListener
103+
104+
The default BrokerListener uses the service type *ClusterIp*. You can have only one listener per service type. If you want to add more ports to service type *ClusterIp*, you can update the default listener to add more ports. For example, you could add a new port 1883 with no TLS and authentication off with the following kubectl patch command:
105+
106+
```bash
107+
kubectl patch brokerlistener listener -n azure-iot-operations --type='json' -p='[{"op": "add", "path": "/spec/ports/", "value": {"port": 1883, "protocol": "Mqtt"}}]'
108+
```
109+
102110
## Create new BrokerListeners
103111
104112
This example shows how to create a new *BrokerListener* resource for a *Broker* resource named *my-broker*. The *BrokerListener* resource defines a two ports that accept MQTT connections from clients.
105113
106114
- The first port listens on port 1883 with no TLS and authentication off. Clients can connect to the broker without encryption or authentication.
107-
- The second port listens on port 8883 with TLS and authentication enabled. Only authenticated clients can connect to the broker with TLS encryption. TLS is set to `automatic`, which means that the listener uses cert-manager to get and renew its server certificate.
115+
- The second port listens on port 18883 with TLS and authentication enabled. Only authenticated clients can connect to the broker with TLS encryption. TLS is set to `automatic`, which means that the listener uses cert-manager to get and renew its server certificate.
108116

109117
To create these *BrokerListener* resources, apply this YAML manifest to your Kubernetes cluster:
110118

@@ -119,17 +127,18 @@ spec:
119127
serviceType: loadBalancer
120128
serviceName: my-new-listener
121129
ports:
122-
port: 1883
123-
protocol: Mqtt
124-
port: 18883
125-
authenticationRef: authn
126-
protocol: Mqtt
127-
tls:
128-
automatic:
129-
issuerRef:
130+
- port: 1883
131+
protocol: Mqtt
132+
- port: 18883
133+
authenticationRef: authn
134+
protocol: Mqtt
135+
tls:
136+
automatic:
137+
issuerRef:
130138
name: e2e-cert-issuer
131139
kind: Issuer
132140
group: cert-manager.io
141+
mode: Automatic
133142
```
134143

135144
## Related content

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ ms.subservice: azure-mqtt-broker
77
ms.topic: how-to
88
ms.custom:
99
- ignite-2023
10-
ms.date: 07/27/2024
10+
ms.date: 08/03/2024
1111

1212
#CustomerIntent: As an operator, I want to configure MQTT broker to use TLS so that I have secure communication between the MQTT broker and client.
1313
---
@@ -91,6 +91,7 @@ spec:
9191
port: 8885 # Avoid port conflict with default listener at 8883
9292
tls:
9393
manual:
94+
mode: Manual
9495
secretName: server-cert-secret
9596
```
9697

0 commit comments

Comments
 (0)