Re: [OAUTH-WG] JSON Web Token (JWT) Draft -04

Bob Gregory <pathogenix@gmail.com> Tue, 05 April 2011 16:08 UTC

Return-Path: <pathogenix@gmail.com>
X-Original-To: oauth@core3.amsl.com
Delivered-To: oauth@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id 6896728C11D; Tue, 5 Apr 2011 09:08:32 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.298
X-Spam-Level:
X-Spam-Status: No, score=-3.298 tagged_above=-999 required=5 tests=[AWL=-0.299, BAYES_00=-2.599, HTML_MESSAGE=0.001, J_CHICKENPOX_33=0.6, RCVD_IN_DNSWL_LOW=-1]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ix4cAqaafa5k; Tue, 5 Apr 2011 09:08:30 -0700 (PDT)
Received: from mail-qy0-f172.google.com (mail-qy0-f172.google.com [209.85.216.172]) by core3.amsl.com (Postfix) with ESMTP id 4E2BF28C0DE; Tue, 5 Apr 2011 09:08:30 -0700 (PDT)
Received: by qyk29 with SMTP id 29so1760871qyk.10 for <multiple recipients>; Tue, 05 Apr 2011 09:10:13 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=tAnIT6vUhE9Qgk3RwqiQYqL7tpokYYxGP+lLiyF7rYk=; b=JV/u0LrNMgdT9gqAkgwf939QNlPxfbnTnuFubo0hi/jof8/fRBYEnt9STlIHTHsR8t sDMTd7KQJLLLzApqb4nFBzgL8dofO0+jq2RtpJKVHvyADAbh4sz/ElNarqGrtHfk144f fL6xxvCH/4wlxoz2akUsKn5TUSZSdYDPlsJqA=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=usa+Td6yCKjiI3yGJLppH95cMcWNt8AnRVJ0GE1oxZIGWum03Vaa8wNz2tu/fxa+hD 2lgHN3pqRjSK8v+aRfvNkmTCg445z59J6cg5UVL0jH2OhI9wSByWxQifOQU0YqKpG12k idhVz+hl/W19vlX8GzWQsDTeBEgImxidJgV3k=
MIME-Version: 1.0
Received: by 10.229.8.194 with SMTP id i2mr7596657qci.190.1302019812859; Tue, 05 Apr 2011 09:10:12 -0700 (PDT)
Received: by 10.229.11.136 with HTTP; Tue, 5 Apr 2011 09:10:12 -0700 (PDT)
In-Reply-To: <4E1F6AAD24975D4BA5B1680429673943252BA221@TK5EX14MBXC203.redmond.corp.microsoft.com>
References: <4E1F6AAD24975D4BA5B1680429673943252B2BB6@TK5EX14MBXC203.redmond.corp.microsoft.com> <AANLkTi=pYrucDVi+7z1RQ_A243ZXCpQzYonGLSw-MAXL@mail.gmail.com> <4E1F6AAD24975D4BA5B1680429673943252BA221@TK5EX14MBXC203.redmond.corp.microsoft.com>
Date: Tue, 05 Apr 2011 17:10:12 +0100
Message-ID: <BANLkTi=oUbvtGvheBXGNWMPAd7eDO-G8xg@mail.gmail.com>
From: Bob Gregory <pathogenix@gmail.com>
To: Mike Jones <Michael.Jones@microsoft.com>
Content-Type: multipart/alternative; boundary="0016e64986486f9ebf04a02e1c0d"
Cc: "openid-specs-ab@lists.openid.net" <openid-specs-ab@lists.openid.net>, "woes@ietf.org" <woes@ietf.org>, "oauth@ietf.org" <oauth@ietf.org>, "openid-specs@lists.openid.net" <openid-specs@lists.openid.net>
Subject: Re: [OAUTH-WG] JSON Web Token (JWT) Draft -04
X-BeenThere: oauth@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: OAUTH WG <oauth.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/listinfo/oauth>, <mailto:oauth-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/oauth>
List-Post: <mailto:oauth@ietf.org>
List-Help: <mailto:oauth-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/oauth>, <mailto:oauth-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 05 Apr 2011 16:08:32 -0000

Hi Mike,

I'm going to start implementing draft 4 in the near future. At a cursory
reading, I'm concerned that splitting the specifications has not simplified
the language, rather it has confused the specification, and introduced
generalisation where there were formerly simple, specific cases.

