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

From: Cigdem Sengul <[email-masked]>
Date: Wed, 2 Oct 2019 13:00:31 +0100

Hello all,

I am trying to implement this discussion in the draft.  A point is raised
about COSE keys in JSON messages.
Could it be possible to go with:
(1) HTTPS - application/ace+json - jwt - jose - PoP for JWT
or
(2) CoAP - application/ace+cbor - cwt - cose - PoP for CWT
without mixing anything?

(1) we thought to describe by default in the document, and (2) we said MAY
be supported.
Is there a problem with this approach?

Thanks,
--Cigdem

On Tue, Jun 4, 2019 at 9:29 PM Cigdem Sengul <[email-masked]>
wrote:

> Hello,
> Yes, we thought supporting JSON option would be good, though indeed there
> is no issue with transporting CBOR.
> If there are no other concerns, we can define the new media type in the
> MQTT draft.
> Will add the issue to GitHub repo.
>
> --Cigdem
>
> On Tue, Jun 4, 2019 at 7:37 PM Jim Schaad <[email-masked]> wrote:
>
>>
>>
>> > -----Original Message-----
>> > From: Ace <[email-masked]> On Behalf Of Ludwig Seitz
>> > Sent: Monday, June 3, 2019 11:51 PM
>> > To: [email-masked]
>> > Subject: Re: [Ace] Transporting different types of cnf objects - CBOR
>> vs JSON
>> >
>> > On 01/06/2019 02:51, Jim Schaad wrote:
>> > > 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.
>> > >
>> > I would argue that the first draft using such a media type would be the
>> right
>> > place to specify it. However I'm not sure using JSON is the right
>> approach for
>> > an ACE specification at all, aren't we supposed to cater for the
>> constrained
>> > world?
>> > What is there to prevent us from transporting CBOR over HTTP?
>>
>> There would be no reason that one cannot transport CBOR over HTTP.
>> During the discussions for these drafts Hannes was very explicit that he
>> wanted to be able to use JSON rather than CBOR with the protocol that was
>> defined by ACE.  This would mean that there needs to be an ability to use
>> JSON with the ACE framework document.
>>
>> I would have no problems with the statement that the MQTT document would
>> be a good place to define the new media type.
>>
>> >
>> > > 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.
>> > >
>> >
>> > If we use JSON messages mixing in COSE becomes awkward. If the use case
>> > calls for JSON, I'd argue it should also use RFC7800 instead of
>> draft-ietf-ace-
>> > cwt-proof-of-possession.
>>
>> I would not have a problem with this, it was one of the options above.  I
>> was just expanding my code to allow for JSON to be used and ran into this.
>> I just wanted to get a clear group decision on this before I put things
>> into stone.
>>
>> Jim
>>
>> >
>> > > 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
>> > >
>> >
>> > I'm still unsure that there is a good use case for transporting JOSE
>> keys in
>> > CBOR, but if such a case turns up, I would agree that touching the
>> encoding
>> > as little as possible is a good idea (=option 1 or 2).
>> >
>> > /Ludwig
>> >
>> > --
>> > Ludwig Seitz, PhD
>> > Security Lab, RISE
>> > Phone +46(0)70-349 92 51
>>
>>
>> _______________________________________________
>> Ace mailing list
>> [email-masked]
>> https://www.ietf.org/mailman/listinfo/ace
>>
>

---

From: Carsten Bormann <[email-masked]>
Date: Wed, 2 Oct 2019 15:04:56 +0200

There is no strong interdependency between Web transfer protocol (HTTPS/CoAPS) and data format.
COSE works great over HTTPS, and if it must be, you can ship JOSE over CoAPS.

Grüße, Carsten

