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

Cigdem Sengul <cigdem.sengul@gmail.com> Thu, 03 October 2019 10:37 UTC

Return-Path: <cigdem.sengul@gmail.com>
X-Original-To: ace@ietfa.amsl.com
Delivered-To: ace@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 37A38120091 for <ace@ietfa.amsl.com>; Thu, 3 Oct 2019 03:37:22 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.998
X-Spam-Level:
X-Spam-Status: No, score=-1.998 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id hTojvaH0_mig for <ace@ietfa.amsl.com>; Thu, 3 Oct 2019 03:37:19 -0700 (PDT)
Received: from mail-qt1-x82c.google.com (mail-qt1-x82c.google.com [IPv6:2607:f8b0:4864:20::82c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id BD5CA12011A for <ace@ietf.org>; Thu, 3 Oct 2019 03:37:18 -0700 (PDT)
Received: by mail-qt1-x82c.google.com with SMTP id c3so2807674qtv.10 for <ace@ietf.org>; Thu, 03 Oct 2019 03:37:18 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=bnhhtotB02HFwB96dGuxSLl3adp8jk0br/nf73Yxd5I=; b=e1QZ0SI+3grKonUpPyImA813JgjJeYHSKqKcuTo3Je2J5ANqLHpTkKZBDKDChaXwBs mUvkX3GbVkPp6UrWZoT4kmDTqw7hmZTxtQX3tloTqqqkvxSck/LGmp9bN6vnU6VdUkRx BfNRCAzs8p7rC+2yEkCad6bVsZvjwE4lh7HdhZU6cO1d35W/GEH3stImYf1W3eGhyaNp SZaEVdwWvqPaAm3JyvdUS2nqICwGyyJ8YLaHg3kghOJ48XumyDbX9kYPkEED7OqnvjM/ Bf+w3wiAt8UagkhX+lgw9/qZT3Tq6rWBuhbp2CF1ai2J4G/DqZjRZFVVyfknpLuxuBfo BaUA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=bnhhtotB02HFwB96dGuxSLl3adp8jk0br/nf73Yxd5I=; b=tcyKk2yP8AEJahnHKEWDh1lqO6r06ZDrVmBnBfqp/+LIryjTnWlCABi5IRsmVzj7zM 6p+4MYTzpyHuajpl7Kqy/UbfaAHKZvWFRoYJIccKcjnNj4QOyX/VPZESc/BphjZgwaJ7 x89hmW5O61/YfsEQ1BpcPEQoKTq3Tz8HEeu0LBWntCL43RAl3iWf30cP0uTDRga2QiYs vTSpOx2jJ23OFSe1jmSyrV/wUClA4gUBpUSJfJcZDYtWuh+xbAXTbWyopKTqFGO4YPif 0hjpkMJusxxTFaMlRMpaecfxdRm90DhTNIzpwvd+J5iHqJ2YcksOrXi+aZLiCgiCihJ+ ksrQ==
X-Gm-Message-State: APjAAAVnG8XzeC/WdTxkfEl3JBWHMcZNuBLA+jP66wzdxAHyxoUThAfI XlUOKHk2L4lmXD7sD1mOd4UTjNLyRxuKqKPpryY=
X-Google-Smtp-Source: APXvYqwRIesgWBrtgciz6DLz2ndCFOjhWeduES6a0kNw3M/Ipiq3jua5Ah/MmIUNLgrwaNosN88sQ3vBTai/4gb2HHs=
X-Received: by 2002:ac8:2af8:: with SMTP id c53mr9438791qta.344.1570099037721; Thu, 03 Oct 2019 03:37:17 -0700 (PDT)
MIME-Version: 1.0
References: <000201d51814$34a85fc0$9df91f40$@augustcellars.com> <9a0bbcd4-6055-729c-7ca8-205d0a1fd681@ri.se> <010901d51b04$92788a10$b7699e30$@augustcellars.com> <CAA7SwCPunMN6S0xwVd0nCKx_zwdGbgj-UVPOa7hRq6gMv7WUAg@mail.gmail.com> <CAA7SwCO_jb8aFW+hX9sf6pxm07=LGZ2tLtwv6u92k11zyexVbw@mail.gmail.com> <586CDF5F-F0E4-4514-8AB7-AAA383CA23FB@tzi.org> <VI1PR08MB5360B971D9424FA5AB652595FA9F0@VI1PR08MB5360.eurprd08.prod.outlook.com>
In-Reply-To: <VI1PR08MB5360B971D9424FA5AB652595FA9F0@VI1PR08MB5360.eurprd08.prod.outlook.com>
From: Cigdem Sengul <cigdem.sengul@gmail.com>
Date: Thu, 3 Oct 2019 11:37:06 +0100
Message-ID: <CAA7SwCOYW742y-C6XBhku2mNQ76QvsznqgNCX6kDUssJHTZoMg@mail.gmail.com>
To: Hannes Tschofenig <Hannes.Tschofenig@arm.com>
Cc: Carsten Bormann <cabo@tzi.org>, Jim Schaad <ietf@augustcellars.com>, Ludwig Seitz <ludwig.seitz@ri.se>, "ace@ietf.org" <ace@ietf.org>
Content-Type: multipart/alternative; boundary="00000000000067d8ae0593ff2b22"
Archived-At: <https://mailarchive.ietf.org/arch/msg/ace/GYEtOeae16FEWcEw2F9ri0kOFLg>
Subject: Re: [Ace] Transporting different types of cnf objects - CBOR vs JSON
X-BeenThere: ace@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Authentication and Authorization for Constrained Environments \(ace\)" <ace.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/ace>, <mailto:ace-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/ace/>
List-Post: <mailto:ace@ietf.org>
List-Help: <mailto:ace-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/ace>, <mailto:ace-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 03 Oct 2019 10:37:23 -0000

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 <Hannes.Tschofenig@arm.com>;
wrote:

> 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 <ace-bounces@ietf.org>; On Behalf Of Carsten Bormann
> Sent: Mittwoch, 2. Oktober 2019 15:05
> To: Cigdem Sengul <cigdem.sengul@gmail.com>;
> Cc: Jim Schaad <ietf@augustcellars.com>;; Ludwig Seitz <ludwig.seitz@ri.se>;;
> ace@ietf.org
> Subject: Re: [Ace] Transporting different types of cnf objects - CBOR vs
> JSON
>
> 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 <cigdem.sengul@gmail.com>; wrote:
> >
> > 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 <cigdem.sengul@gmail.com>;
> 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 <ietf@augustcellars.com>;
> wrote:
> >
> >
> > > -----Original Message-----
> > > From: Ace <ace-bounces@ietf.org>; On Behalf Of Ludwig Seitz
> > > Sent: Monday, June 3, 2019 11:51 PM
> > > To: ace@ietf.org
> > > 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
> > Ace@ietf.org
> > https://www.ietf.org/mailman/listinfo/ace
> > _______________________________________________
> > Ace mailing list
> > Ace@ietf.org
> > https://www.ietf.org/mailman/listinfo/ace
>
> _______________________________________________
> Ace mailing list
> Ace@ietf.org
> 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.
>