Skip to main content

Sensor Measurement Lists (SenML) Fields for Indicating Data Value Content-Format
RFC 9193

Document Type RFC - Proposed Standard (June 2022)
Authors Ari Keränen , Carsten Bormann
Last updated 2022-06-07
RFC stream Internet Engineering Task Force (IETF)
Formats
Additional resources Mailing list discussion
IESG Responsible AD Francesca Palombini
Send notices to (None)
RFC 9193
quot;!" / "#" / "$" / "%" / "&" / "'" / "*"
                  / "+" / "-" / "." / "^" / "_" / "`" / "|" / "~"
                  / DIGIT / ALPHA
   quoted-string  = %x22 *( qdtext / quoted-pair ) %x22
   qdtext         = SP / %x21 / %x23-5B / %x5D-7E
   quoted-pair    = "\" ( SP / VCHAR )

   ; Adapted from Section 8.4.1 of RFC 9110

   Content-Coding   = token

   ; Adapted from various specs

   Media-Type-Name = type-name "/" subtype-name

   ; From RFC 6838

   type-name = restricted-name
   subtype-name = restricted-name

   restricted-name = restricted-name-first *126restricted-name-chars
   restricted-name-first  = ALPHA / DIGIT
   restricted-name-chars  = ALPHA / DIGIT / "!" / "#" /
                            "$" / "&" / "-" / "^" / "_"
   restricted-name-chars =/ "." ; Characters before first dot always
                                ; specify a facet name
   restricted-name-chars =/ "+" ; Characters after last plus always
                                ; specify a structured syntax suffix

   ; Boilerplate from RFC 5234 and RFC 8866

   DIGIT     =  %x30-39           ; 0 - 9
   POS-DIGIT =  %x31-39           ; 1 - 9
   ALPHA     =  %x41-5A / %x61-7A ; A - Z / a - z
   SP        =  %x20
   VCHAR     =  %x21-7E           ; printable ASCII (no SP)

                Figure 5: ABNF Syntax of Content-Format-Spec

7.  Security Considerations

   The indication of a media type in the data does not exempt a
   consuming application from properly checking its inputs.  Also, the
   ability for an attacker to supply crafted SenML data that specifies
   media types chosen by the attacker may expose vulnerabilities of
   handlers for these media types to the attacker.  This includes
   "decompression bombs", compressed data that is crafted to decompress
   to extremely large data items.

8.  IANA Considerations

   IANA has assigned the following new labels in the "SenML Labels"
   subregistry of the "Sensor Measurement Lists (SenML)" registry
   [IANA.senml] (as defined in Section 12.2 of [RFC8428]) for the
   Content-Format indication, as per Table 1:

    +=====================+=======+===========+==========+===========+
    |                Name | Label | JSON Type | XML Type | Reference |
    +=====================+=======+===========+==========+===========+
    | Base Content-Format | bct   | String    | string   | RFC 9193  |
    +---------------------+-------+-----------+----------+-----------+
    |      Content-Format | ct    | String    | string   | RFC 9193  |
    +---------------------+-------+-----------+----------+-----------+

             Table 1: IANA Registration for New SenML Labels

   Note that, per Section 12.2 of [RFC8428], no CBOR labels nor
   Efficient XML Interchange (EXI) schemaId values (EXI ID column) are
   supplied.

9.  References