If the long-term intent is that JWS and JWE should form composable
operations for signing and encrypting content, while JWT specifies a payload
format, then the specifications should be more clearly delineated. The
current JWT draft makes repeated references to headers and signatures, and
includes an appendix entry giving examples of signing. If JWS is the
specification for signing, then the JWT draft should drop these sections.

JWT then becomes a teeny-weeny specification consisting of an overview, a
table for reserved claim names, the rules for verifying those claims, and
some notes on creating custom claims.

Likewise, if JWS is intended to be a general mechanism for signing messages,
it would be preferable to see examples in the JWS spec which do not refer to
the JWT spec. Simple strings, or base64 encoded binary would make better
examples for JWS, without coupling the two specifications together.

As it stands, it's impossible to implement JWT without continual
cross-reference. It's much harder to gain a sense of how an implementation
ought to hang together than it used to be.

It's still possible for Jwt4net to be a compliant implementation of JWT
without supporting a generalised JWS implementation, but checking compliance
is going to be much harder. I think the next steps for the library, once
I've fixed a couple of glaring holes, will be to refactor out a full JWS
implementation, and treat JWT as a special case, but that adds accidental
complexity to what was a relatively simple library (barring my own
over-complication through stupidity).

I'm still a big fan of JWT as a standard, but I think the current spec
language is a step backwards for implementation.

 -- Bob Gregory

On Wed, Mar 30, 2011 at 4:37 PM, Mike Jones <Michael.Jones@microsoft.com>wrote:

>  Thanks, Bob.  That’s great to hear!
>
>
>
> I look forward to your feedback on the spec based upon your actual use.
>
>
>
>                                                             -- Mike
>
>
>
> *From:* Bob Gregory [mailto:pathogenix@gmail.com]
> *Sent:* Wednesday, March 30, 2011 8:36 AM
> *To:* Mike Jones
> *Cc:* woes@ietf.org; oauth@ietf.org; openid-specs-ab@lists.openid.net;
> openid-specs@lists.openid.net
>
> *Subject:* Re: [OAUTH-WG] JSON Web Token (JWT) Draft -04
>
>
>
> I've just uploaded a .Net implementation of JWT issuance and consumption to
> GitHub @ https://github.com/BobFromHuddle/Jwt4Net
>
>
>
> This is no way ready for public release, but is in use in a production
> system. It's based on draft 1, and I'll try and update it to draft 4
> compliance next week.
>
>
>
> We're intending to provide full coverage of  the JWT spec as it matures,
> the major block for us at the moment is the lack of a specification for the
> "jku" key encoding scheme. Until that's decided, we're using .Net's default
> serialization of private keys which is based on RFC 4050.
>
>
>
>  -- Bob Gregory
>
>
>
> On Wed, Mar 30, 2011 at 9:57 AM, Mike Jones <Michael.Jones@microsoft.com>
> wrote:
>
> Draft -04 of the JSON Web Token (JWT)<http://self-issued.info/docs/draft-jones-json-web-token.html>specification is available.  It corrects a typo found by John Bradley in
> -03.
>
>
>
> The draft is available at these locations:
>
> ·
> http://www.ietf.org/internet-drafts/draft-jones-json-web-token-04.txt
>
> ·
> http://www.ietf.org/internet-drafts/draft-jones-json-web-token-04.xml
>
> ·        http://self-issued.info/docs/draft-jones-json-web-token-04.html
>
> ·        http://self-issued.info/docs/draft-jones-json-web-token-04.txt
>
> ·        http://self-issued.info/docs/draft-jones-json-web-token-04.xml
>
> ·        http://self-issued.info/docs/draft-jones-json-web-token.html(will point to new versions as they are posted)
>
> ·        http://self-issued.info/docs/draft-jones-json-web-token.txt (will
> point to new versions as they are posted)
>
> ·        http://self-issued.info/docs/draft-jones-json-web-token.xml (will
> point to new versions as they are posted)
>
> ·        http://svn.openid.net/repos/specifications/json_web_token/1.0/(Subversion repository, with html, txt, and html versions available)
>
>
>
>                                                             -- Mike
>
>
>
>
>
>
> --
> An infinite number of mathematicians walk into a bar. The first one orders
> a beer. The second orders half a beer. The third, a quarter of a beer. The
> bartender says "You're all idiots", and pours two beers.
>



-- 
An infinite number of mathematicians walk into a bar. The first one orders a
beer. The second orders half a beer. The third, a quarter of a beer. The
bartender says "You're all idiots", and pours two beers.