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

"Manger, James H" <James.H.Manger@team.telstra.com> Thu, 06 June 2013 02:19 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 5346611E80E2 for <jose@ietfa.amsl.com>; Wed, 5 Jun 2013 19:19:12 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: 1.698
X-Spam-Level: *
X-Spam-Status: No, score=1.698 tagged_above=-999 required=5 tests=[HELO_EQ_AU=0.377, HOST_EQ_AU=0.327, 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 yIIHTu54ZTAo for <jose@ietfa.amsl.com>; Wed, 5 Jun 2013 19:19:06 -0700 (PDT)
Received: from ipxcvo.tcif.telstra.com.au (ipxcvo.tcif.telstra.com.au [203.35.135.208]) by ietfa.amsl.com (Postfix) with ESMTP id 3F49911E80E4 for <jose@ietf.org>; Wed, 5 Jun 2013 19:19:00 -0700 (PDT)
X-IronPort-AV: E=Sophos;i="4.87,810,1363093200"; d="scan'208";a="139932565"
Received: from unknown (HELO ipccvi.tcif.telstra.com.au) ([10.97.217.208]) by ipocvi.tcif.telstra.com.au with ESMTP; 06 Jun 2013 12:18:59 +1000
X-IronPort-AV: E=McAfee;i="5400,1158,7097"; a="136759411"
Received: from wsmsg3754.srv.dir.telstra.com ([172.49.40.198]) by ipccvi.tcif.telstra.com.au with ESMTP; 06 Jun 2013 12:18:59 +1000
Received: from WSMSG3153V.srv.dir.telstra.com ([172.49.40.159]) by WSMSG3754.srv.dir.telstra.com ([172.49.40.198]) with mapi; Thu, 6 Jun 2013 12:18:59 +1000
From: "Manger, James H" <James.H.Manger@team.telstra.com>
To: Nat Sakimura <sakimura@gmail.com>
Date: Thu, 06 Jun 2013 12:18:57 +1000
Thread-Topic: [jose] Should we delete the "typ" header field
Thread-Index: Ac5iTXXx3btvRzA5Q52SxQXmyk5oHAAA26UQ
Message-ID: <255B9BB34FB7D647A506DC292726F6E1151B105B2B@WSMSG3153V.srv.dir.telstra.com>
References: <02b701ce5cb8$46ae77e0$d40b67a0$@augustcellars.com> <CAD9ie-vK3gY9b9GQrbUa=TACy5KVA1uPH_u_utucoKzVynjuiA@mail.gmail.com> <02f501ce5cc5$ec9a2200$c5ce6600$@augustcellars.com> <CAD9ie-uV-THE0+oL-dNUB0qXF7sx8jHMZDCz8vGESmUHWV=LMg@mail.gmail.com> <4E1F6AAD24975D4BA5B1680429673943677C58C4@TK5EX14MBXC285.redmond.corp.microsoft.com> <CAD9ie-sm7q6gdzC-aTKt=+b=A8wB68ExTP1FwiT=zQTN7b69zA@mail.gmail.com> <4E1F6AAD24975D4BA5B1680429673943677C5C0A@TK5EX14MBXC285.redmond.corp.microsoft.com> <CAL02cgR=Lh5_HogPtgoFM+qhwNkqOFaW0+TzOCAziUwK8ZqQaw@mail.gmail.com> <4E1F6AAD24975D4BA5B1680429673943677C7399@TK5EX14MBXC285.redmond.corp.microsoft.com> <CAL02cgR6XfSwHxOLym_pkM+9EOE8yRUEncLToKbrLVJxoOgxDg@mail.gmail.com> <4E1F6AAD24975D4BA5B1680429673943677C9B69@TK5EX14MBXC285.redmond.corp.microsoft.com> <CAL02cgTrpkt0PyvLmnSKTchST5hgbzjkLQMq3hr6O2pij7LgjQ@mail.gmail.com> <4E1F6AAD24975D4BA5B1680429673943677C9E95@TK5EX14MBXC285.redmond.corp.microsoft.com> <CABzCy2Cd6LJB63b8REsyW0yjS=2DMBaSwsL-ZUnwG-aCXJ5P-Q@mail.gmail.com> <CA+k3eCT6Dq2jo6Lx6SEMkNDrLKREJTkzwNxT7ggJHDJtvQVG2A@mail.gmail.com> <CAL02cgSeurHAEsAtEaEDYAko2Or8dFAOx8QWe-G2e4nss_AX4g@mail.gmail.com> <CABzCy2DtkqzSSC9Xgy7Gkf0_cxuV7Zn5Jux+NRPiF1LO6PtObw@mail.gmail.com> <CAL02cgTLpoYuh3iMrYtOKrYR82GqWQyzCnEZh6d0Li8Wxgn8bA@mail.gmail.com> <CABzCy2DpkF=LD13jZb5B6-4fFxZO37Aj9vh8HRBupRxNd6Mpfg@mail.gmail.com>
In-Reply-To: <CABzCy2DpkF=LD13jZb5B6-4fFxZO37Aj9vh8HRBupRxNd6Mpfg@mail.gmail.com>
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] 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: Thu, 06 Jun 2013 02:19:12 -0000

> typ: timestamp

By verifying a signed JOSE message you know that the holder of the corresponding private key "processed" the bytes of the content.
What it doesn't tell you is whether the signer meant:
1. They didn't look at the content (eg signing an authentication challenge; timestamping arbitrary data)
2. They are vouching for the syntax, not meaning, of the content (eg anti-malware check; syntax checker)
3. They are committing to the content (eg signing a contract; vouching for claims)

It is probably best for the distinction between these to be bound to the verification public key. For instance, including a critical extendedKeyUsage extension in the public key's certificate with a value id-kp-timeStamping [RFC3161 Time-Stamp Protocol].

Next, the content type ('cty' field) should distinguish these cases. Signing the same JWT claim set, but with 'cty' set to 'application/octet-stream', 'application/json', or 'application/jwt+json'(*) could/should imply different meanings (1, 2, and 3 respectively).

Even if there are cases where a header parameter is useful for this purpose (despite JWE/JWS nor JWT being such a use case), 'typ' as currently defined cannot be the answer as it is optional and ignorable. A recipient receiving a JOSE message with {"typ":"timestamp"...} can legitimately ignore "typ" and assume the signer is committing to the content.


(*) I don't think application/jwt+json is a defined media type. I didn't use application/jwt as it is defined in the JWT draft as a media type for JOSE messages (which is crazy), instead of a media type for a JSON object holding claims (which it should be).

--
James Manger