Re: [jose] draft-jones-jose-jws-signing-input-options 00

Sergey Beryozkin <sberyozkin@gmail.com> Mon, 14 September 2015 10:02 UTC

Return-Path: <sberyozkin@gmail.com>
X-Original-To: jose@ietfa.amsl.com
Delivered-To: jose@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 58D3B1A1B79 for <jose@ietfa.amsl.com>; Mon, 14 Sep 2015 03:02:20 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2
X-Spam-Level:
X-Spam-Status: No, score=-2 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, SPF_PASS=-0.001] autolearn=ham
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 0jCCVXX83bQq for <jose@ietfa.amsl.com>; Mon, 14 Sep 2015 03:02:18 -0700 (PDT)
Received: from mail-wi0-x233.google.com (mail-wi0-x233.google.com [IPv6:2a00:1450:400c:c05::233]) (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 69EFB1A872F for <jose@ietf.org>; Mon, 14 Sep 2015 03:02:18 -0700 (PDT)
Received: by wicfx3 with SMTP id fx3so132793333wic.1 for <jose@ietf.org>; Mon, 14 Sep 2015 03:02:17 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-type:content-transfer-encoding; bh=jA4JdkT99KKNZqkrTATcTzsCGpSR1r9tBNTbLYpIyUg=; b=ErA5XK8+4d+b1BSe4sH2T58sBTLhch4JlR2jZbOpShtjiXNebtds/Bapjafh6WLpnF Dt6mGOScvdHaKAB0FML8PL6GOQrAUssy0w8l0DyN75Dcseyac3euKSGCWqaqA2QTORLN wcrA9LQippvxHdsd97RfbyaFAqlkyBsQ42heeaPSJBdWyTgVOZ0a1FhRZtle1N8d0W6b epNgoeoi4n1uT3G1xrDFxC5Gwa+AHwr6EtuvN+JfwRJme2PPlvMErYCe5sZ4Fs8qMPvE YIivu4qU8d3lsoH0XTw66Q36Wy/D84oZl8otes+vJ0E/ru4Drm/b2A2ojIse8aFkyx6N xpkA==
X-Received: by 10.180.84.162 with SMTP id a2mr25461461wiz.70.1442224937074; Mon, 14 Sep 2015 03:02:17 -0700 (PDT)
Received: from [10.36.226.3] ([80.169.137.63]) by smtp.googlemail.com with ESMTPSA id m4sm14632546wjb.37.2015.09.14.03.02.16 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 14 Sep 2015 03:02:16 -0700 (PDT)
To: Mike Jones <Michael.Jones@microsoft.com>, Jim Schaad <ietf@augustcellars.com>, "draft-jones-jose-jws-signing-input-options@tools.ietf.org" <draft-jones-jose-jws-signing-input-options@tools.ietf.org>
References: <041c01d0cda1$16b7fe10$4427fa30$@augustcellars.com> <BY2PR03MB442CFD69CA29CD1AB023D2BF5700@BY2PR03MB442.namprd03.prod.outlook.com> <002f01d0d33b$e43febf0$acbfc3d0$@augustcellars.com> <BY2PR03MB4429E9046EA98DA60846EECF55D0@BY2PR03MB442.namprd03.prod.outlook.com>
From: Sergey Beryozkin <sberyozkin@gmail.com>
Message-ID: <55F69B27.2050102@gmail.com>
Date: Mon, 14 Sep 2015 11:02:15 +0100
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0
MIME-Version: 1.0
In-Reply-To: <BY2PR03MB4429E9046EA98DA60846EECF55D0@BY2PR03MB442.namprd03.prod.outlook.com>
Content-Type: text/plain; charset="windows-1252"; format="flowed"
Content-Transfer-Encoding: 8bit
Archived-At: <http://mailarchive.ietf.org/arch/msg/jose/PkhQkjZuKPCUgJ6OMtVfrKocpq8>
Cc: "jose@ietf.org" <jose@ietf.org>
Subject: Re: [jose] draft-jones-jose-jws-signing-input-options 00
X-BeenThere: jose@ietf.org
X-Mailman-Version: 2.1.15
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: <https://mailarchive.ietf.org/arch/browse/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: Mon, 14 Sep 2015 10:02:20 -0000

Hi Mike, Jim, All,

Only one comment,

>  > Are % characters URL safe?  What if my content for compact is %24.02
>
>  > (or whatever the correct code for $ is).  Would I remove that
> serialization as well?
>
> That's a good question.  More to the point, would we want to consider
> allowing the period to also be escaped by representing "$.02" as
> "%24%2E02", rendering the payload URL-safe and parseable.  It would mean
> that we would end up defining that RFC 3986 percent-encoding be used for
> unencoded JWS Compact Serialization payloads, when needed.
>
> What do others think about whether we should go there or not?  To me, it
> seems like a worthwhile experiment to at least write it down and see
> what we think of it.
>
> Mike> Per RFC 3986, % is not URL-safe (although is it used for
> www-form-url-encoding of characters as %<hex><hex>).  If we allow %, it
> opens up a Pandora’s box of a bunch of choices we need to make, as well
> as possibilities.  I’ll send a message specifically about those choices
> and possibilities to the working group (but not tonight).
>
Sorry if I just missed the point, but IMHO processing the payload should 
be left up to the application which gets it from a JWS.
I.e,

"$.02"
"%24%2E02"

are two different representations for the purpose of signing/validating 
them. "b64" does not only help making JWS JSON payload easier to 
understand by humans (in logs or tcp traces) but is also an optimization 
(no need to base64-encode). Having to check every character in such a 
payload to make sure '.' is percent-encoded kind makes this optimization 
much less effective, IMHO. Besides, JWS JSON are not meant to be URI 
safe payloads, I recall reading about it.
May be it is more useful for detached payloads...

Thanks, Sergey