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/manage-mqtt-broker/howto-configure-authentication.md
+31-6Lines changed: 31 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ ms.subservice: azure-mqtt-broker
7
7
ms.topic: how-to
8
8
ms.custom:
9
9
- ignite-2023
10
-
ms.date: 07/01/2024
10
+
ms.date: 07/16/2024
11
11
12
12
#CustomerIntent: As an operator, I want to configure authentication so that I have secure MQTT broker communications.
13
13
---
@@ -150,15 +150,40 @@ BinaryData
150
150
====
151
151
```
152
152
153
-
### Import certificate-to-attribute mapping
153
+
### Certificate attributes
154
154
155
-
To use authorization policies for clients using properties on the X.509 certificates, create a certificate-to-attribute mapping TOML file and import it as a Kubernetes secret under the key `x509Attributes.toml`. This file maps the subject name of the client certificate to the attributes that can be used in authorization policies. It's required even if you don't use authorization policies.
155
+
X509 attributes can be specified in the *BrokerAuthentication* resource. For example, every client that has a certificate issued by the root CA `CN = Contoso Root CA Cert, OU = Engineering, C = US` or an intermediate CA `CN = Contoso Intermediate CA` receives the attributes listed.
subject = "CN = Contoso Root CA Cert, OU = Engineering, C = US"
169
+
attributes:
170
+
organization = contoso
171
+
intermediate:
172
+
subject = "CN = Contoso Intermediate CA"
173
+
attributes:
174
+
city = seattle
175
+
foo = bar
176
+
smart-fan:
177
+
subject = "CN = smart-fan"
178
+
attributes:
179
+
building = 17
159
180
```
160
181
161
-
To learn about the attributes file syntax, see [Authorize clients that use X.509 authentication](./howto-configure-authorization.md#authorize-clients-that-use-x509-authentication).
182
+
In this example, every client that has a certificate issued by the root CA `CN = Contoso Root CA Cert, OU = Engineering, C = US` or an intermediate CA `CN = Contoso Intermediate CA` receives the attributes listed. In addition, the smart fan receives attributes specific to it.
183
+
184
+
The matching for attributes always starts from the leaf client certificate and then goes along the chain. The attribute assignment stops after the first match. In previous example, even if `smart-fan` has the intermediate certificate `CN = Contoso Intermediate CA`, it doesn't get the associated attributes.
185
+
186
+
Authorization rules can be applied to clients using X.509 certificates with these attributes.
Copy file name to clipboardExpand all lines: articles/iot-operations/manage-mqtt-broker/howto-configure-authorization.md
+4-33Lines changed: 4 additions & 33 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ ms.subservice: azure-mqtt-broker
7
7
ms.topic: how-to
8
8
ms.custom:
9
9
- ignite-2023
10
-
ms.date: 07/02/2024
10
+
ms.date: 07/15/2024
11
11
12
12
#CustomerIntent: As an operator, I want to configure authorization so that I have secure MQTT broker communications.
13
13
---
@@ -84,44 +84,15 @@ This broker authorization allows clients with usernames `temperature-sensor` or
84
84
- `temperature-sensor`can subscribe to `/commands/contoso`.
85
85
- `some-other-username`can subscribe to `/commands/contoso`.
86
86
87
-
To create this BrokerAuthorization resource, apply the YAML manifest to your Kubernetes cluster.
87
+
To create this *BrokerAuthorization* resource, apply the YAML manifest to your Kubernetes cluster.
88
88
89
89
## Authorize clients that use X.509 authentication
90
90
91
91
Clients that use [X.509 certificates for authentication](./howto-configure-authentication.md) can be authorized to access resources based on X.509 properties present on their certificate or their issuing certificates up the chain.
92
92
93
-
### With certificate chain properties using attributes
93
+
### Using attributes
94
94
95
-
To create rules based on properties from a client's certificate, its root CA, or intermediate CA, a certificate-to-attributes mapping TOML file is required. For example:
96
-
97
-
```toml
98
-
[root]
99
-
subject = "CN = Contoso Root CA Cert, OU = Engineering, C = US"
100
-
101
-
[root.attributes]
102
-
organization = "contoso"
103
-
104
-
[intermediate]
105
-
subject = "CN = Contoso Intermediate CA"
106
-
107
-
[intermediate.attributes]
108
-
city = "seattle"
109
-
foo = "bar"
110
-
111
-
[smart-fan]
112
-
subject = "CN = smart-fan"
113
-
114
-
[smart-fan.attributes]
115
-
building = "17"
116
-
```
117
-
118
-
In this example, every client that has a certificate issued by the root CA `CN = Contoso Root CA Cert, OU = Engineering, C = US` or an intermediate CA `CN = Contoso Intermediate CA` receives the attributes listed. In addition, the smart fan receives attributes specific to it.
119
-
120
-
The matching for attributes always starts from the leaf client certificate and then goes along the chain. The attribute assignment stops after the first match. In previous example, even if `smart-fan` has the intermediate certificate `CN = Contoso Intermediate CA`, it doesn't get the associated attributes.
121
-
122
-
To apply the mapping, create a certificate-to-attribute mapping TOML file as a Kubernetes secret, and reference it in `authenticationMethods.x509.attributes` for the BrokerAuthentication resource.
123
-
124
-
Then, authorization rules can be applied to clients using X.509 certificates with these attributes.
95
+
To create rules based on properties from a client's certificate, its root CA, or intermediate CA, define the X.509 attributes in in the *BrokerAuthorization* resource. For more information, see [Certificate attributes](howto-configure-authentication.md#certificate-attributes).
125
96
126
97
### With client certificate subject common name as username
0 commit comments