Subject: [Ace] Transporting different types of cnf objects - CBOR vs JSON

From: Jim Schaad <[email-masked]>
Date: Fri, 31 May 2019 17:51:50 -0700

Ludwig,

I have been doing some adaptions of my codebase for dealing with the MQTT
specification.  In the process of this, I have identified the following
items that I think needs some discussion.  They may not need changes in any
documents and maybe should get a new document.

1.  The MQTT document is using the content type "application/json" over
HTTPS for transporting messages.  Does there need to be an
"application/ace+json" defined as a media type, but not necessarily a CBOR
media type?  I think the answer may be yes, but it could be a new document.

2.  If I use a "COSE_Key" confirmation method inside of an
application/ace+json message, there is a potential problem and it could be
dealt with in a number of different ways. 
*  The JWT confirmation method is identified as "jwk".  The COSE key must be
translated into JOSE even if there is no equivalent key in JOSE.  I.e. that
is a fatal error
*  This does not make sense and the confirmation method should be changed to
"cwk" so that either key format could be used in either encoding.

3.  If the confirmation is changed, you would need to convert the COSE key
to a binary string, base64 encoded it and pass as a string when occurring in
a JSON encoding.  There is not any other valid way to do this (except see
above of just converting the key format).  However, the opposite of putting
a JOSE key into a COSE confirmation has three different options that could
be used.
*  Encode the JOSE key to a string and pass as a string
*  Encode the JOSE key top level map as CBOR but leave all of the elements
alone.
*  Encode the JOSE key in CBOR including conversion of base64 strings to
binary data.
(My first preference is probably the second option, but either of the first
two make sense.)

Jim