-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
what to check when assigning new CoAP C-Fs based on application/cmw
#146
base: main
Are you sure you want to change the base?
Conversation
9d2264d
to
20ff20c
Compare
Signed-off-by: Thomas Fossati <[email protected]>
20ff20c
to
21de6ae
Compare
The intermediate node types for composite CMWs are not tagged. If we want to allow reflection on the CoAP content-format ID that is assigned, then we should add that specifically to the intermediate node type, and that only compound CMWs are allowed to be tagged this way.
Are you asking for specifically a CoAP Content-Format Side note: is the |
Can you illustrate this with an example?
Yes, the scope of this is purely collections which are explicitly typed.
There are no other possible permutations because
Yes - although that's irrelevant from the C-F registrar's point of view.
Yes - ditto.
Yes. |
It may be easier to bring back the application/cmw-collection+cbor Content-Type to account for this flip-flopping. We have to separate the top level CMW from any intermediate CMW to ensure that we don't have boundless recursion of CoAP format ID tags for application/cmw+cbor. Let
Next we say that a leaf node may not use a CoAP format ID for a CMW itself. That's reserved for an intermediate node.
We can allow for a CoAP format ID tag to name a collection that is either all in json (to not have to tunnel all leaves), or to make the cmwc_t more concise.
I don't know how to say that the wrapped type is a |
Is this a problem in practice? |
Never underestimate the failure modes of system integrations. If we want to recognize the tree structure under the tagged collection type, it should be clear that you only have to go through one tag to get to the map. |
OK, so here's an example JSON collection with a plain-old CMW leaf, a tunnelled CMW CBOR collection and a JSON sub-collection:
It's not impossible that a real composite device would produce something similar to this. Could you tell me where you think the type system breaks? (Feel free to tweak it to illustrate your case.) (I could create a very similar CBOR collection if needed.) |
When assigning a new CoAP Content-Format ID for a CMW media type that utilizes the `cmwc_t` parameter, the registrar must check (directly or through the Designated Expert) that: | ||
|
||
* The corresponding CMW type is a collection ({{cmw-coll}}), and | ||
* The `cmwc_t` value is either an OID or a URI. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We may also consider requiring that content coding is "identity". This would make it safer - avoiding e.g., decompression-related attacks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Requiring for what? C-f registrations with content codings need to be possible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
C-f registrations with content codings need to be possible.
Sure, in general. But we may decide that RATS-related payloads have this restriction.
Response attempt at @cabo's question: "How do application/cmw+cbor with cmwc_t parameters get Content format numbers?"