Re: [jose] A modest proposal for JSON-izing JW*

Richard Barnes <rlb@ipv.sx> Wed, 06 February 2013 20:23 UTC

Return-Path: <rlb@ipv.sx>
X-Original-To: jose@ietfa.amsl.com
Delivered-To: jose@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 2A65C21F867B for <jose@ietfa.amsl.com>; Wed, 6 Feb 2013 12:23:55 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.574
X-Spam-Level:
X-Spam-Status: No, score=-0.574 tagged_above=-999 required=5 tests=[AWL=-0.149, BAYES_00=-2.599, FH_RELAY_NODNS=1.451, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, RDNS_NONE=0.1]
Received: from mail.ietf.org ([64.170.98.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id UbtfZENgrrHa for <jose@ietfa.amsl.com>; Wed, 6 Feb 2013 12:23:54 -0800 (PST)
Received: from mail-la0-x241.google.com (la-in-x0241.1e100.net [IPv6:2a00:1450:4010:c03::241]) by ietfa.amsl.com (Postfix) with ESMTP id ED11B21F85D2 for <jose@ietf.org>; Wed, 6 Feb 2013 12:23:36 -0800 (PST)
Received: by mail-la0-f65.google.com with SMTP id fq12so276728lab.0 for <jose@ietf.org>; Wed, 06 Feb 2013 12:23:35 -0800 (PST)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-received:x-originating-ip:in-reply-to:references :date:message-id:subject:from:to:cc:content-type:x-gm-message-state; bh=nZfPRo3QbluP+s/ezwxpOwIxgRrwWOJqmV+hKt1V4ls=; b=XaH4UwFpfnv6DwDDHpdd6CNjRpUsn30yUqCeuSOfhRntgg97HdonUVUZEoMP7okodM SpGAtvvDtVmtnweOwKFkdlifnNrgJkKe4f8hdP+P3xVc+Qas6YIHFp5XTtvu5oGQeMVZ zW674e38F25s0Ok+3lQtNN/KKSFe9heoAjOI3Ep4adxKDJ8eAPEjPmN1EFpkT4EIZAxQ 24x5FfI/ekzi7KIH0+hindSRAoAecmU+VHZwu1IIR5yonpNSOMefeYdZWlusGin3NqHL p2gJsIAdxPU12L6KK2XxV2yBG7NhcayWBYOTMdLprkKqVMtvksx78Mzuh76rFO8RlXNo aQAw==
MIME-Version: 1.0
X-Received: by 10.112.42.5 with SMTP id j5mr11581104lbl.37.1360182215531; Wed, 06 Feb 2013 12:23:35 -0800 (PST)
Received: by 10.112.147.164 with HTTP; Wed, 6 Feb 2013 12:23:35 -0800 (PST)
X-Originating-IP: [155.212.214.60]
In-Reply-To: <4E1F6AAD24975D4BA5B16804296739436741806E@TK5EX14MBXC284.redmond.corp.microsoft.com>
References: <CAL02cgQt8cj26KunfDvez+TBKgpvsdfN6Oe1XFTbkyWuSxPA9Q@mail.gmail.com> <4E1F6AAD24975D4BA5B16804296739436741806E@TK5EX14MBXC284.redmond.corp.microsoft.com>
Date: Wed, 6 Feb 2013 15:23:35 -0500
Message-ID: <CAL02cgQH5SCw9bGryn-LR3+-AdiHwPj+cQjhxrqMT4YESai3XA@mail.gmail.com>
From: Richard Barnes <rlb@ipv.sx>
To: Mike Jones <Michael.Jones@microsoft.com>
Content-Type: multipart/alternative; boundary=e0cb4efe3572c95d7204d514190b
X-Gm-Message-State: ALoCoQkvd03ym1GDkEENZZu9wnNJPi/cIkfdSK2wC5T1Uzh86Ij8DsrFkABRt2N9vBLCxCcKlKel
Cc: "jose@ietf.org" <jose@ietf.org>
Subject: Re: [jose] A modest proposal for JSON-izing JW*
X-BeenThere: jose@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Javascript Object Signing and Encryption <jose.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/jose>, <mailto:jose-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/jose>
List-Post: <mailto:jose@ietf.org>
List-Help: <mailto:jose-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/jose>, <mailto:jose-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 06 Feb 2013 20:23:55 -0000

No disagreement. The main proposal here is to put JSON into the base specs.
It's developer friendly, and compliant with the charter!


On Wed, Feb 6, 2013 at 2:49 PM, Mike Jones <Michael.Jones@microsoft.com>wrote;wrote:

>  I’ll note that these are nearly identical to the JSON Serialization
> encodings already specified in
> http://tools.ietf.org/html/draft-jones-jose-jws-json-serialization-04 and
> http://tools.ietf.org/html/draft-jones-jose-jwe-json-serialization-04,
> other than you’re precluding multiple recipients.  The syntax:****
>
> ** **
>
>      {"recipients":[****
>
>        {"header":"<header 1 contents>",****
>
>         "signature":"<signature 1 contents>"},****
>
>        ...****
>
>        {"header":"<header N contents>",****
>
>         "signature":"<signature N contents>"}],****
>
>       "payload":"<payload contents>"****
>
>      }****
>
> ** **
>
> really isn’t far from what you’re proposing below.  It just has an array
> of per-recipient header fields, since accommodating multiple recipients is
> also a working group goal.****
>
> ** **
>
> Once the rechartering is done, we’ll have working group JSON serialization
> specifications.  It’s a separate question whether to combine the compact
> and JSON serializations into the same document or to leave them separate.
> The revised charter will allow us to do either.****
>
> ** **
>
>                                                             -- Mike****
>
> ** **
>
> *From:* jose-bounces@ietf.org [mailto:jose-bounces@ietf.org] *On Behalf
> Of *Richard Barnes
> *Sent:* Wednesday, February 06, 2013 11:29 AM
> *To:* jose@ietf.org
> *Subject:* [jose] A modest proposal for JSON-izing JW*****
>
> ** **
>
> Dear JOSE,****
>
> ** **
>
> tl;dr: Let's please add a simple JSON encoding to the base JW* specs.****
>
> ** **
>
> I've been complaining for a while that the JW* documents aren't JSON, and
> that the JSON serialization documents are too complex (because of the
> integrity check issues).  So I thought it was about time that I made an
> actual proposal for encoding the base JOSE object as JSON objects.  The
> approach would be essentially the same as in the JSON serialization
> documents, except with a focus on single objects.****
>
> ** **
>
> JWE and JWS objects currently have the following form****
>
> ** **
>
> jws = header.data.signature****
>
> jwe = header.key.iv.ciphertext.mac****
>
> ** **
>
> The JSON encoding of a JWE/JWS would just take each of these
> Base64-encoded pieces and assign them a name in a JSON structure.****
>
> ** **
>
> jws = {****
>
>     "header": header,****
>
>     "data": data,****
>
>     "signature": signature****
>
> }****
>
> ** **
>
> jwe = {****
>
>     "header": header,****
>
>     "key": key,****
>
>     "iv": iv,****
>
>     "data": ciphertext,****
>
>     "mac": mac****
>
> }****
>
> ** **
>
> It seems to me that these encodings are simple enough that they could be
> handled in a short section, in parallel to what I would call the "text
> serialization" in the current documents.  So I would like to propose that
> they be added to the base JWE and JWS documents.****
>
> ** **
>
> Thanks,****
>
> --Richard****
>