Subject: Re: [core] Benjamin Kaduk's Discuss on draft-ietf-core-senml-data-ct-05: (with DISCUSS and COMMENT)

From: Carsten Bormann <[email-masked]>
Date: Tue, 12 Oct 2021 15:37:16 +0200

Hi Ben,

thank you for bringing up a number of important issues.

> ----------------------------------------------------------------------
> DISCUSS:
> ----------------------------------------------------------------------
> 
> I have a couple points for discussion, essentially relating to how much
> we're diverging from HTTP and to what extent the specifics of the
> divergence should be specifically mentioned in the document.
> 
> (1) I'd like to dig a little more into the analogy with HTTP and
> whether we are artificially limiting ourselves: currently we only allow
> 0 or 1 content-codings to be specified, but per
> https://www.ietf.org/archive/id/draft-ietf-httpbis-semantics-19.html#name-content-encoding
> the HTTP ecosystem permits multiple codings to be applied in turn to the
> same representation.  While the sensor data values are likely to be
> relatively small and applying multiple content-codings is not likely to
> be useful in such a scenario, this seems like something where we should
> only consciously diverge from HTTP, rather than inadvertently doing so.

I agree that this should be handled (if only for     application/json@deflate@aes128gcm and similar cases).
We discussed this in the previous interim and it seems we like the syntax I proposed in the previous sentence.

Combining the numerous changes needed with addressing Christer’s comments on the Abstract:

https://github.com/core-wg/senml-data-ct/pull/8

> (2) Let's also discuss whether we want to reuse ABNF rule names from
> HTTP while having the rule content diverge, without specific enumeration
> of the divergence.  So far I found instances where this document does
> not allow HTAB or obs-text in places that draft-ietf-httpbis-semantics
> does, which may well be the right way to spell the rule, but seems to
> merit a little discussion.

Very good point.  I’m not sure the ABNF behind “ABNF rule names from HTTP” is stable enough that we need to stick with it in all cases.
I was certainly surprised by the recent change to

   parameters = *( OWS ";" OWS [ parameter ] )

(which makes sequences of ";" legal; see also section B.2 in -semantics.) and wonder whether we should follow this change (and why!?).

Httpbis-semantics uses modified ABNF anyway; so there is no way to have exactly the same ABNF.  But it is worthwhile pointing out that legacy 8-bit text and HTAB have no place in the strings used in this protocol and therefore are not allowed.

I added a comment:
 
-; Cleaned up from RFC 7231:
+; Cleaned up from RFC 7231, only leaving SP as blank space, and
+; removing legacy 8-bit characters:

The other difference from RFC 2616 and its descendants is the absence of “quoted-pair” from the “quoted-string” production, which indeed can be discussed.

(May need to discuss this in the interim tomorrow for final resolution.)

> ----------------------------------------------------------------------
> COMMENT:
> ----------------------------------------------------------------------
> 
> Do we want to comment anywhere about the situation where an
> implementation receives a message using an IANA-registered numeric
> content-format that is "too new" for that implementation to know about?

(Should have a discussion about error handling in the interim tomorrow.
But generally, the important thing is that the implementation *know* that it needs to be updated to understand.)

> It also feels a little weird that we have to end up using the
> text-string encoding of a decimal number for the Content-Format, even
> for the CBOR representation of SenML structures, but I guess that's what
> RFC 8428 intended and not worth trying to change.

We started out with a numeric encoding, but then noticed that SenML is usually very specific about only allowing a single data type per field.

> Abstract
> 
> I'm somewhat sympathetic to the gen-art reviewer's contention that the
> new field is not indicating the "Content-Format" of the binary data
> values (since Content-Format is a defined term in CoAP and SenML is
> claimed to not be limited to CoAP usage).  Perhaps we could switch
> around the order of description, i.e., "for indicating the Internet
> media type (including parameters) of these binary data values (i.e., the
> CoAP Content-Format that would apply when CoAp is used), as well as any
> content-coding that is applied"?

This is addressed in https://github.com/core-wg/senml-data-ct/pull/8, but not exactly following your blueprint.
The term “content format” is still used both for a “Content-Format number” and a “Content-Format-String”.

> 
> Section 3
> 
>   *  a CoAP Content-Format identifier in decimal form with no leading
>      zeros (except for the value "0" itself).  This value represents an
>      unsigned integer in the range of 0-65535, similar to the CoRE Link
>      Format [RFC6690] "ct" attribute).
> 
> Should we also reference
> https://datatracker.ietf.org/doc/html/rfc7252#section-7.2.1 which is
> where the "ct" link attribute is actually defined?  I spent a bit of
> time looking for it in 6690 itself only to discover that it was removed
> in draft-ietf-core-link-format-07 with remark "Moved [...] to the base
> CoAP specification".

Good point.  YYY

> 
>   The CoAP Content-Format number provides a simple and efficient way to
>   indicate the type of the data.  [...]
> 
> If we're limited to string representation, is it really "efficient" in a
> CBOR context?

That’s not what the sentence is about :-), but “11050” is still more efficient than "application/json@deflate”.

> Section 6
> 
>   ; Cleaned up from RFC 7231:
> 
> (per the DISCUSS,) I'm a bit anti-enthused about saying "cleaned up" without saying what
> changed (i.e., whether it's just refactoring, or actual changes to the
> rule like requiring specifically *SP instead of OWS that allows HTAB as
> well).