9.1.  Normative References

   [IANA.core-parameters]
              IANA, "Constrained RESTful Environments (CoRE)
              Parameters",
              <https://www.iana.org/assignments/core-parameters>.

   [IANA.http-parameters]
              IANA, "Hypertext Transfer Protocol (HTTP) Parameters",
              <https://www.iana.org/assignments/http-parameters>.

   [IANA.media-types]
              IANA, "Media Types",
              <https://www.iana.org/assignments/media-types>.

   [IANA.senml]
              IANA, "Sensor Measurement Lists (SenML)",
              <https://www.iana.org/assignments/senml>.

   [RFC2045]  Freed, N. and N. Borenstein, "Multipurpose Internet Mail
              Extensions (MIME) Part One: Format of Internet Message
              Bodies", RFC 2045, DOI 10.17487/RFC2045, November 1996,
              <https://www.rfc-editor.org/info/rfc2045>.

   [RFC2119]  Bradner, S., "Key words for use in RFCs to Indicate
              Requirement Levels", BCP 14, RFC 2119,
              DOI 10.17487/RFC2119, March 1997,
              <https://www.rfc-editor.org/info/rfc2119>.

   [RFC5234]  Crocker, D., Ed. and P. Overell, "Augmented BNF for Syntax
              Specifications: ABNF", STD 68, RFC 5234,
              DOI 10.17487/RFC5234, January 2008,
              <https://www.rfc-editor.org/info/rfc5234>.

   [RFC7252]  Shelby, Z., Hartke, K., and C. Bormann, "The Constrained
              Application Protocol (CoAP)", RFC 7252,
              DOI 10.17487/RFC7252, June 2014,
              <https://www.rfc-editor.org/info/rfc7252>.

   [RFC8174]  Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC
              2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174,
              May 2017, <https://www.rfc-editor.org/info/rfc8174>.

   [RFC8428]  Jennings, C., Shelby, Z., Arkko, J., Keranen, A., and C.
              Bormann, "Sensor Measurement Lists (SenML)", RFC 8428,
              DOI 10.17487/RFC8428, August 2018,
              <https://www.rfc-editor.org/info/rfc8428>.

   [RFC9110]  Fielding, R., Nottingham, M., and J. Reschke, "HTTP
              Semantics", STD 97, RFC 9110, DOI 10.17487/RFC9110,
              February 2022, <https://www.rfc-editor.org/rfc/rfc9110>.

9.2.  Informative References

   [RFC1590]  Postel, J., "Media Type Registration Procedure", RFC 1590,
              DOI 10.17487/RFC1590, March 1994,
              <https://www.rfc-editor.org/info/rfc1590>.

   [RFC4180]  Shafranovich, Y., "Common Format and MIME Type for Comma-
              Separated Values (CSV) Files", RFC 4180,
              DOI 10.17487/RFC4180, October 2005,
              <https://www.rfc-editor.org/info/rfc4180>.

   [RFC4648]  Josefsson, S., "The Base16, Base32, and Base64 Data
              Encodings", RFC 4648, DOI 10.17487/RFC4648, October 2006,
              <https://www.rfc-editor.org/info/rfc4648>.

   [RFC6690]  Shelby, Z., "Constrained RESTful Environments (CoRE) Link
              Format", RFC 6690, DOI 10.17487/RFC6690, August 2012,
              <https://www.rfc-editor.org/info/rfc6690>.

   [RFC6838]  Freed, N., Klensin, J., and T. Hansen, "Media Type
              Specifications and Registration Procedures", BCP 13,
              RFC 6838, DOI 10.17487/RFC6838, January 2013,
              <https://www.rfc-editor.org/info/rfc6838>.

   [RFC8866]  Begen, A., Kyzivat, P., Perkins, C., and M. Handley, "SDP:
              Session Description Protocol", RFC 8866,
              DOI 10.17487/RFC8866, January 2021,
              <https://www.rfc-editor.org/info/rfc8866>.

   [RFC8949]  Bormann, C. and P. Hoffman, "Concise Binary Object
              Representation (CBOR)", STD 94, RFC 8949,
              DOI 10.17487/RFC8949, December 2020,
              <https://www.rfc-editor.org/info/rfc8949>.

Acknowledgments

   The authors would like to thank Sérgio Abreu for the discussions
   leading to the design of this extension and Isaac Rivera for reviews
   and feedback.  Klaus Hartke suggested not burdening this document
   with a separate mandatory-to-implement version of the fields.  Alexey
   Melnikov, Jim Schaad, and Thomas Fossati provided helpful comments at
   Working Group Last Call.  Marco Tiloca asked for clarifying and using
   the term Content-Format-Spec.

Authors' Addresses

   Ari Keränen
   Ericsson
   FI-02420 Jorvas
   Finland
   Email: ari.keranen@ericsson.com

   Carsten Bormann
   Universität Bremen TZI
   Postfach 330440
   D-28359 Bremen
   Germany
   Phone: +49-421-218-63921
   Email: cabo@tzi.org