> On Oct 2, 2019, at 14:00, Cigdem Sengul <[email-masked]> wrote:
> 
> Hello all, 
> 
> I am trying to implement this discussion in the draft.  A point is raised about COSE keys in JSON messages. 
> (1) we thought to describe by default in the document, and (2) we said MAY be supported. 
> On Tue, Jun 4, 2019 at 9:29 PM Cigdem Sengul <[email-masked]> wrote:
> Hello,
> Yes, we thought supporting JSON option would be good, though indeed there is no issue with transporting CBOR.. 
> If there are no other concerns, we can define the new media type in the MQTT draft. 
> > Subject: Re: [Ace] Transporting different types of cnf objects - CBOR vs JSON
> > 
> > I would argue that the first draft using such a media type would be the right
> > place to specify it. However I'm not sure using JSON is the right approach for
> > an ACE specification at all, aren't we supposed to cater for the constrained
> > world?
> There would be no reason that one cannot transport CBOR over HTTP.  During the discussions for these drafts Hannes was very explicit that he wanted to be able to use JSON rather than CBOR with the protocol that was defined by ACE.  This would mean that there needs to be an ability to use JSON with the ACE framework document.
> 
> I would have no problems with the statement that the MQTT document would be a good place to define the new media type.
> 
> > 
> > calls for JSON, I'd argue it should also use RFC7800 instead of draft-ietf-ace-
> > cwt-proof-of-possession.
> 
> I would not have a problem with this, it was one of the options above.  I was just expanding my code to allow for JSON to be used and ran into this.  I just wanted to get a clear group decision on this before I put things into stone.
> 
> Jim
> 
> > 
> > I'm still unsure that there is a good use case for transporting JOSE keys in
> > CBOR, but if such a case turns up, I would agree that touching the encoding

---

From: Hannes Tschofenig <[email-masked]>
Date: Thu, 3 Oct 2019 06:42:33 +0000

There is unfortunately a problem.

With proof-of-possession keys there is more than just conveying the CWT/JWT over another transport.
In the PK-case, the client has to provide the public key to the server and get it bound to the PoP token.
In the symmetric key case, the server has to provide the token along with the symmetric key that is also included although encrypted) in the PoP token.

We have standardized the transport of this additional information in ACE for use with CoAP but for HTTP we decided to do the work on OAuth, where it got stuck because the IoT-interested people are not there and the Web folks want something else.

Ciao
Hannes

-----Original Message-----
From: Ace <[email-masked]> On Behalf Of Carsten Bormann
Sent: Mittwoch, 2. Oktober 2019 15:05
To: Cigdem Sengul <[email-masked]>
Cc: Jim Schaad <[email-masked]>; Ludwig Seitz <[email-masked]>; [email-masked]
Subject: Re: [Ace] Transporting different types of cnf objects - CBOR vs JSON

Grüße, Carsten

> (1) HTTPS - application/ace+json - jwt - jose - PoP for JWT or
> (2) CoAP - application/ace+cbor - cwt - cose - PoP for CWT without
> mixing anything?
>
> > > 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.
> > >
> > > "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.
> > >
> > I would argue that the first draft using such a media type would be
> > the right place to specify it. However I'm not sure using JSON is
> > the right approach for an ACE specification at all, aren't we
> > supposed to cater for the constrained world?
> > > *  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
> > If we use JSON messages mixing in COSE becomes awkward. If the use
> > case calls for JSON, I'd argue it should also use RFC7800 instead of
> > draft-ietf-ace- cwt-proof-of-possession.
>
> > > 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 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
> > >
> >
> > keys in CBOR, but if such a case turns up, I would agree that
> > touching the encoding as little as possible is a good idea (=option 1 or 2).
> >
> > /Ludwig
> >
> > --
> > Ludwig Seitz, PhD
> > Security Lab, RISE
> > Phone +46(0)70-349 92 51
>
>

_______________________________________________
Ace mailing list
[email-masked]
https://www.ietf.org/mailman/listinfo/ace
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.

---

From: Cigdem Sengul <[email-masked]>
Date: Thu, 3 Oct 2019 11:37:06 +0100

Hello,

Thank you for your responses.

Until this issue is resolved, is it OK just to point to RFC 7800, which
says the client provides the symmetric PoP key?

For MQTT draft,  would like to explain that C-RS is MQTT - MQTT may carry
JSON/CBOR encoding for the Data fields in the packets.

C-AS and RS-AS can be HTTPS/CoAP/MQTT - what we describe in the draft it is
HTTPS; MQTT support needs more thought for request-response style
communication.
For HTTPS/CoAP, application/ace+json or application/ace+cbor content
formats.

Since this info is a bit muddled in the current draft, I would like to
ensure there is a clear paragraph, which the workgroup would be fine with.

Thank you for your help.
Sincerely,
--Cigdem

On Thu, Oct 3, 2019 at 7:42 AM Hannes Tschofenig <[email-masked]>
wrote:

