Re: [jose] #16: URI identifying a specific key in a JWK set

"Manger, James H" <James.H.Manger@team.telstra.com> Mon, 01 April 2013 11:31 UTC

Return-Path: <James.H.Manger@team.telstra.com>
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 1AE2E21F88D6 for <jose@ietfa.amsl.com>; Mon, 1 Apr 2013 04:31:29 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: 1.073
X-Spam-Level: *
X-Spam-Status: No, score=1.073 tagged_above=-999 required=5 tests=[AWL=-0.485, BAYES_20=-0.74, HELO_EQ_AU=0.377, HOST_EQ_AU=0.327, J_CHICKENPOX_33=0.6, RELAY_IS_203=0.994]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ofAPcJr3H+xF for <jose@ietfa.amsl.com>; Mon, 1 Apr 2013 04:31:28 -0700 (PDT)
Received: from ipxbvo.tcif.telstra.com.au (ipxbvo.tcif.telstra.com.au [203.35.135.204]) by ietfa.amsl.com (Postfix) with ESMTP id 4B19C21F8564 for <jose@ietf.org>; Mon, 1 Apr 2013 04:31:27 -0700 (PDT)
X-IronPort-AV: E=Sophos;i="4.87,385,1363093200"; d="scan'208";a="126903806"
Received: from unknown (HELO ipcdvi.tcif.telstra.com.au) ([10.97.217.212]) by ipobvi.tcif.telstra.com.au with ESMTP; 01 Apr 2013 22:31:27 +1100
X-IronPort-AV: E=McAfee;i="5400,1158,7031"; a="123298574"
Received: from wsmsg3754.srv.dir.telstra.com ([172.49.40.198]) by ipcdvi.tcif.telstra.com.au with ESMTP; 01 Apr 2013 22:31:27 +1100
Received: from WSMSG3153V.srv.dir.telstra.com ([172.49.40.159]) by WSMSG3754.srv.dir.telstra.com ([172.49.40.198]) with mapi; Mon, 1 Apr 2013 22:31:26 +1100
From: "Manger, James H" <James.H.Manger@team.telstra.com>
To: jose issue tracker <trac+jose@trac.tools.ietf.org>, "michael.jones@microsoft.com" <michael.jones@microsoft.com>
Date: Mon, 01 Apr 2013 22:31:25 +1100
Thread-Topic: [jose] #16: URI identifying a specific key in a JWK set
Thread-Index: Ac4tnQgWihpBQ9pHTwau2soUHHbaewBKYBvQ
Message-ID: <255B9BB34FB7D647A506DC292726F6E1150C06EA64@WSMSG3153V.srv.dir.telstra.com>
References: <058.7d398c285ac07c1a4b2f1bfd0d8b7312@trac.tools.ietf.org> <073.97f52f55118bcf1f267077e78a7fa163@trac.tools.ietf.org>
In-Reply-To: <073.97f52f55118bcf1f267077e78a7fa163@trac.tools.ietf.org>
Accept-Language: en-US, en-AU
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
acceptlanguage: en-US, en-AU
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: base64
MIME-Version: 1.0
Cc: "jose@ietf.org" <jose@ietf.org>
Subject: Re: [jose] #16: URI identifying a specific key in a JWK set
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: Mon, 01 Apr 2013 11:31:29 -0000

> #16: URI identifying a specific key in a JWK set
> 
> 
> Comment (by michael.jones@microsoft.com):
> 
>  First, having just a "jku" value is often sufficient to determine which
>  key to use, as other parameters in the JWK Set such as the "use" or "alg"
>  parameters may be used to unambiguously determine which key to use. There
>  may also be only one key in the set.

Requiring recipients to try a bunch of extra parameters and heuristics in the hope of witling down a set of keys to the single public key needed to process a JOSE message is a poor "solution" for "jku" not being fit-for-purpose.

The originator knows which specific key is required (ie the pair for the private key the originator used) so why bother only telling the recipient which set contains the key, instead of which specific key to use?

Lets just make "jku" fit-for-purpose (of identifying the public key required to process a JOSE message). 


>  Second, we already support more than one means of disambiguating keys
>  within JWK Sets, including using the "kty", "kid", "use", and "alg" values
>  as inputs to this decision.

"kty" -- unless there are 2 RSA keys in the set
"use" -- unless there are 2 keys that can be used to sign
"alg" -- unless there are 2 keys that work with "RS256"
[Rollover a key and "kty", "use", and "alg" are all likely to be the same for old and new keys]
"kid" -- works, but 1 fit-for-purpose "jku" field would be much better than 2 jku+kid

>  And once the spec says that other fields must
>  be ignored if not understood, I'm sure that people will use other key
>  properties they'll invent such as ("current": true) to aid in the key
>  selection process for their applications.

That's great if it helps an originator discover a key. The recipient shouldn't have to use such heuristics.


>  I understand that the request may seem simple on the face of it, but doing
>  this in a general way would involve more than just using a "kid" value as
>  a fragment identifier for a "jku" value.  As such, the proposal seems
>  underspecified to me.

The item in the issue tracker deliberately focuses on the issue, without being prescriptive about the solution.


>  Furthermore, if all that's being conveyed is a "jku" value and a "kid"
>  value pair - we already have a straightforward way of doing that - include
>  both parameters in the header.  Whereas requiring implementations to
>  support two ways of accepting the same information doesn't seem like a
>  good cost/benefit tradeoff.

Trying "jku" + ("kty" or "use" or "alg" or "kid") feels even worse than "two ways".

Drop "kid" in this context (identifying the public key a recipient needs to use to process a JOSE message) and only use "jku" -- that gives one way. This also solves Dick Hardt's point that a "kid" can be ambiguous without an issuer (the URI is effectively the issuer).


--
James Manger