Re: [jose] Should we delete the "typ" header field

"Jim Schaad" <ietf@augustcellars.com> Wed, 29 May 2013 23:42 UTC

Return-Path: <ietf@augustcellars.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 30A2621F942B for <jose@ietfa.amsl.com>; Wed, 29 May 2013 16:42:12 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.35
X-Spam-Level:
X-Spam-Status: No, score=-3.35 tagged_above=-999 required=5 tests=[AWL=0.248, BAYES_00=-2.599, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-1]
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 v9yopWalHPan for <jose@ietfa.amsl.com>; Wed, 29 May 2013 16:42:06 -0700 (PDT)
Received: from smtp3.pacifier.net (smtp3.pacifier.net [64.255.237.177]) by ietfa.amsl.com (Postfix) with ESMTP id 2B75321F9524 for <jose@ietf.org>; Wed, 29 May 2013 16:42:05 -0700 (PDT)
Received: from Philemon (mail.augustcellars.com [50.34.17.238]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: jimsch@nwlink.com) by smtp3.pacifier.net (Postfix) with ESMTPSA id 2A57338EF2; Wed, 29 May 2013 16:42:05 -0700 (PDT)
From: Jim Schaad <ietf@augustcellars.com>
To: 'Richard Barnes' <rlb@ipv.sx>
References: <02b701ce5cb8$46ae77e0$d40b67a0$@augustcellars.com> <CAL02cgR+upF3DcS3XoviAucdje_4ctjhCDTNS53WsAOBzDoM8Q@mail.gmail.com>
In-Reply-To: <CAL02cgR+upF3DcS3XoviAucdje_4ctjhCDTNS53WsAOBzDoM8Q@mail.gmail.com>
Date: Wed, 29 May 2013 16:41:16 -0700
Message-ID: <02fa01ce5cc6$038ee720$0aacb560$@augustcellars.com>
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="----=_NextPart_000_02FB_01CE5C8B.5730D270"
X-Mailer: Microsoft Outlook 14.0
Thread-Index: AQL+gOaQctokYsIF5NqCLBrsp9OxugLaJNa3lqW4+JA=
Content-Language: en-us
Cc: jose@ietf.org
Subject: Re: [jose] Should we delete the "typ" header field
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, 29 May 2013 23:42:12 -0000

That would be true if it was mandatory to be present -however it is an
optional field.  So it is only sometimes helpful.

 

Jim

 

 

From: Richard Barnes [mailto:rlb@ipv.sx] 
Sent: Wednesday, May 29, 2013 3:45 PM
To: Jim Schaad
Cc: jose@ietf.org
Subject: Re: [jose] Should we delete the "typ" header field

 

As I understand it, "typ" lets you look at an object and tell if it's a JWE
or JWS.  That seems handy enough to keep around. 

 

Depending on how we do MIME types, it might even be necessary, namely if we
have a single application/jose type. I forget if that's the case in the
current docs. 



On Wednesday, May 29, 2013, Jim Schaad wrote:

In reading the documents, I am trying to understand the justification for
having the "typ" header parameter in the JOSE documents.

 

The purpose of the field is to hold the type of the object.  In the past, I
believe that values which should now be placed in the cty field (such as
"JWT") were placed in this field as well.  However the parameter is optional
and an implementation cannot rely on its being present.  This means that for
all practical purposes all of the code to determine the value of the type
field from the values of the alg and enc fields.  If the field was mandatory
then this code would disappear at a fairly small space cost and I can
understand why the parameter would be present.

 

Can anybody justify why this field should be present in the document - or
should it just disappear?

 

Jim