> In the symmetric key case, the server has to provide the token along with
> the symmetric key that is also included although encrypted) in the PoP
> token.
>
> We have standardized the transport of this additional information in ACE
> for use with CoAP but for HTTP we decided to do the work on OAuth, where it
> got stuck because the IoT-interested people are not there and the Web folks
> want something else.
>
> Ciao
> Hannes
>
> > Yes, we thought supporting JSON option would be good, though indeed
> there is no issue with transporting CBOR..
> > I would not have a problem with this, it was one of the options above.
> I was just expanding my code to allow for JSON to be used and ran into
> this.  I just wanted to get a clear group decision on this before I put
> things into stone.
> >
> > Jim
> >
> > >
> IMPORTANT NOTICE: The contents of this email and any attachments are
> confidential and may also be privileged. If you are not the intended
> recipient, please notify the sender immediately and do not disclose the
> contents to any other person, use it for any purpose, or store or copy the
> information in any medium. Thank you.
>

---

From: Hannes Tschofenig <[email-masked]>
Date: Thu, 3 Oct 2019 10:42:02 +0000

I believe the current approach is for the server to provide the symmetric key (rather than the client).

I have no idea when this topic gets resolved because folks keep changing their mind so quickly.

From: Cigdem Sengul <[email-masked]>
Sent: Donnerstag, 3. Oktober 2019 12:37
To: Hannes Tschofenig <[email-masked]>
Cc: Carsten Bormann <[email-masked]>; Jim Schaad <[email-masked]>; Ludwig Seitz <[email-masked]>; [email-masked]
Subject: Re: [Ace] Transporting different types of cnf objects - CBOR vs JSON

Hello,

Until this issue is resolved, is it OK just to point to RFC 7800, which says the client provides the symmetric PoP key?

For MQTT draft,  would like to explain that C-RS is MQTT - MQTT may carry JSON/CBOR encoding for the Data fields in the packets.

C-AS and RS-AS can be HTTPS/CoAP/MQTT - what we describe in the draft it is HTTPS; MQTT support needs more thought for request-response style communication.
For HTTPS/CoAP, application/ace+json or application/ace+cbor content formats.

Since this info is a bit muddled in the current draft, I would like to ensure there is a clear paragraph, which the workgroup would be fine with.

Thank you for your help.
Sincerely,
--Cigdem

On Thu, Oct 3, 2019 at 7:42 AM Hannes Tschofenig <[email-masked]<mailto:[email-masked]>> wrote:
There is unfortunately a problem.

Ciao
Hannes

-----Original Message-----
From: Ace <[email-masked]<mailto:[email-masked]>> On Behalf Of Carsten Bormann
Sent: Mittwoch, 2. Oktober 2019 15:05
To: Cigdem Sengul <[email-masked]<mailto:[email-masked]>>
Cc: Jim Schaad <[email-masked]<mailto:[email-masked]>>; Ludwig Seitz <[email-masked]<mailto:[email-masked]>>; [email-masked]<mailto:[email-masked]>
Subject: Re: [Ace] Transporting different types of cnf objects - CBOR vs JSON

Grüße, Carsten

> On Oct 2, 2019, at 14:00, Cigdem Sengul <[email-masked]<mailto:[email-masked]>> wrote:
>
> Hello all,
>
> On Tue, Jun 4, 2019 at 9:29 PM Cigdem Sengul <[email-masked]<mailto:[email-masked]>> wrote:
> Hello,
> On Tue, Jun 4, 2019 at 7:37 PM Jim Schaad <[email-masked]<mailto:[email-masked]>> wrote:
>
>
> > From: Ace <[email-masked]<mailto:[email-masked]>> On Behalf Of Ludwig Seitz
> > To: [email-masked]<mailto:[email-masked]>
> [email-masked]<mailto:[email-masked]>
> [email-masked]<mailto:[email-masked]>

_______________________________________________
Ace mailing list
[email-masked]<mailto:[email-masked]>
https://www.ietf.org/mailman/listinfo/ace
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.

---

From: Carsten Bormann <[email-masked]>
Date: Thu, 3 Oct 2019 13:25:12 +0200

On Oct 3, 2019, at 08:42, Hannes Tschofenig <[email-masked]> wrote:
> 
> but for HTTP we decided to do the work on OAuth, where it got stuck because the IoT-interested people are not there and the Web folks want something else.

…so should we organize a mass-walkin of the ACE people at the OAuth meeting in Bangkok?

Is there a good way to find out what the Web people want and why?

Grüße, Carsten