See above.

> Section 7
> 
> These security considerations are well-thought-out and nicely written.
> Thank you!
> 
> I think there are some (rare) situations where individual media-type
> (specifications) have their own security considerations, but I'm not
> really convinced that we need to mention that/incorporate them by
> reference, here.
> 
> NITS
> 
> Section 1
> 
>   The receiver is expected to know how to interpret the data in the
>   "vd" field based on the context, e.g., name of the data source and
>   out-of-band knowledge of the application.  However, this context may
>   not always be easily available to entities processing the SenML pack.
> 
> I'd consider adding ", especially if the pack is propagated to multiple
> entities".

That is a bit implied in the context of SenML, but it doesn’t hurt to say it again.

 field based on the context, e.g., name of the data source and out-of-band
 knowledge of the application. However, this context may not always be
-easily available to entities processing the SenML pack. To facilitate
+easily available to entities processing the SenML pack, especially if
+the pack is propagated over time and via multiple entities. To facilitate
 automatic interpretation it is useful to be able to indicate an Internet

> Section 2
> 
>   Content-Coding:  A name registered in the HTTP Content Coding
>      registry [IANA.http-parameters] as specified by Section 8.5 of
>      [RFC7230], indicating an encoding transformation with semantics
>      further specified in Section 3.1.2.1 of [RFC7231].  [...]
> 
> (I expect that the RFC Editor will be able to replace the references to
> point to draft-ietf-httpb-semantics if it has been published before this
> document.)

(With the actual changes in this document, I’m not sure that is a mechanical operation.  But let’s wait for httpbis-semantics to emerge from EDIT.)

> Section 4
> 
>   up to the end of the pack otherwise.  Resolution (Section 4.6 of
>   [RFC8428]) of this base field is performed by adding its value with
>   the label "ct" to all Records in this range that carry a "vd" field
>   but do not already contain a Content-Format ("ct") field.
> 
> The conjugation "resolution" does not actually appear in RFC 8428
> itself, just discussion of "resolved records" and "to resolve the
> records".  It might be helpful to tweak things so that we don't rely on
> the reader knowing the irregular conjugation (but I don't have any good
> ideas off the top of my head)...

-pack otherwise.  Resolution ({{Section 4.6 of -senml}}) of this base
+pack otherwise.  The process of resolving ({{Section 4.6 of -senml}}) this base

The changes that are not already accepted in PR 8 are in
https://github.com/core-wg/senml-data-ct/pull/9

Grüße, Carsten

---

From: Benjamin Kaduk <[email-masked]>
Date: Tue, 12 Oct 2021 10:02:20 -0700

Hi Carsten,

> We discussed this in the previous interim and it seems we like the syntax I proposed in the previous sentence.

That seems reasonable.  I didn't check just now, but I think I looked last
time about whether "@" was allowed in the earlier parts of the
media-type+parameters and there was no problem.

> https://github.com/core-wg/senml-data-ct/pull/8

Generally seems reasonable, though I've lost track of the surrounding
context for whether "content coding" and "content format" (vs
"Content-Coding" and "Content-Format") make sense in the context of the
list and surrounding discussion.

> (which makes sequences of ";" legal; see also section B.2 in -semantics.) and wonder whether we should follow this change (and why!?).

I confess I looked at both 7230+7231 and the new -semantics while reviewing
this doc, and didn't make a careful distinction between the two sources.

> +; removing legacy 8-bit characters:

Thanks!

> (May need to discuss this in the interim tomorrow for final resolution.)

Ok.

> But generally, the important thing is that the implementation *know* that it needs to be updated to understand.)

True.

>  automatic interpretation it is useful to be able to indicate an Internet

Thanks!

> https://github.com/core-wg/senml-data-ct/pull/9

Thanks again for all this,

Ben

---

From: Carsten Bormann <[email-masked]>
Date: Wed, 13 Oct 2021 20:00:09 +0200

Good morning Ben,

> this doc, and didn't make a careful distinction between the two sources.

We actually decided to move entirely from 7230/7231 to httpbis-semantics, hoping that doesn’t put us in missref limbo forever.

In the interim meeting today, we agreed that the parameter optionality is among the legacy features (with HTAB and obs-text), so we left it out (and extended the comment in the ABNF what was left out.

All the changes mentioned in this mail are in:
https://github.com/core-wg/senml-data-ct/pull/10

[…]
>> (May need to discuss this in the interim tomorrow for final resolution.)

We agreed to restore quoted-pair (the bug fix I alluded to, over in httpbis), so we are (sans legacy) fully compatible with HTTP’s use of media types/content types.

[…]
>> But generally, the important thing is that the implementation *know* that it needs to be updated to understand.)

We wrote a new section “evolution”, which also answers the questions that Roman Danyliw did not ask :-)

We can’t really address the issue of SenML interoperability in this document providing a single definition of a pair of fields, so we expect there will be another draft (maybe also with other usage guidelines that improve that interoperability).

[…]

>> (With the actual changes in this document, I’m not sure that is a mechanical operation. But let’s wait for httpbis-semantics to emerge from EDIT.)

Definitely not mechanical, but easy enough (but subject to change due to EDIT).

We plan to merge PR 10 soon and submit a new I-D.

Grüße, Carsten