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
In general, this specification provides two ways by which a MUD-URL transmission can be performed using CoAP.
184
185
185
-
- Text/Plain
186
-
- text/mud-url+plain
187
-
- CBOR (unsigned)
188
-
- application/mud-url+cbor
189
-
- Signed MUD-URL Objects
190
-
- application/mud-url+cose...?
186
+
In environments where many Things need to be managed over several subnets and where multicast usage is not desirable, it can be advantageous if the MUD receiver provides a CoAP resource to perform submissions to and the Things initiate the MUD-URL submission.
187
+
This will be referred to as the "Thing-initiated" submission flow for the remainder of this specification.
191
188
192
-
## MUD-URL CoAP Submission Flows
189
+
Conversely, in environments where multicast is not an issue and things might be limited in their capabilities, it can be advantageous if MUD receivers retrieve the MUD-URL from a CoAP resource provided by the Things.
190
+
In this specification, this will be referred to as the "Receiver-initiated" submission flow.
193
191
194
-
### Using the MUD-URL Resource (Thing-side)
192
+
### Using the MUD-URL Resource (Receiver-initiated)
195
193
196
-
### Using the MUD-URL Submission Resource (Receiver-side)
194
+
In the Receiver-initiated flow, Things provide a CoAP resource discoverable by the means provided in {{general_discovery}}, which is then requested by MUD receivers to retrieve the MUD-URL.
197
195
198
-
## Resource Discovery
196
+
<!-- TODO ascii-drawing of this resource -->
197
+
198
+
In general, the Receiver-initiated MUD-URL flow can be divided into these steps:
199
+
200
+
1. After joining the network, the Thing starts providing a CoAP resource to retrieve the MUD-URL.
201
+
This resource should provide the MUD-URL in one of the formats specified in {{general_payloads}}.
202
+
It also makes this resource discoverable for MUD receivers using the methods specified in {{general_discovery}}.
203
+
204
+
2. The MUD Receiver discovers the resource using the aforementioned methods.
205
+
Depending on the method of discovery, this could for example happen using a periodic scan for devices, e.g., by periodically requesting a well-known URI using multicast.
206
+
Other methods of discovery might also provide a mechanism to directly notify the Receiver of new devices, in which case this method SHOULD be preferred over periodic scanning.
207
+
208
+
3. The MUD Receiver retrieves the discovered resource for devices where the MUD controller does not have an up-to-date MUD-URL stored.
209
+
To do so, it performs a CoAP request for the discovered MUD-URL resource URI using the GET method, which is responded to with the appropriate payload.
210
+
Receivers MUST specify their desired payload format using the Accept option {{Section 5.10.4 of RFC7252}}.
211
+
During content negotiation, Receivers MUST start with requesting the Content-Format that provides the greatest degree of authenticity protection (i.e., prefer CWTs over plaintext transmission).
212
+
213
+
<!-- TODO advantages/disadvantages? -->
214
+
215
+
### Using the MUD-URL Submission Resource (Thing-initiated)
216
+
217
+
In the Thing-initiated flow, Things discovery a submission resource provided by the MUD Receiver and submit their MUD-URLs to this resource.
218
+
219
+
This flow can be divided into these general steps:
220
+
221
+
1. The MUD Receiver provides a CoAP resource that Things can submit their MUD-URLs to.
222
+
It also makes itself discoverable for Things using the methods specified in {{general_discovery}}.
223
+
224
+
2. The Thing connects to the network.
225
+
After connecting, it discovers the MUD-URL submission resource using the aforementioned methods.
226
+
227
+
3. The Thing submits the MUD-URL to the previously discovered URI.
228
+
To do so, it performs a CoAP request to the discovered URI with the POST method.
229
+
The MUD-URL is contained as the message payload in this request using one of the content formats defined in {{general_payloads}}.
230
+
Receivers MAY allow limiting the accepted Content-Formats to ones that provide some level of authenticity for the MUD-URL using policies.
231
+
However, implementations MUST also support unauthenticated MUD-URL transmissions if no policy forbids it.
232
+
<!-- TODO message response/response code indicating success? -->
233
+
234
+
<!-- TODO advantages/disadvantages? -->
235
+
236
+
## MUD CoAP Payloads {#general_payloads}
237
+
For the purposes of this specification, we will define two formats for transmitting MUD-URLs, which are suitable for different environments.
238
+
MUD Receivers that conform to this specification MUST support both formats.
239
+
240
+
### Plain URL
241
+
The easiest method of transmitting MUD-URLs is using a plain text payload containing only the MUD-URL.
242
+
While this method has the advantage of simplicity, it does not contain any additional information that could be used by a MUD receiver to authenticate the supplied MUD-URL.
243
+
244
+
CoAP requests and responses that use this format MUST use the Content-Format option with the value corresponding to the "application/mud-url+plain" media type.
245
+
246
+
### MUD-URLs inside of CBOR Web Tokens
247
+
Previous methods of transmitting MUD-URLs do not allow for authentication of supplied MUD URLs.
248
+
To accomodate for environments where authentication of MUD-URLs is desired, it is also possible to include the MUD-URL as a claim inside of a CBOR Web Token {{!RFC8392}}.
249
+
This allows for MUD receivers or MUD controllers to verify the authenticity of the provided MUD-URL.
250
+
251
+
CBOR Web Tokens that contain MUD-URL information have the following properties:
252
+
- The MUD-URL is contained as an ASCII-encoded string in the "mud-url" claim.
253
+
- The Token MAY contain Proof-of-Possession claims {{!RFC8747}}.
254
+
If it does, the MUD receiver MUST verify that the device is in possession of the key specified in the cnf claim.
255
+
Proof-of-Possession claims that are transmitted over CoAP without DTLS/TLS MUST represent public keys, Receivers MUST treat any symmetric keys sent over insecure channels as invalid/compromised.
256
+
<!-- TODO specify PoP mechanism in flow section -->
257
+
- The Token MAY contain an expiry time.
258
+
If an expiry time is specified, the MUD-URL should be resubmitted or requested again shortly before the original CWT expires.
259
+
Note that using an expiry time could cause problems if the device is unable to perform a refresh, e.g., due to a power outage.
260
+
<!-- TODO maybe be more specific regarding the time where the refresh should happen -->
261
+
262
+
CoAP requests and responses that use this format MUST use the Content-Format option with the value corresponding to the "application/mud-url+cwt" media type.
263
+
264
+
## Proof-of-Possession for CBOR Web Tokens with MUD-URLs {#general_pop}
265
+
If the MUD-URL is transmitted as a CBOR Web Token that includes Proof-of-Possession claims, CoAPS MUST be used to perform proof-of-possession.
266
+
To do so, the following procedures SHOULD be used.
267
+
Both of the following procedures use the establishment of a DTLS session using the PoP key in order to prove the possession of the key, similarly to the procedures defined in {{!RFC9202}}.
268
+
269
+
<!-- TODO required ciphers? -->
270
+
271
+
### For the Thing-initiated Flow
272
+
273
+
1. After submitting the MUD-URL, the MUD Receiver parses the token.
274
+
If it detects Proof-of-Possession claims, the receiver MUST reply with a 4.01 (Unauthorized) CoAP response code and reject the token for now.
275
+
If the original submission request was not performed using CoAPS, the Receiver MUST also return a set of key information that can be used to establish a CoAP+DTLS session with it, as well as a CoAPS URI indicating the location of the secured submission resource.
276
+
<!-- TODO key format? -->
277
+
2. The Thing then repeats the submission request using its own key information, the Receiver's key information, and the provided URI.
278
+
3. During the DTLS handshake, the Receiver MUST require the Thing to use the Proof-of-Possession key included in the originally submitted token in order to successfully establish a DTLS session.
279
+
4. After the DTLS handshake, the Thing has proven possession of the key included in the CWT to the MUD Receiver, which can then treat the CWT as valid.
280
+
<!-- TODO do we still want to re-send the CWT? -->
281
+
282
+
### For the Receiver-initiated Flow
283
+
1. After receiving the MUD-URL from a request (e.g., a multicast request), the MUD Receiver parses the token.
284
+
If it detects Proof-of-Possession claims, the receiver MUST continue with the following procedure before treating the CWT as valid.
285
+
2. The receiver repeats the MUD-URL request, this time using DTLS.
286
+
During the DTLS handshake, the Receiver must require the Thing to use the Proof-of-Possession key included in the originally received token in order to successfully establish the DTLS session.
287
+
3. After the DTLS handshake, the Thing has proven possession of the key included in the CWT to the MUD Receiver, which can then treat the CWT as valid.
288
+
<!-- TODO Unsure if DTLS even works without mutual auth, but i dont see why it shouldn't -->
289
+
290
+
## Resource Discovery {#general_discovery}
199
291
200
292
In this section, additional methods for resource discovery in constrained environments are defined.
201
293
@@ -283,6 +375,48 @@ following section.
283
375
284
376
## Receiver Behavior
285
377
378
+
MUD receivers are assumed to be mostly non-constrained devices.
379
+
Accordingly, this specification puts most of the implementation burden regarding support for flows and formats on the receivers, while keeping the requirements for Things as small as possible.
380
+
In general, it is recommended that MUD receivers support as much of the specification as possible in order to support as many different Things as possible.
381
+
382
+
### Discovery
383
+
384
+
For the discovery process described in {{general_discovery}}, the following considerations apply to MUD receivers:
385
+
386
+
- MUD receivers MUST regularly perform a CoAP request to the "All MUD CoAP Nodes" multicast address for the `/.well-known/mud-url` URI.
387
+
388
+
- MUD receivers MUST regularly query any CoRE Resource Directories relevant for the subnet they are responsible for.
389
+
390
+
- MUD receivers MUST register their submission resource to any CoRE Resource Directories relevant for the subnet they are responsible for.
391
+
392
+
### MUD-URL Submission Resource
393
+
394
+
<!-- TODO some more explanatory text -->
395
+
396
+
- MUD receivers MUST provide a submission resource.
397
+
398
+
- MUD receivers MAY indicate failure of MUD-URL submission using a CoAP Error Code.
399
+
400
+
### MUD-URL Resource
401
+
402
+
<!-- TODO some more text -->
403
+
404
+
- MUD receivers MUST request MUD-URLs known to them. <!-- duh -->
405
+
406
+
- MUD receivers MUST re-request MUD-URLs submitted as a CWT claim if the CWT has an expiry time that passed.
407
+
408
+
### MUD-URL Payload
409
+
410
+
<!-- TODO explanatory text -->
411
+
- MUD receivers SHOULD treat devices for which MUD-URL retrieval failed as devices the same way as devices that do not provide a MUD-URL at all.
412
+
413
+
- MUD receiver implementations MUST support the plain MUD-URL payload, although support for these MAY be disabled by policy.
414
+
415
+
- MUD receivers SHOULD support the CWT MUD-URL claim.
416
+
417
+
- If the CWT claim is supported, MUD receivers MUST be configured with a policy as to which signers are authorized to sign tokens.
0 commit comments