
From nobody Sat Jul  1 01:01:02 2017
Return-Path: <simo@redhat.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 B33E21315E7 for <jose@ietfa.amsl.com>; Sat,  1 Jul 2017 01:01:00 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.902
X-Spam-Level: 
X-Spam-Status: No, score=-6.902 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_HI=-5, RP_MATCHES_RCVD=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
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 KFko503GrZPZ for <jose@ietfa.amsl.com>; Sat,  1 Jul 2017 01:00:59 -0700 (PDT)
Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 36FA31315E6 for <jose@ietf.org>; Sat,  1 Jul 2017 01:00:59 -0700 (PDT)
Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 59A6F81235 for <jose@ietf.org>; Sat,  1 Jul 2017 08:00:58 +0000 (UTC)
DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 59A6F81235
Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=simo@redhat.com
DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 59A6F81235
Received: from rhino.ipa.ssimo.org (ovpn-116-100.phx2.redhat.com [10.3.116.100]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3E31570C00; Sat,  1 Jul 2017 08:00:53 +0000 (UTC)
Message-ID: <1498896051.11334.78.camel@redhat.com>
From: Simo Sorce <simo@redhat.com>
To: Nathaniel McCallum <npmccallum@redhat.com>, jose@ietf.org
Cc: Nikos Mavrogiannopoulos <nmav@redhat.com>, Daiki Ueno <dueno@redhat.com>
Date: Sat, 01 Jul 2017 04:00:51 -0400
In-Reply-To: <CAOASepNR_1XjDaCHUyLL_o63EvBcQ6L1TyeMhdUzrbmtYSWRNg@mail.gmail.com>
References: <CAOASepNR_1XjDaCHUyLL_o63EvBcQ6L1TyeMhdUzrbmtYSWRNg@mail.gmail.com>
Content-Type: text/plain; charset="UTF-8"
Mime-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12
X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Sat, 01 Jul 2017 08:00:58 +0000 (UTC)
Archived-At: <https://mailarchive.ietf.org/arch/msg/jose/EDkLyYnJbr5cDk29dlvG7Q0SO5E>
Subject: Re: [jose] PKCS #11 for JWK
X-BeenThere: jose@ietf.org
X-Mailman-Version: 2.1.22
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: Sat, 01 Jul 2017 08:01:01 -0000

On Fri, 2017-06-30 at 17:33 -0400, Nathaniel McCallum wrote:
> I have prepared an initial stab at a draft for offloading JWK private
> key data to PKCS #11.
> 
> You can find the document here:
>    https://www.ietf.org/id/draft-mccallum-jose-pkcs11-jwk-00.txt
> 
> Thanks for your consideration!

It's a nice start.
A few immediate comments:

   JWKs that wish to offload their private key material using PKCS #11
   will provide a JSON property named "p11" instead of the private key
   material.

JWKs are inanimate objects, hard to have them have any wish :-)

I would say:
"Users that wish to offload their JWKs private key material to an HSM
..."

Later on you talk about performance penalty and say:

   Implementations SHOULD perform public
   key operations, such as asymmetric signature verification or
   asymmetric encryption, without using PKCS #11

I think this should be at most a MAY. If I wanted to be more pedantic I
would say you should take in consideration there may be PKCS#11 modules
that are already smart enough to implement such functions in software
so that they do not incur in performance penalties, so the whole this
would have to be wrapped in something like:
 "If the PKCS#11 implementation perform public key operation in hardare
that may result in poor performance then implementations MAY perfrom
public ..."


Curious to see example JWKs in the appendix.

HTH,
Simo.


From nobody Sat Jul  1 05:42:28 2017
Return-Path: <nmccallu@redhat.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 0134512ECB7 for <jose@ietfa.amsl.com>; Sat,  1 Jul 2017 05:42:27 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.419
X-Spam-Level: 
X-Spam-Status: No, score=-1.419 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HK_RANDOM_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_SORBS_SPAM=0.5, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=no autolearn_force=no
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 CwgJLgp11oQF for <jose@ietfa.amsl.com>; Sat,  1 Jul 2017 05:42:25 -0700 (PDT)
Received: from mail-it0-f49.google.com (mail-it0-f49.google.com [209.85.214.49]) (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 3B62A12ECB6 for <jose@ietf.org>; Sat,  1 Jul 2017 05:42:25 -0700 (PDT)
Received: by mail-it0-f49.google.com with SMTP id m84so37135313ita.0 for <jose@ietf.org>; Sat, 01 Jul 2017 05:42:25 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=wJayq9tlrer1HLG1MqHWCAUqvigNOXTs+Pra/tLFWfg=; b=PH42o/8avHVKAp8poqtI2XBeZQDbADkz4+fbUcizX0DtcKNGAESKBh3sIVfnYTA4b5 KOP/fuv6rUEy9lyK1/JTRtt4wCRkTbRM1P4Zx+GBQqWXvE8JM3kekL9fZWRhmtEHb+pW tiBjnKIgNrCMobsx8x95Yiz35ytdVIZqAw/Fy9a0atoe6I0Ul/SIhIZ2ROdH1gkodci6 n4FsV6RorUmzU43sEaWcMvAv8WyRVT3CtHFpFIde+MYDzTgE93Vj7kcg4o8CqouWd0EX O8LIeIkUpaBVxrU2w8iLcAIfCluzulACouIqSCTYoYH35erTOjAkpU3moaZPndWsBCVB jx6A==
X-Gm-Message-State: AIVw1122jPxJcdxtwkvjkL9bD01TFWFEJS8odN0slEvsr8kZ/AM/Thx0 Vl8mqFDGES8k7hXNpUP0L8iIQAe6XrGA
X-Received: by 10.36.248.131 with SMTP id a125mr722302ith.50.1498912943382; Sat, 01 Jul 2017 05:42:23 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.107.132.88 with HTTP; Sat, 1 Jul 2017 05:42:22 -0700 (PDT)
In-Reply-To: <1498896051.11334.78.camel@redhat.com>
References: <CAOASepNR_1XjDaCHUyLL_o63EvBcQ6L1TyeMhdUzrbmtYSWRNg@mail.gmail.com> <1498896051.11334.78.camel@redhat.com>
From: Nathaniel McCallum <npmccallum@redhat.com>
Date: Sat, 1 Jul 2017 08:42:22 -0400
Message-ID: <CAOASepPnTBq3hb=U6HP7ULaWX_GJy8ty-teUo2GQ-bZGt_ruww@mail.gmail.com>
To: Simo Sorce <simo@redhat.com>
Cc: jose@ietf.org, Nikos Mavrogiannopoulos <nmav@redhat.com>, Daiki Ueno <dueno@redhat.com>
Content-Type: text/plain; charset="UTF-8"
Archived-At: <https://mailarchive.ietf.org/arch/msg/jose/IJpv8P4u0z4XjPD5HcVYWl_V6dw>
Subject: Re: [jose] PKCS #11 for JWK
X-BeenThere: jose@ietf.org
X-Mailman-Version: 2.1.22
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: Sat, 01 Jul 2017 12:42:27 -0000

On Sat, Jul 1, 2017 at 4:00 AM, Simo Sorce <simo@redhat.com> wrote:
> On Fri, 2017-06-30 at 17:33 -0400, Nathaniel McCallum wrote:
>> I have prepared an initial stab at a draft for offloading JWK private
>> key data to PKCS #11.
>>
>> You can find the document here:
>>    https://www.ietf.org/id/draft-mccallum-jose-pkcs11-jwk-00.txt
>>
>> Thanks for your consideration!
>
> It's a nice start.
> A few immediate comments:
>
>    JWKs that wish to offload their private key material using PKCS #11
>    will provide a JSON property named "p11" instead of the private key
>    material.
>
> JWKs are inanimate objects, hard to have them have any wish :-)

You've never heard of personification? ;) You're right. I'll change it.

> I would say:
> "Users that wish to offload their JWKs private key material to an HSM
> ..."
>
> Later on you talk about performance penalty and say:
>
>    Implementations SHOULD perform public
>    key operations, such as asymmetric signature verification or
>    asymmetric encryption, without using PKCS #11
>
> I think this should be at most a MAY. If I wanted to be more pedantic I
> would say you should take in consideration there may be PKCS#11 modules
> that are already smart enough to implement such functions in software
> so that they do not incur in performance penalties, so the whole this
> would have to be wrapped in something like:
>  "If the PKCS#11 implementation perform public key operation in hardare
> that may result in poor performance then implementations MAY perfrom
> public ..."

If we downgrade this recommendation, then we probably need to discuss
how implementations would correlate public key and private key object
URIs. That is, "p11" refers only to the private key. For public key
crypto operations, we need a URI that refers to the public key. Thus,
we would need a way to either:

1. Store the public key URI.
2. Transmute the private key URI into a public key URI implicitly.

I'm not sure we can do #2. Sometimes keys are differentiated by id=.
Sometimes they are differentiated by object=. Thus we can't do a
single s/private/public/ on type= and expect things to work.
Therefore, I expect #1 is our only option.

Thoughts?

> Curious to see example JWKs in the appendix.

Will do!


From nobody Sat Jul  1 12:03:09 2017
Return-Path: <vladimir@connect2id.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 6BD6F129503 for <jose@ietfa.amsl.com>; Sat,  1 Jul 2017 12:03:08 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.919
X-Spam-Level: 
X-Spam-Status: No, score=-1.919 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=-0.01, RCVD_IN_MSPIKE_WL=-0.01, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
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 Wi1o2ICeBQP2 for <jose@ietfa.amsl.com>; Sat,  1 Jul 2017 12:03:06 -0700 (PDT)
Received: from p3plsmtpa07-02.prod.phx3.secureserver.net (p3plsmtpa07-02.prod.phx3.secureserver.net [173.201.192.231]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 725D81201F8 for <jose@ietf.org>; Sat,  1 Jul 2017 12:03:06 -0700 (PDT)
Received: from [192.168.43.252] ([212.5.158.102]) by :SMTPAUTH: with SMTP id RNf2d38ip0GfFRNf5dHRe6; Sat, 01 Jul 2017 12:02:35 -0700
To: Nathaniel McCallum <npmccallum@redhat.com>
Cc: jose@ietf.org
References: <CAOASepPs8CTEFJhELsuTOjU9k6nuyKUNsS5HUUji1JoSch6rxQ@mail.gmail.com> <010301d2f03b$8f1a7c20$ad4f7460$@augustcellars.com> <CAOASepPzao8d5C0CQQR2N2wYX+MyrACLkKfaAh+bGEwiyPXmgg@mail.gmail.com> <e3068935-6c24-e0b8-1093-acd4f282f250@connect2id.com> <CAOASepN6-13R=2CU3oJi9gSNAMqjsYNiuMVausvWQ8ruwb1Ojw@mail.gmail.com> <f49cd46c-1894-f4bd-eb58-b9ce419ecbc2@connect2id.com> <CAOASepMBGrfZaeT31uQkhDOvua6ZXd63nJ9-5aXqt6bzSmAnDw@mail.gmail.com>
From: Vladimir Dzhuvinov <vladimir@connect2id.com>
Organization: Connect2id Ltd.
Message-ID: <35c86d7d-eaec-adc0-e41a-9e186a8ba826@connect2id.com>
Date: Sat, 1 Jul 2017 21:02:25 +0200
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1
MIME-Version: 1.0
In-Reply-To: <CAOASepMBGrfZaeT31uQkhDOvua6ZXd63nJ9-5aXqt6bzSmAnDw@mail.gmail.com>
Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha-256; boundary="------------ms000705080603080802000408"
X-CMAE-Envelope: MS4wfAe+FuavzQxFISiFRGQnahx9xnE5EGYj2eKMUaqY2yjDZz8K3vDtibkocvdIf4gT2xURFeY2/JNK5RIx0HKszgS/ArWXKW82F284mjUKMAMmbrjGPRxV 525wdH3AR7gzon/90HYfvP9OVT9pT6rDyWJvkHhC6BikPCJMjg+NcE8KRJxZ+lgGsg2XbfymNmpT1gMTHyBcioxN+L36iOy7smw=
Archived-At: <https://mailarchive.ietf.org/arch/msg/jose/1b0uvKkhn-9SsRGaRccFh0TO-yE>
Subject: Re: [jose] PKCS#11 Support for JWKs
X-BeenThere: jose@ietf.org
X-Mailman-Version: 2.1.22
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: Sat, 01 Jul 2017 19:03:08 -0000

This is a cryptographically signed message in MIME format.

--------------ms000705080603080802000408
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
Content-Language: en-US



On 30/06/17 22:17, Nathaniel McCallum wrote:
> On Fri, Jun 30, 2017 at 2:30 PM, Vladimir Dzhuvinov
> <vladimir@connect2id.com> wrote:
>> I was unaware of this spec until you mentioned it here. I had a look a=
t it
>> last night. Am I correct that the pkcs11 URIs are simply a representat=
ion of
>> the config parameters used for loading Cryptoki libs and modules?
>>
>> I'm unsure how much of a utility a p11 parameter can have. The p11 URI=
s seem
>> to contain a lot of details that are not about the key, but about driv=
ers,
>> hardware, the OS. Also, parameters that can change, e.g. the HSM slots=
=2E We
>> have a machine with two HSMs, and after a reboot the HSMs can get a
>> different slot assigned, which can be nuisance.
> This doesn't really describe PKCS#11 URIs; or at least how they are
> used in practice. The URI standard itself is basically just a 1-to-1
> mapping of all possible metadata you can extract from PKCS #11. In
> that sense the standard is deficient in that it lets you generate URIs
> that can only work in certain contexts.
>
> However, in practice, implementations only use a reliable subset of
> properties*. So, for example, if you use p11tool -O, you do not
> receive slot identifiers (which, as you said, might change) in the
> generated URIs.  The resulting URIs will work on all OSes and HW
> configurations (so long as the same crypto hardware is used). Features
> like driver specification are relegated to the query string within the
> standard itself and are typically omitted in real world practice.
Thanks for the clarifications. I'm won over now :)

> It would be entirely possible (and, in fact, the default behavior of
> GNU TLS) for you to provide a URI that would match your HSM keys every
> time, reproducibly. This could be easily summed up in a new JWK
> standard which would recommend to avoid attributes that would make it
> difficult to match. (Again, this is not hard and is widely done
> already.)
>
> Yes, we could write a new standard URI that wouldn't have these
> caveats. But it would be much better to simply handles these cases
> within a "recommendations" section of a new JWK standard for the "p11"
> attribute.

+1 to keep that as a recommendations section. Doing a new standard for
the p11 URIs would be too much work.

>
>> When we used JWK sets backed by Cryptoki before we took the following
>> approach (in Java):
>>
>> Load PKCS#11 KeyStore.
>> Export the found PKCS#11 keys into a JWK set, where the key alias beco=
mes
>> the JWK "kid", the certificate is included as an option; each JWK keep=
s a
>> reference to the private key in the store.
>> If the private key is needed, that same reference is used to get at it=
=2E
> This is precisely what we don't want to do: build custom code every
> time we want to access crypto hardware. Instead, we want the Jos=C3=A9[=
0]
> project to have exactly the same interface whether crypto hardware is
> used or the private key is in the JWK directly. For example:
>
>     $ jose jwe dec -i my.jwe -O plain.txt -k mykey.jwk
>     $ jose jwe dec -i my.jwe -O plain.txt -k myhwkey.jwk
>
> In the above case, it doesn't matter whether the private key material
> is in the JWK directly or only referenced to by the JWK. We would
> provide exactly the same interface from the C API as well.
>
> This is going to be made all the more crucial for us given our (Red
> Hat's) broader adoption of PKCS #11 as a system level interface. That
> is, PKCS #11 is going to be much more common, not less. GNOME already
> exports PKCS #11 interfaces for its keyring. GNU TLS and OpenSC's PKCS
> #11 Engine for OpenSSL do too. This will be extended to the system
> level as well (we have active internal projects ongoing). We are even
> exploring a TPM interface via PKCS #11. All of these are using the
> URIs.

Having PKCS#11 support across the board is good for all who want to take
an extra step to secure their keys.

I hope that the PKCS standard will eventually catch up with the recent
CFRG work.

> We want JOSE to be a first class citizen in this world. And that
> should not involve writing special-case hardware code. It should be a
> matter of generating a properly formatted, standardized JWK.
>
> [0]: https://github.com/latchset/jose
>
> * - For example, GNU TLS outputs the following parameters as the full
> path to an object: model, manufacturer, serial, token, id, object and
> type. These uniquely identify a PKCS #11 key object in any context.



--------------ms000705080603080802000408
Content-Type: application/pkcs7-signature; name="smime.p7s"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="smime.p7s"
Content-Description: S/MIME Cryptographic Signature

MIAGCSqGSIb3DQEHAqCAMIACAQExDzANBglghkgBZQMEAgEFADCABgkqhkiG9w0BBwEAAKCC
CfwwggSvMIIDl6ADAgECAhEA4CPLFRKDU4mtYW56VGdrITANBgkqhkiG9w0BAQsFADBvMQsw
CQYDVQQGEwJTRTEUMBIGA1UEChMLQWRkVHJ1c3QgQUIxJjAkBgNVBAsTHUFkZFRydXN0IEV4
dGVybmFsIFRUUCBOZXR3b3JrMSIwIAYDVQQDExlBZGRUcnVzdCBFeHRlcm5hbCBDQSBSb290
MB4XDTE0MTIyMjAwMDAwMFoXDTIwMDUzMDEwNDgzOFowgZsxCzAJBgNVBAYTAkdCMRswGQYD
VQQIExJHcmVhdGVyIE1hbmNoZXN0ZXIxEDAOBgNVBAcTB1NhbGZvcmQxGjAYBgNVBAoTEUNP
TU9ETyBDQSBMaW1pdGVkMUEwPwYDVQQDEzhDT01PRE8gU0hBLTI1NiBDbGllbnQgQXV0aGVu
dGljYXRpb24gYW5kIFNlY3VyZSBFbWFpbCBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCC
AQoCggEBAImxDdp6UxlOcFIdvFamBia3uEngludRq/HwWhNJFaO0jBtgvHpRQqd5jKQi3xdh
TpHVdiMKFNNKAn+2HQmAbqUEPdm6uxb+oYepLkNSQxZ8rzJQyKZPWukI2M+TJZx7iOgwZOak
+FaA/SokFDMXmaxE5WmLo0YGS8Iz1OlAnwawsayTQLm1CJM6nCpToxDbPSBhPFUDj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
Return-Path: <vladimir@connect2id.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 C55D1127B60 for <jose@ietfa.amsl.com>; Sat,  1 Jul 2017 12:09:06 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.919
X-Spam-Level: 
X-Spam-Status: No, score=-1.919 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
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 VF7XEArMaeiU for <jose@ietfa.amsl.com>; Sat,  1 Jul 2017 12:09:05 -0700 (PDT)
Received: from p3plsmtpa07-01.prod.phx3.secureserver.net (p3plsmtpa07-01.prod.phx3.secureserver.net [173.201.192.230]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 5FFD41201F8 for <jose@ietf.org>; Sat,  1 Jul 2017 12:09:05 -0700 (PDT)
Received: from [192.168.43.252] ([212.5.158.102]) by :SMTPAUTH: with SMTP id RNkqdjmGbpV9MRNksdseSU; Sat, 01 Jul 2017 12:08:34 -0700
To: Nathaniel McCallum <npmccallum@redhat.com>, jose@ietf.org
Cc: Nikos Mavrogiannopoulos <nmav@redhat.com>, Daiki Ueno <dueno@redhat.com>,  "Sorce, Simo" <simo@redhat.com>
References: <CAOASepNR_1XjDaCHUyLL_o63EvBcQ6L1TyeMhdUzrbmtYSWRNg@mail.gmail.com>
From: Vladimir Dzhuvinov <vladimir@connect2id.com>
Organization: Connect2id Ltd.
Message-ID: <23b3748b-afa5-ad04-57ec-145e69565774@connect2id.com>
Date: Sat, 1 Jul 2017 21:08:24 +0200
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1
MIME-Version: 1.0
In-Reply-To: <CAOASepNR_1XjDaCHUyLL_o63EvBcQ6L1TyeMhdUzrbmtYSWRNg@mail.gmail.com>
Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha-256; boundary="------------ms050208080606050300030402"
X-CMAE-Envelope: MS4wfEcXpteL0tFf5zdmwiTHwoseJr3Fl6ZBc3Q+o/13eeYlK2VoB4721IZgRBswoHY6M1++GeFTYoM426n3KAeq6deBnCr/PUTbIojUt50AVedXM1/XqKEW VFNA/FIwPuUvp+ueEBY5vHjW3Jv4rCTiz5WvQKYECLxDEnNOD7E1DZuDNHHPwkw6saJj3wF3xCq6DQIIew+bBDYrnWxO4/nhcjzyBuNz0C5YfsM3sIGpW2xI 0m05YddspvgGZoBFwtHL7D7F7mZ6QpP6+RbFm2h6nJowCvS95mZKQ6g55It9NT5x
Archived-At: <https://mailarchive.ietf.org/arch/msg/jose/MSbEn65ytGCbMtK7qq0kIifjzUU>
Subject: Re: [jose] PKCS #11 for JWK
X-BeenThere: jose@ietf.org
X-Mailman-Version: 2.1.22
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: Sat, 01 Jul 2017 19:09:07 -0000

This is a cryptographically signed message in MIME format.

--------------ms050208080606050300030402
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
Content-Language: en-US

Looks good!

+1 to have examples included.

Question: When I parse a JWK with a "p11" parameter, should the p11 URI
syntax be validated? What constitutes a syntactically valid p11 URI?



On 30/06/17 23:33, Nathaniel McCallum wrote:
> I have prepared an initial stab at a draft for offloading JWK private
> key data to PKCS #11.
>
> You can find the document here:
>    https://www.ietf.org/id/draft-mccallum-jose-pkcs11-jwk-00.txt
>
> Thanks for your consideration!



--------------ms050208080606050300030402
Content-Type: application/pkcs7-signature; name="smime.p7s"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="smime.p7s"
Content-Description: S/MIME Cryptographic Signature

MIAGCSqGSIb3DQEHAqCAMIACAQExDzANBglghkgBZQMEAgEFADCABgkqhkiG9w0BBwEAAKCC
CfwwggSvMIIDl6ADAgECAhEA4CPLFRKDU4mtYW56VGdrITANBgkqhkiG9w0BAQsFADBvMQsw
CQYDVQQGEwJTRTEUMBIGA1UEChMLQWRkVHJ1c3QgQUIxJjAkBgNVBAsTHUFkZFRydXN0IEV4
dGVybmFsIFRUUCBOZXR3b3JrMSIwIAYDVQQDExlBZGRUcnVzdCBFeHRlcm5hbCBDQSBSb290
MB4XDTE0MTIyMjAwMDAwMFoXDTIwMDUzMDEwNDgzOFowgZsxCzAJBgNVBAYTAkdCMRswGQYD
VQQIExJHcmVhdGVyIE1hbmNoZXN0ZXIxEDAOBgNVBAcTB1NhbGZvcmQxGjAYBgNVBAoTEUNP
TU9ETyBDQSBMaW1pdGVkMUEwPwYDVQQDEzhDT01PRE8gU0hBLTI1NiBDbGllbnQgQXV0aGVu
dGljYXRpb24gYW5kIFNlY3VyZSBFbWFpbCBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCC
AQoCggEBAImxDdp6UxlOcFIdvFamBia3uEngludRq/HwWhNJFaO0jBtgvHpRQqd5jKQi3xdh
TpHVdiMKFNNKAn+2HQmAbqUEPdm6uxb+oYepLkNSQxZ8rzJQyKZPWukI2M+TJZx7iOgwZOak
+FaA/SokFDMXmaxE5WmLo0YGS8Iz1OlAnwawsayTQLm1CJM6nCpToxDbPSBhPFU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2017
Return-Path: <nmccallu@redhat.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 5BD41127B60 for <jose@ietfa.amsl.com>; Sat,  1 Jul 2017 12:16:28 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.419
X-Spam-Level: 
X-Spam-Status: No, score=-1.419 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HK_RANDOM_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_SORBS_SPAM=0.5, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=no autolearn_force=no
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 M6dpR3naUQOG for <jose@ietfa.amsl.com>; Sat,  1 Jul 2017 12:16:26 -0700 (PDT)
Received: from mail-it0-f45.google.com (mail-it0-f45.google.com [209.85.214.45]) (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 C5CAD1200B9 for <jose@ietf.org>; Sat,  1 Jul 2017 12:16:26 -0700 (PDT)
Received: by mail-it0-f45.google.com with SMTP id v202so73897018itb.0 for <jose@ietf.org>; Sat, 01 Jul 2017 12:16:26 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=jdMiqkZtqpSXg2ZC88mxncD4pFvvxUQK7gp00WVXd0Y=; b=Mg4vUQj+ffRtUxBrFUCGgbEWo9FZfQioMC9N9HRgGcglJs8lMTprW/y3aUV7v5OOhc c6D5MUGP3lyHpQzBiTZodIRZFv/8tqfcgamHy1yP4EreMk7NyQQ8virIWI5pWNqRpxm8 8CmkQlQs3kU6EAmp/pipRG88teZUTfdhRSoZ1SnyI0JT3Z6xoQF1PYkvdKnBL+u6FAc2 axbGOsaeMmCD7ynkE1YHlliSKd7kp1IgvL8j6qbptOHZjjF8NrS9FBilcocnJXA/11kE nAOhYgSsaOBmPdXQC9rsmZbo1Edu3yk5SCz9dFCFdQvZGTS2MzWiNUbeVD5LfQfWwBQ2 RD8Q==
X-Gm-Message-State: AKS2vOzlzS14XXXuRQ2NTCUN9Ac1eV/gwj/fw6yerqgjqMQNv92aGSJm QRuTD7m0sRczopNmVrXnSLYPxzQhbAha
X-Received: by 10.36.60.206 with SMTP id m197mr24676801ita.3.1498936585474; Sat, 01 Jul 2017 12:16:25 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.107.132.88 with HTTP; Sat, 1 Jul 2017 12:16:24 -0700 (PDT)
In-Reply-To: <23b3748b-afa5-ad04-57ec-145e69565774@connect2id.com>
References: <CAOASepNR_1XjDaCHUyLL_o63EvBcQ6L1TyeMhdUzrbmtYSWRNg@mail.gmail.com> <23b3748b-afa5-ad04-57ec-145e69565774@connect2id.com>
From: Nathaniel McCallum <npmccallum@redhat.com>
Date: Sat, 1 Jul 2017 15:16:24 -0400
Message-ID: <CAOASepO58BdisbrwPfzSaGf3mWnCr+mS0TdoeWAaLbwyQ1j0cg@mail.gmail.com>
To: Vladimir Dzhuvinov <vladimir@connect2id.com>
Cc: jose@ietf.org, Nikos Mavrogiannopoulos <nmav@redhat.com>, Daiki Ueno <dueno@redhat.com>, "Sorce, Simo" <simo@redhat.com>
Content-Type: text/plain; charset="UTF-8"
Archived-At: <https://mailarchive.ietf.org/arch/msg/jose/o9gaStD0cPTrcwDc7xWZnTP7ck4>
Subject: Re: [jose] PKCS #11 for JWK
X-BeenThere: jose@ietf.org
X-Mailman-Version: 2.1.22
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: Sat, 01 Jul 2017 19:16:28 -0000

Section 3 states:

'The "p11" property MUST contain a valid PKCS #11 URI [RFC7517] that
points to a private key object (that is, type=private).'

As I understand this sentence, the "p11" URI should be validated
according to RFC 7517 with the additional constraint that it must have
type=private.

On Sat, Jul 1, 2017 at 3:08 PM, Vladimir Dzhuvinov
<vladimir@connect2id.com> wrote:
> Looks good!
>
> +1 to have examples included.
>
> Question: When I parse a JWK with a "p11" parameter, should the p11 URI
> syntax be validated? What constitutes a syntactically valid p11 URI?
>
>
>
> On 30/06/17 23:33, Nathaniel McCallum wrote:
>> I have prepared an initial stab at a draft for offloading JWK private
>> key data to PKCS #11.
>>
>> You can find the document here:
>>    https://www.ietf.org/id/draft-mccallum-jose-pkcs11-jwk-00.txt
>>
>> Thanks for your consideration!
>
>


From nobody Sat Jul  1 12:17:46 2017
Return-Path: <nmccallu@redhat.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 321B71201F8 for <jose@ietfa.amsl.com>; Sat,  1 Jul 2017 12:17:45 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.199
X-Spam-Level: 
X-Spam-Status: No, score=-4.199 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HK_RANDOM_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-2.8, RCVD_IN_SORBS_SPAM=0.5, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
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 MWjGHENqw5Ll for <jose@ietfa.amsl.com>; Sat,  1 Jul 2017 12:17:43 -0700 (PDT)
Received: from mail-io0-f171.google.com (mail-io0-f171.google.com [209.85.223.171]) (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 4B9EA1200B9 for <jose@ietf.org>; Sat,  1 Jul 2017 12:17:43 -0700 (PDT)
Received: by mail-io0-f171.google.com with SMTP id r36so38656501ioi.1 for <jose@ietf.org>; Sat, 01 Jul 2017 12:17:43 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=JqPQgh4MA/zTYo0hWmo7axy28Zi/EvAwdhaSU0QK0u4=; b=fnqsaN3laj8EZhcntn39JY2Oq2Fb9y9qNkIho4ukA3zzHKp0YEldD3QCxhQ4Ae2Y52 PB9UddtAooULS3u0/1utZLFMISbmPajEKERDBmgxB6C3WaOJ/73bqV6PQhzXhdXyCePD 3y4hmWAlOVlEApC44zFF5p1hzO3bPLVcLM7+c6KzE/hNvTTDFLpSvTfcZ71WDd+mZh0H eiFYp2xpMaG7G9n+f9L64l284vgydIiJCiIeO+59Y0QXVbBzBJGJyDH2zBaCRmeJn35J Q74Vgz1tcyW8kLJfD1E6L4RnaXld6axBD3XTzNYrDUvnjWGHDWhl1Qr5f3NbKizLVePP 0KeA==
X-Gm-Message-State: AKS2vOynEdUDT3X6qMFS8bi3kjp+V+s1OdDLAJu6byPlmoRmYnePykiI EFr2gk6pe7drv1GAOFgAttq2pjCBVUeR
X-Received: by 10.107.173.66 with SMTP id w63mr30540792ioe.24.1498936662604; Sat, 01 Jul 2017 12:17:42 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.107.132.88 with HTTP; Sat, 1 Jul 2017 12:17:42 -0700 (PDT)
In-Reply-To: <CAOASepO58BdisbrwPfzSaGf3mWnCr+mS0TdoeWAaLbwyQ1j0cg@mail.gmail.com>
References: <CAOASepNR_1XjDaCHUyLL_o63EvBcQ6L1TyeMhdUzrbmtYSWRNg@mail.gmail.com> <23b3748b-afa5-ad04-57ec-145e69565774@connect2id.com> <CAOASepO58BdisbrwPfzSaGf3mWnCr+mS0TdoeWAaLbwyQ1j0cg@mail.gmail.com>
From: Nathaniel McCallum <npmccallum@redhat.com>
Date: Sat, 1 Jul 2017 15:17:42 -0400
Message-ID: <CAOASepMJGM3k5s=OqT5CG2L_AAtetu_fyC=YtbK-eBz1gRS42Q@mail.gmail.com>
To: Vladimir Dzhuvinov <vladimir@connect2id.com>
Cc: jose@ietf.org, Nikos Mavrogiannopoulos <nmav@redhat.com>, Daiki Ueno <dueno@redhat.com>, "Sorce, Simo" <simo@redhat.com>
Content-Type: text/plain; charset="UTF-8"
Archived-At: <https://mailarchive.ietf.org/arch/msg/jose/eu6HTaAXkFgfeDQv-mzkqA55l2M>
Subject: Re: [jose] PKCS #11 for JWK
X-BeenThere: jose@ietf.org
X-Mailman-Version: 2.1.22
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: Sat, 01 Jul 2017 19:17:45 -0000

(That does appear to be a typo. The RFC should be 7512.)

On Sat, Jul 1, 2017 at 3:16 PM, Nathaniel McCallum
<npmccallum@redhat.com> wrote:
> Section 3 states:
>
> 'The "p11" property MUST contain a valid PKCS #11 URI [RFC7517] that
> points to a private key object (that is, type=private).'
>
> As I understand this sentence, the "p11" URI should be validated
> according to RFC 7517 with the additional constraint that it must have
> type=private.
>
> On Sat, Jul 1, 2017 at 3:08 PM, Vladimir Dzhuvinov
> <vladimir@connect2id.com> wrote:
>> Looks good!
>>
>> +1 to have examples included.
>>
>> Question: When I parse a JWK with a "p11" parameter, should the p11 URI
>> syntax be validated? What constitutes a syntactically valid p11 URI?
>>
>>
>>
>> On 30/06/17 23:33, Nathaniel McCallum wrote:
>>> I have prepared an initial stab at a draft for offloading JWK private
>>> key data to PKCS #11.
>>>
>>> You can find the document here:
>>>    https://www.ietf.org/id/draft-mccallum-jose-pkcs11-jwk-00.txt
>>>
>>> Thanks for your consideration!
>>
>>


From nobody Sat Jul  1 13:23:57 2017
Return-Path: <vladimir@connect2id.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 A19E8129AB7 for <jose@ietfa.amsl.com>; Sat,  1 Jul 2017 13:23:56 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.699
X-Spam-Level: 
X-Spam-Status: No, score=-4.699 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-2.8, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
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 JDLcQQLv3nHw for <jose@ietfa.amsl.com>; Sat,  1 Jul 2017 13:23:55 -0700 (PDT)
Received: from p3plsmtpa11-07.prod.phx3.secureserver.net (p3plsmtpa11-07.prod.phx3.secureserver.net [68.178.252.108]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 48089126B7E for <jose@ietf.org>; Sat,  1 Jul 2017 13:23:55 -0700 (PDT)
Received: from [192.168.43.252] ([212.39.89.6]) by :SMTPAUTH: with SMTP id ROvGdW0xrTDDTROvJdDxnk; Sat, 01 Jul 2017 13:23:24 -0700
To: Nathaniel McCallum <npmccallum@redhat.com>
Cc: Nikos Mavrogiannopoulos <nmav@redhat.com>, Daiki Ueno <dueno@redhat.com>,  "Sorce, Simo" <simo@redhat.com>, jose@ietf.org
References: <CAOASepNR_1XjDaCHUyLL_o63EvBcQ6L1TyeMhdUzrbmtYSWRNg@mail.gmail.com> <23b3748b-afa5-ad04-57ec-145e69565774@connect2id.com> <CAOASepO58BdisbrwPfzSaGf3mWnCr+mS0TdoeWAaLbwyQ1j0cg@mail.gmail.com> <CAOASepMJGM3k5s=OqT5CG2L_AAtetu_fyC=YtbK-eBz1gRS42Q@mail.gmail.com>
From: Vladimir Dzhuvinov <vladimir@connect2id.com>
Organization: Connect2id Ltd.
Message-ID: <0b30e2c3-2dfc-6176-d401-7f533782d3c3@connect2id.com>
Date: Sat, 1 Jul 2017 22:23:14 +0200
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1
MIME-Version: 1.0
In-Reply-To: <CAOASepMJGM3k5s=OqT5CG2L_AAtetu_fyC=YtbK-eBz1gRS42Q@mail.gmail.com>
Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha-256; boundary="------------ms090804030605050301000304"
X-CMAE-Envelope: MS4wfPzyg3oteiR9GDxpRCH2BEZteAV6KyNz+xrXHuTHpv43izAFL9eEqGs6hyV1CMhOEQs6Lgv1/0cRkh01KG6lMTyNxPUup7FCdDpsLlJQX+wVC0843+sH /zVU4P/Zjd/rO6AGhmVHMnbeODIXC5IGb0TO08TjpE5WyG/nI1Le2+2lm88E83kY+28CbtjZnWpVF5qIGF9W7PzTw3DUAqxJ9+y+bfWEPhP9x41SSDPkv2NB zCfsdToU+e3dZ5Uz62JMzC/8mNJHNC7svrAuVJqySQc=
Archived-At: <https://mailarchive.ietf.org/arch/msg/jose/-X4qDpVxp_ucEyJ3I1t3-K1A0LU>
Subject: Re: [jose] PKCS #11 for JWK
X-BeenThere: jose@ietf.org
X-Mailman-Version: 2.1.22
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: Sat, 01 Jul 2017 20:23:56 -0000

This is a cryptographically signed message in MIME format.

--------------ms090804030605050301000304
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
Content-Language: en-US

Thanks, this answered my question.

Now, if the p11 URI must point to a private key object, shouldn't "type"
in section 4 be declared REQUIRED?

BTW, did you also consider using the p11 URIs for JWKs of type "oct"?

On 01/07/17 21:17, Nathaniel McCallum wrote:
> (That does appear to be a typo. The RFC should be 7512.)
>
> On Sat, Jul 1, 2017 at 3:16 PM, Nathaniel McCallum
> <npmccallum@redhat.com> wrote:
>> Section 3 states:
>>
>> 'The "p11" property MUST contain a valid PKCS #11 URI [RFC7517] that
>> points to a private key object (that is, type=3Dprivate).'
>>
>> As I understand this sentence, the "p11" URI should be validated
>> according to RFC 7517 with the additional constraint that it must have=

>> type=3Dprivate.
>>
>> On Sat, Jul 1, 2017 at 3:08 PM, Vladimir Dzhuvinov
>> <vladimir@connect2id.com> wrote:
>>> Looks good!
>>>
>>> +1 to have examples included.
>>>
>>> Question: When I parse a JWK with a "p11" parameter, should the p11 U=
RI
>>> syntax be validated? What constitutes a syntactically valid p11 URI?
>>>
>>>
>>>
>>> On 30/06/17 23:33, Nathaniel McCallum wrote:
>>>> I have prepared an initial stab at a draft for offloading JWK privat=
e
>>>> key data to PKCS #11.
>>>>
>>>> You can find the document here:
>>>>    https://www.ietf.org/id/draft-mccallum-jose-pkcs11-jwk-00.txt
>>>>
>>>> Thanks for your consideration!
>>>
>



--------------ms090804030605050301000304
Content-Type: application/pkcs7-signature; name="smime.p7s"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="smime.p7s"
Content-Description: S/MIME Cryptographic Signature

MIAGCSqGSIb3DQEHAqCAMIACAQExDzANBglghkgBZQMEAgEFADCABgkqhkiG9w0BBwEAAKCC
CfwwggSvMIIDl6ADAgECAhEA4CPLFRKDU4mtYW56VGdrITANBgkqhkiG9w0BAQsFADBvMQsw
CQYDVQQGEwJTRTEUMBIGA1UEChMLQWRkVHJ1c3QgQUIxJjAkBgNVBAsTHUFkZFRydXN0IEV4
dGVybmFsIFRUUCBOZXR3b3JrMSIwIAYDVQQDExlBZGRUcnVzdCBFeHRlcm5hbCBDQSBSb290
MB4XDTE0MTIyMjAwMDAwMFoXDTIwMDUzMDEwNDgzOFowgZsxCzAJBgNVBAYTAkdCMRswGQYD
VQQIExJHcmVhdGVyIE1hbmNoZXN0ZXIxEDAOBgNVBAcTB1NhbGZvcmQxGjAYBgNVBAoTEUNP
TU9ETyBDQSBMaW1pdGVkMUEwPwYDVQQDEzhDT01PRE8gU0hBLTI1NiBDbGllbnQgQXV0aGVu
dGljYXRpb24gYW5kIFNlY3VyZSBFbWFpbCBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCC
AQoCggEBAImxDdp6UxlOcFIdvFamBia3uEngludRq/HwWhNJFaO0jBtgvHpRQqd5jKQi3xdh
TpHVdiMKFNNKAn+2HQmAbqUEPdm6uxb+oYepLkNSQxZ8rzJQyKZPWukI2M+TJZx7iOgwZOak
+FaA/SokFDMXmaxE5WmLo0YGS8Iz1OlAnwawsayTQLm1CJM6nCpToxDbPSBhPFUDjtlOdiUC
ISn6o3xxdk/u4V+B6ftUgNvDezVSt4TeIj0sMC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AgCAMA0GCCqGSIb3DQMCAgFAMAcGBSsOAwIHMA0G
CCqGSIb3DQMCAgEoMIHBBgkrBgEEAYI3EAQxgbMwgbAwgZsxCzAJBgNVBAYTAkdCMRswGQYD
VQQIExJHcmVhdGVyIE1hbmNoZXN0ZXIxEDAOBgNVBAcTB1NhbGZvcmQxGjAYBgNVBAoTEUNP
TU9ETyBDQSBMaW1pdGVkMUEwPwYDVQQDEzhDT01PRE8gU0hBLTI1NiBDbGllbnQgQXV0aGVu
dGljYXRpb24gYW5kIFNlY3VyZSBFbWFpbCBDQQIQJUrAV9eov8hmWZH5Mo/3sTCBwwYLKoZI
hvcNAQkQAgsxgbOggbAwgZsxCzAJBgNVBAYTAkdCMRswGQYDVQQIExJHcmVhdGVyIE1hbmNo
ZXN0ZXIxEDAOBgNVBAcTB1NhbGZvcmQxGjAYBgNVBAoTEUNPTU9ETyBDQSBMaW1pdGVkMUEw
PwYDVQQDEzhDT01PRE8gU0hBLTI1NiBDbGllbnQgQXV0aGVudGljYXRpb24gYW5kIFNlY3Vy
ZSBFbWFpbCBDQQIQJUrAV9eov8hmWZH5Mo/3sTANBgkqhkiG9w0BAQEFAASCAQADOEsDMoty
VBUCQv51AJ06X71QVxOgNZf90ckkPWpbzlP8q8ph5wVj21iBsyxPQSHrcRxaCfO4YKPNMl4Y
szxReIIm9kRYJnnMhyui1BJFo+RqwiFMUOGsXfGNVNWJuJYtpc8OJyEnIBXQy3qD3BB4qDsL
ogKIUEjESF3aMWg6VayAZezhTly2Z/MZcHftgj8PhlM4Spil6fdIl99Cjrct7aR3bCCrFjvq
qO1Sgc5RthrBjmpA1bOuzlPp+RoMh7gKErSV7ET8LJ9ymCzJGNe8JJapSKz5hlCur2CZOpm2
Tv8s837PLQZJOK+2WSDpS9fGdVminQBUc0gqs3nh0BIxAAAAAAAA
--------------ms090804030605050301000304--


From nobody Sat Jul  1 13:43:52 2017
Return-Path: <nmccallu@redhat.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 9510E126BFD for <jose@ietfa.amsl.com>; Sat,  1 Jul 2017 13:43:51 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.119
X-Spam-Level: 
X-Spam-Status: No, score=-2.119 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HK_RANDOM_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_SORBS_SPAM=0.5, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
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 0_gfaAIpzH0S for <jose@ietfa.amsl.com>; Sat,  1 Jul 2017 13:43:49 -0700 (PDT)
Received: from mail-it0-f53.google.com (mail-it0-f53.google.com [209.85.214.53]) (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 9CA08124D6C for <jose@ietf.org>; Sat,  1 Jul 2017 13:43:49 -0700 (PDT)
Received: by mail-it0-f53.google.com with SMTP id k192so40099155ith.1 for <jose@ietf.org>; Sat, 01 Jul 2017 13:43:49 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=UDv/BI/pywyr0xuULM1mQxf2NRW2iYxeylxFWM46X24=; b=SJuJmosXgQVUVHExuU/ozrTpZcfwfvSPWUS2AgD1YefDsR4bery5HP0h+DhW6uXcpm mpocBZj9LUYHqzaQL6FwbkKFlZCGhwRRevbUjfuPt1N91ihc+ewOZBY3IUcZlWrl2a4O D5bhBgxxtK/0hGSwI5TaIXY5hdwooA5GOzCPipjtt3ua/aZtEege5lM2LKjs5i4tiVeO pwE8yd+kd0P2atGssXaiKIs2JwSTqD38WtlOgCAKeMBNOjPRDk+0kHLp9r/vD99vIvh7 4HT94C5uwPsC9wQSf+dbAiv0vCmOEQv1+SOEhMHe6nV0bBn4DyrXErP88FfOdXGp/vNJ R8SA==
X-Gm-Message-State: AIVw110xNkRUhbPtWXS2X5ItBFXgkPJs47u/Xt3Pj3qlvnOeS8PzQ5hr OfVfX6DHNPn8u3Uuz9eQJDlCw7as81qM
X-Received: by 10.36.248.131 with SMTP id a125mr2286765ith.50.1498941828890; Sat, 01 Jul 2017 13:43:48 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.107.132.88 with HTTP; Sat, 1 Jul 2017 13:43:48 -0700 (PDT)
In-Reply-To: <0b30e2c3-2dfc-6176-d401-7f533782d3c3@connect2id.com>
References: <CAOASepNR_1XjDaCHUyLL_o63EvBcQ6L1TyeMhdUzrbmtYSWRNg@mail.gmail.com> <23b3748b-afa5-ad04-57ec-145e69565774@connect2id.com> <CAOASepO58BdisbrwPfzSaGf3mWnCr+mS0TdoeWAaLbwyQ1j0cg@mail.gmail.com> <CAOASepMJGM3k5s=OqT5CG2L_AAtetu_fyC=YtbK-eBz1gRS42Q@mail.gmail.com> <0b30e2c3-2dfc-6176-d401-7f533782d3c3@connect2id.com>
From: Nathaniel McCallum <npmccallum@redhat.com>
Date: Sat, 1 Jul 2017 16:43:48 -0400
Message-ID: <CAOASepOm9ZQvehyk6xZqYzmEmUD9UVhxa_M3041fZcruHU=iMg@mail.gmail.com>
To: Vladimir Dzhuvinov <vladimir@connect2id.com>
Cc: Nikos Mavrogiannopoulos <nmav@redhat.com>, Daiki Ueno <dueno@redhat.com>,  "Sorce, Simo" <simo@redhat.com>, jose@ietf.org
Content-Type: text/plain; charset="UTF-8"
Archived-At: <https://mailarchive.ietf.org/arch/msg/jose/oObyJJEaBT-NUBqIQRlit-UxsfE>
Subject: Re: [jose] PKCS #11 for JWK
X-BeenThere: jose@ietf.org
X-Mailman-Version: 2.1.22
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: Sat, 01 Jul 2017 20:43:51 -0000

On Sat, Jul 1, 2017 at 4:23 PM, Vladimir Dzhuvinov
<vladimir@connect2id.com> wrote:
> Thanks, this answered my question.
>
> Now, if the p11 URI must point to a private key object, shouldn't "type"
> in section 4 be declared REQUIRED?

Probably so. I think we need to answer the question about public key
URI (see other emails in this thread) first. But, yes, I agree.

> BTW, did you also consider using the p11 URIs for JWKs of type "oct"?

Yes, the document does this implicitly. Section 3 states: "Private key
material is defined by the Parameter Information Class of Section
8.1.1 of RFC 7517 [RFC7517]."

This section defines "k" as private key material for JWKs of type
"oct". It should probably be spelled out in the actual draft that
symmetric keys do not have public key material. The draft should
probably also make explicit that this is usable for "oct" JWKs. This
would help with clarity.

>From an implementation perspective, symmetric keys are probably most
useful for the key wrap algorithms since we probably don't want to
offload full data encryption (for performance reasons).


From nobody Sun Jul  2 06:49:46 2017
Return-Path: <ilariliusvaara@welho.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 378B912EC00 for <jose@ietfa.amsl.com>; Sun,  2 Jul 2017 06:49:45 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.901
X-Spam-Level: 
X-Spam-Status: No, score=-1.901 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, RP_MATCHES_RCVD=-0.001] autolearn=ham autolearn_force=no
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 QcAFETKWT2XN for <jose@ietfa.amsl.com>; Sun,  2 Jul 2017 06:49:42 -0700 (PDT)
Received: from welho-filter2.welho.com (welho-filter2.welho.com [83.102.41.24]) by ietfa.amsl.com (Postfix) with ESMTP id B0B6A129468 for <jose@ietf.org>; Sun,  2 Jul 2017 06:49:42 -0700 (PDT)
Received: from localhost (localhost [127.0.0.1]) by welho-filter2.welho.com (Postfix) with ESMTP id BEF113B2C5; Sun,  2 Jul 2017 16:49:40 +0300 (EEST)
X-Virus-Scanned: Debian amavisd-new at pp.htv.fi
Received: from welho-smtp1.welho.com ([IPv6:::ffff:83.102.41.84]) by localhost (welho-filter2.welho.com [::ffff:83.102.41.24]) (amavisd-new, port 10024) with ESMTP id HLAehtgpB3dG; Sun,  2 Jul 2017 16:49:40 +0300 (EEST)
Received: from LK-Perkele-VII (87-92-19-27.bb.dnainternet.fi [87.92.19.27]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by welho-smtp1.welho.com (Postfix) with ESMTPSA id EDE70C4; Sun,  2 Jul 2017 16:49:34 +0300 (EEST)
Date: Sun, 2 Jul 2017 16:49:34 +0300
From: Ilari Liusvaara <ilariliusvaara@welho.com>
To: Nathaniel McCallum <npmccallum@redhat.com>
Cc: Simo Sorce <simo@redhat.com>, Nikos Mavrogiannopoulos <nmav@redhat.com>, Daiki Ueno <dueno@redhat.com>, jose@ietf.org
Message-ID: <20170702134934.pb77govnpifo54dm@LK-Perkele-VII>
References: <CAOASepNR_1XjDaCHUyLL_o63EvBcQ6L1TyeMhdUzrbmtYSWRNg@mail.gmail.com> <1498896051.11334.78.camel@redhat.com> <CAOASepPnTBq3hb=U6HP7ULaWX_GJy8ty-teUo2GQ-bZGt_ruww@mail.gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
In-Reply-To: <CAOASepPnTBq3hb=U6HP7ULaWX_GJy8ty-teUo2GQ-bZGt_ruww@mail.gmail.com>
User-Agent: NeoMutt/20170609 (1.8.3)
Sender: ilariliusvaara@welho.com
Archived-At: <https://mailarchive.ietf.org/arch/msg/jose/7-AQpOiRRTe2lwRhSd3LTbCShEU>
Subject: Re: [jose] PKCS #11 for JWK
X-BeenThere: jose@ietf.org
X-Mailman-Version: 2.1.22
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: Sun, 02 Jul 2017 13:49:45 -0000

On Sat, Jul 01, 2017 at 08:42:22AM -0400, Nathaniel McCallum wrote:
> On Sat, Jul 1, 2017 at 4:00 AM, Simo Sorce <simo@redhat.com> wrote:
> > On Fri, 2017-06-30 at 17:33 -0400, Nathaniel McCallum wrote:
> >> I have prepared an initial stab at a draft for offloading JWK private
> >> key data to PKCS #11.
> >>
> >> You can find the document here:
> >>    https://www.ietf.org/id/draft-mccallum-jose-pkcs11-jwk-00.txt
> >
> > Later on you talk about performance penalty and say:
> >
> >    Implementations SHOULD perform public
> >    key operations, such as asymmetric signature verification or
> >    asymmetric encryption, without using PKCS #11
> >
> > I think this should be at most a MAY. If I wanted to be more pedantic I
> > would say you should take in consideration there may be PKCS#11 modules
> > that are already smart enough to implement such functions in software
> > so that they do not incur in performance penalties, so the whole this
> > would have to be wrapped in something like:
> >  "If the PKCS#11 implementation perform public key operation in hardare
> > that may result in poor performance then implementations MAY perfrom
> > public ..."
> 
> If we downgrade this recommendation, then we probably need to discuss
> how implementations would correlate public key and private key object
> URIs. That is, "p11" refers only to the private key. For public key
> crypto operations, we need a URI that refers to the public key. Thus,
> we would need a way to either:

One another thing to note is that some pieces of codebases can easily
work with external private keys but not external public keys.

That is, those pieces of code expect to work with private keys using
signer interface (which can easily encapsulate PKCS#11 operation), but
deal with public keys directly (so PKCS#11 there would be a major
change). Some codebases even expect to be able to directly load the
public key parts.


-Ilari


From nobody Mon Jul  3 06:21:15 2017
Return-Path: <vladimir@connect2id.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 3F47613161A for <jose@ietfa.amsl.com>; Mon,  3 Jul 2017 06:21:13 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.919
X-Spam-Level: 
X-Spam-Status: No, score=-1.919 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
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 s0ObpF08CAGU for <jose@ietfa.amsl.com>; Mon,  3 Jul 2017 06:21:11 -0700 (PDT)
Received: from p3plsmtpa09-06.prod.phx3.secureserver.net (p3plsmtpa09-06.prod.phx3.secureserver.net [173.201.193.235]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 5892E12785F for <jose@ietf.org>; Mon,  3 Jul 2017 06:21:11 -0700 (PDT)
Received: from [10.67.123.188] ([212.5.158.166]) by :SMTPAUTH: with SMTP id S1HGdHyl3SRqVS1HIdtZSH; Mon, 03 Jul 2017 06:20:40 -0700
Date: Mon, 03 Jul 2017 15:20:02 +0200
From: Vladimir Dzhuvinov <vladimir@connect2id.com>
To: Ilari Liusvaara <ilariliusvaara@welho.com>
Cc: Nathaniel McCallum <npmccallum@redhat.com>, Simo Sorce <simo@redhat.com>, Daiki Ueno <dueno@redhat.com>, jose@ietf.org, Nikos Mavrogiannopoulos <nmav@redhat.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: base64
X-CMAE-Envelope: MS4wfKFbPMkJkPsXh5QwunmMP7Z9jvHYJJpwXFQis1/N2XNN/3naQIY/aaQOG4BGt8m89DeKg8q7uIwXijXogLw0dpZN3sl988k39pO8b8R408gRycxEPsi9 QSqwCpx6oA6OHU8NicVKsZRuxThq3Y8E0MZjDZGJyM7Y2qP/276sa0KJ5z63813Bvg6/A5yL1mhY11Fu5OB5pVuPE6Z+4PwW9H1viBgYVibgMRnfeWoQUL4E KwDlHaQCPOw6HKFr87rNzIfmdatc0o3vmBOIorcbFZahBDhipEXOtW24uDRNmEHQ+F4FKbcjZPvvaZWAnAd1fw==
Message-Id: <20170703132111.5892E12785F@ietfa.amsl.com>
Archived-At: <https://mailarchive.ietf.org/arch/msg/jose/rXneidOe6UxB4R7ykuQMwjpJ6LA>
Subject: Re: [jose] PKCS #11 for JWK
X-BeenThere: jose@ietf.org
X-Mailman-Version: 2.1.22
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, 03 Jul 2017 13:21:13 -0000

Ck9uIDIgSnVsIDIwMTcgMTU6NDksIElsYXJpIExpdXN2YWFyYSA8aWxhcmls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HVz
aW5nIGEgUEtDUyMxMSBVUkkgZm9yIHRoZSBwdWJsaWMga2V5LCBvciBldmVuIGFzIGEgY2VydGlm
aWNhdGUgcmVmZXJlbmNlLCB3aHkgbm90IGRlZmluZSBzZXBhcmF0ZSBwMTEgcGFyYW1zIGZvciB0
aGF0PyBXaXRoIHNlcGFyYXRlLCBkZWRpY2F0ZWQgcGFyYW1ldGVycyB3ZSdsbCBhbHNvIGRvIGF3
YXkgd2l0aCB0aGUgbmVlZCB0byBwZXJmb3JtIGNvcnJlbGF0aW9uIGJlaGluZCB0aGUgc2NlbmVz
LgoKVmxhZGltaXI=


From nobody Mon Jul  3 12:03:51 2017
Return-Path: <nmavrogi@redhat.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 852A712441E for <jose@ietfa.amsl.com>; Mon,  3 Jul 2017 00:43:04 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.421
X-Spam-Level: 
X-Spam-Status: No, score=-1.421 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_SORBS_SPAM=0.5, SPF_PASS=-0.001] autolearn=no autolearn_force=no
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 cRTe_0S3gZBi for <jose@ietfa.amsl.com>; Mon,  3 Jul 2017 00:43:02 -0700 (PDT)
Received: from mail-wm0-f50.google.com (mail-wm0-f50.google.com [74.125.82.50]) (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 579B61243FE for <jose@ietf.org>; Mon,  3 Jul 2017 00:43:02 -0700 (PDT)
Received: by mail-wm0-f50.google.com with SMTP id f67so45133386wmh.1 for <jose@ietf.org>; Mon, 03 Jul 2017 00:43:02 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:subject:to:cc:date:in-reply-to :references:mime-version:content-transfer-encoding; bh=qlpqFYoNI3iBYF3eob4FyNz8H8nJ1xdSCDwgxUgkJ68=; b=QRMP8rn/aCssTeEqqb1606WWtj9Mm/fAl6d3H5lzjvMnKcl1P3z1Suv4ps0lP1Ya/s 0+2sXCNow4ZhSKXzPFFZMPn3ZNw69frHkJcugzKWK5/ylp5rAj8B3IACy50T7EdhTn7L jdgmeKEJF59iHJkMbeuZ7jWJ6H4OUeEbYNVqB9p4j9olYyWjr5uQ1R1tThBrb0hysiiG DWrKtPPwbkP3HnCHhm5tLot54hKGzCOC/+fkPalX0scrGJih6Q6Z0H9IlpCIVHgnOpAE Qrk65X0zQLufnY5gvyWXhyeHA9RRhDq1KKYPdTeYlQDJDE2afdR8sR0pjF+yhB9duZOS CEGQ==
X-Gm-Message-State: AIVw1133rPCzNBAmiuQSqs8juziBbxKkZ3qCIj3LRtouPHUp/uvlJqeX uP9tHFgKK0Cg+uYwyJ0Sew==
X-Received: by 10.28.165.140 with SMTP id o134mr11454792wme.114.1499067780784;  Mon, 03 Jul 2017 00:43:00 -0700 (PDT)
Received: from dhcp-10-40-1-102.brq.redhat.com (nat-pool-brq-t.redhat.com. [213.175.37.10]) by smtp.gmail.com with ESMTPSA id n31sm18013127wrn.59.2017.07.03.00.42.59 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 03 Jul 2017 00:42:59 -0700 (PDT)
From: Nikos Mavrogiannopoulos <nmavrogi@redhat.com>
X-Google-Original-From: Nikos Mavrogiannopoulos <nmav@redhat.com>
Message-ID: <1499067779.2834.9.camel@redhat.com>
To: Nathaniel McCallum <npmccallum@redhat.com>, Simo Sorce <simo@redhat.com>
Cc: jose@ietf.org, Daiki Ueno <dueno@redhat.com>
Date: Mon, 03 Jul 2017 09:42:59 +0200
In-Reply-To: <CAOASepPnTBq3hb=U6HP7ULaWX_GJy8ty-teUo2GQ-bZGt_ruww@mail.gmail.com>
References: <CAOASepNR_1XjDaCHUyLL_o63EvBcQ6L1TyeMhdUzrbmtYSWRNg@mail.gmail.com> <1498896051.11334.78.camel@redhat.com> <CAOASepPnTBq3hb=U6HP7ULaWX_GJy8ty-teUo2GQ-bZGt_ruww@mail.gmail.com>
Content-Type: text/plain; charset="UTF-8"
X-Mailer: Evolution 3.22.6 (3.22.6-2.fc25) 
Mime-Version: 1.0
Content-Transfer-Encoding: 8bit
Archived-At: <https://mailarchive.ietf.org/arch/msg/jose/dHK0nuCQEfu50ZG2XiiX3cnHHbM>
X-Mailman-Approved-At: Mon, 03 Jul 2017 12:03:50 -0700
Subject: Re: [jose] PKCS #11 for JWK
X-BeenThere: jose@ietf.org
X-Mailman-Version: 2.1.22
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, 03 Jul 2017 07:43:05 -0000

On Sat, 2017-07-01 at 08:42 -0400, Nathaniel McCallum wrote:
> 
> > I think this should be at most a MAY. If I wanted to be more
> > pedantic I
> > would say you should take in consideration there may be PKCS#11
> > modules
> > that are already smart enough to implement such functions in
> > software
> > so that they do not incur in performance penalties, so the whole
> > this
> > would have to be wrapped in something like:
> >  "If the PKCS#11 implementation perform public key operation in
> > hardare
> > that may result in poor performance then implementations MAY
> > perfrom
> > public ..."
> 
> If we downgrade this recommendation, then we probably need to discuss
> how implementations would correlate public key and private key object
> URIs. That is, "p11" refers only to the private key. For public key
> crypto operations, we need a URI that refers to the public key. Thus,
> we would need a way to either:
> 
> 1. Store the public key URI.
> 2. Transmute the private key URI into a public key URI implicitly.

PKCS#11 mentions the following:
"The CKA_ID attribute is intended as a means of distinguishing multiple
public-key/private-key pairs held by the same subject (whether stored
in the same token or not)."

That field is also expected to match a certificate's subject key
identifier field:
"Note that with the version 3 extensions to X.509 certificates, the key
identifier may be carried in the certificate. It is
intended that the CKA_ID value be identical to the key identifier in
such a certificate extension, although this will not be enforced by
Cryptoki."

Thus you can certainly rely on that, and if you have control on how the
public/private key pair is generated, you can require this field to
adhere to the above properties.

regards,
Nikos


From nobody Wed Jul  5 06:05:15 2017
Return-Path: <nmccallu@redhat.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 09B06131CED for <jose@ietfa.amsl.com>; Wed,  5 Jul 2017 06:05:15 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.2
X-Spam-Level: 
X-Spam-Status: No, score=-4.2 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HK_RANDOM_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-2.8, RCVD_IN_SORBS_SPAM=0.5, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
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 yEUbdoQjcWtC for <jose@ietfa.amsl.com>; Wed,  5 Jul 2017 06:05:13 -0700 (PDT)
Received: from mail-io0-f173.google.com (mail-io0-f173.google.com [209.85.223.173]) (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 79F0D1329FE for <jose@ietf.org>; Wed,  5 Jul 2017 06:04:58 -0700 (PDT)
Received: by mail-io0-f173.google.com with SMTP id z62so85243548ioi.3 for <jose@ietf.org>; Wed, 05 Jul 2017 06:04:58 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=/Dsyx/L4cNdDFbjIqx2CGNJiAFlmmTqMFm2gdgn0vWQ=; b=lFdVptRd4Bxodcm8CidFbAfGbB1PozKDs3jVfeEo8yb8bPQEPW+gZndAByMC99+cfj HcdRdWV33g9nU3L07dHV/57mSdsX5i1z5JiDElPf+6Y2OfKQMFlrvBrjMBnCCZ9vP3FC MLXroW1vTuaq/cuenpGug7E0IM5Hp/tAVnCm3aIlDpzU9yPf4cokiSIM8RPAhaNwLzHE wqJweGyk5Dm6wmdyjwZjg4059EIxYyBVDmA3xihuQXjMa1XOR4bhpG5gbQxQx/md0yQs fnMei2KR7oEtrSKyofMRFRPqQV6l442Vh/waTq6XVZD7RaBZWoMXO19/AXVxvE0tqpIa 6kcw==
X-Gm-Message-State: AIVw111CbRII8BLotcuzrRy6DiBCGhubZP89kvRmgiCs7XGSIKKBv2vn LvqhUrsK5cvR9tlJPtZkLfTNcKwSt4g7
X-Received: by 10.107.160.202 with SMTP id j193mr13134507ioe.49.1499259897703;  Wed, 05 Jul 2017 06:04:57 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.107.132.88 with HTTP; Wed, 5 Jul 2017 06:04:57 -0700 (PDT)
In-Reply-To: <1498896051.11334.78.camel@redhat.com>
References: <CAOASepNR_1XjDaCHUyLL_o63EvBcQ6L1TyeMhdUzrbmtYSWRNg@mail.gmail.com> <1498896051.11334.78.camel@redhat.com>
From: Nathaniel McCallum <npmccallum@redhat.com>
Date: Wed, 5 Jul 2017 09:04:57 -0400
Message-ID: <CAOASepOYo4hnqdFCJ5-Oxf1C5eLWj-qavQUwfXt_nG-1pZ=cMw@mail.gmail.com>
To: Simo Sorce <simo@redhat.com>
Cc: jose@ietf.org, Nikos Mavrogiannopoulos <nmav@redhat.com>, Daiki Ueno <dueno@redhat.com>
Content-Type: text/plain; charset="UTF-8"
Archived-At: <https://mailarchive.ietf.org/arch/msg/jose/WgjELtwcNunqaujVD6Cw_KiWONQ>
Subject: Re: [jose] PKCS #11 for JWK
X-BeenThere: jose@ietf.org
X-Mailman-Version: 2.1.22
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: Wed, 05 Jul 2017 13:05:15 -0000

On Sat, Jul 1, 2017 at 4:00 AM, Simo Sorce <simo@redhat.com> wrote:
> Later on you talk about performance penalty and say:
>
>    Implementations SHOULD perform public
>    key operations, such as asymmetric signature verification or
>    asymmetric encryption, without using PKCS #11
>
> I think this should be at most a MAY. If I wanted to be more pedantic I
> would say you should take in consideration there may be PKCS#11 modules
> that are already smart enough to implement such functions in software
> so that they do not incur in performance penalties, so the whole this
> would have to be wrapped in something like:
>  "If the PKCS#11 implementation perform public key operation in hardare
> that may result in poor performance then implementations MAY perfrom
> public ..."

I did some reflection on this over the long weekend. If we wanted to
support offloading public key operations to PKCS #11, we'd need to
have a "p11pub" JWK property which defines the URI to the public key
to perform the operation on. This duplicates the existing public key
information in the JWK.

We could allow three modes:
1. pubkey-only; no PKCS #11
2. URI-only; PKCS #11
3. both; optional PKCS #11

In mode #3, there is a possibility for public key mismatch. However,
no attacks exist which don't also exist for mode #1.

My worry is that this is a lot of complexity for minimal gain. JOSE
implementations already have to support #1. At best, mode #2 is going
to be as fast as #1. I just don't see any compelling reason to support
public key URIs. Do you?

As an aside, I do see value in exporting X.509 material from
certificate URIs and placing them in the already established JWK
parameters. However, I do not think standardization is required to
support this; implementations can do this in a compatible way without
any new RFCs once they have "p11".


From nobody Wed Jul  5 06:07:22 2017
Return-Path: <nmccallu@redhat.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 083FF1329F8 for <jose@ietfa.amsl.com>; Wed,  5 Jul 2017 06:07:21 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.919
X-Spam-Level: 
X-Spam-Status: No, score=-1.919 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HK_RANDOM_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
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 cSU40Lspmo_i for <jose@ietfa.amsl.com>; Wed,  5 Jul 2017 06:07:19 -0700 (PDT)
Received: from mail-it0-f48.google.com (mail-it0-f48.google.com [209.85.214.48]) (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 58B87132A0A for <jose@ietf.org>; Wed,  5 Jul 2017 06:06:31 -0700 (PDT)
Received: by mail-it0-f48.google.com with SMTP id m68so113641866ith.1 for <jose@ietf.org>; Wed, 05 Jul 2017 06:06:31 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=T7P7rStNbEHV1592VB9U5HURcpBEqyH5C7Pd4fmfTac=; b=GdShDGPRk4sZAxa8Vmn2CB4jZc1LZ/NbR1FWOvhbgf9wbpuFUDphhgryNcPJBL9CZW wJlhJtKeGPLaGrCR+VCd87kQgcEYVv7S/9+Es29Hp3oduyNwRtOYyfPnNCi+0x3QU0lJ /H8xJaJOoZKNum6+kQ5xXSZgbORh6FndIAZGbFYWh/ukpqpDstjzZez4jBC/DjscSiLd XWxJTEnebwWcyhW1VlXtJ3OMrZ1d/oAeEiqbQeooi+bTXwJteGOU3aNFN0Pz1U1ryjbO AgbxaLPH007SFE9fs/q9mZ/DEKGQi9Gg1QNxOmtCkj5MUFz/hEm10YDN76UF4TNUuOp3 EXYQ==
X-Gm-Message-State: AIVw111azDQV/S6TlvSZ2GTLb0FL3ZiAE1QdEGm/i8HTA9RaAx4R9Txk irTpFxaPH7zG2iNjpyzv7KwO+ZLwsbn2
X-Received: by 10.36.215.135 with SMTP id y129mr17709277itg.3.1499259990638; Wed, 05 Jul 2017 06:06:30 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.107.132.88 with HTTP; Wed, 5 Jul 2017 06:06:30 -0700 (PDT)
In-Reply-To: <20170703132111.5892E12785F@ietfa.amsl.com>
References: <20170703132111.5892E12785F@ietfa.amsl.com>
From: Nathaniel McCallum <npmccallum@redhat.com>
Date: Wed, 5 Jul 2017 09:06:30 -0400
Message-ID: <CAOASepMDxxMX_ngJet=VueOsOhiGTEnQdGkHWgV_R_sXYKcxFw@mail.gmail.com>
To: Vladimir Dzhuvinov <vladimir@connect2id.com>
Cc: Ilari Liusvaara <ilariliusvaara@welho.com>, Nikos Mavrogiannopoulos <nmav@redhat.com>,  Daiki Ueno <dueno@redhat.com>, jose@ietf.org, Simo Sorce <simo@redhat.com>
Content-Type: text/plain; charset="UTF-8"
Archived-At: <https://mailarchive.ietf.org/arch/msg/jose/d0tWODyD1AgQczlNZOEoJfTnTjk>
Subject: Re: [jose] PKCS #11 for JWK
X-BeenThere: jose@ietf.org
X-Mailman-Version: 2.1.22
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: Wed, 05 Jul 2017 13:07:21 -0000

I agree. Please see my other reply to Simo for more details.

On Mon, Jul 3, 2017 at 9:20 AM, Vladimir Dzhuvinov
<vladimir@connect2id.com> wrote:
>
> On 2 Jul 2017 15:49, Ilari Liusvaara <ilariliusvaara@welho.com> wrote:
>>
>> On Sat, Jul 01, 2017 at 08:42:22AM -0400, Nathaniel McCallum wrote:
>> > On Sat, Jul 1, 2017 at 4:00 AM, Simo Sorce <simo@redhat.com> wrote:
>> > > On Fri, 2017-06-30 at 17:33 -0400, Nathaniel McCallum wrote:
>> > >> I have prepared an initial stab at a draft for offloading JWK private
>> > >> key data to PKCS #11.
>> > >>
>> > >> You can find the document here:
>> > >>    https://www.ietf.org/id/draft-mccallum-jose-pkcs11-jwk-00.txt
>> > >
>> > > Later on you talk about performance penalty and say:
>> > >
>> > >    Implementations SHOULD perform public
>> > >    key operations, such as asymmetric signature verification or
>> > >    asymmetric encryption, without using PKCS #11
>> > >
>> > > I think this should be at most a MAY. If I wanted to be more pedantic I
>> > > would say you should take in consideration there may be PKCS#11 modules
>> > > that are already smart enough to implement such functions in software
>> > > so that they do not incur in performance penalties, so the whole this
>> > > would have to be wrapped in something like:
>> > >  "If the PKCS#11 implementation perform public key operation in hardare
>> > > that may result in poor performance then implementations MAY perfrom
>> > > public ..."
>> >
>> > If we downgrade this recommendation, then we probably need to discuss
>> > how implementations would correlate public key and private key object
>> > URIs. That is, "p11" refers only to the private key. For public key
>> > crypto operations, we need a URI that refers to the public key. Thus,
>> > we would need a way to either:
>>
>> One another thing to note is that some pieces of codebases can easily
>> work with external private keys but not external public keys.
>>
>> That is, those pieces of code expect to work with private keys using
>> signer interface (which can easily encapsulate PKCS#11 operation), but
>> deal with public keys directly (so PKCS#11 there would be a major
>> change). Some codebases even expect to be able to directly load the
>> public key parts.
>
> I see most value in using the p11 parameter for the private key only. This is after all the main reason for people to consider a PKCS#11 store.
>
> The existing JWK parameters for the public bits is the most portable approach. It is simple and should always work.
>
> If there is value in using a PKCS#11 URI for the public key, or even as a certificate reference, why not define separate p11 params for that? With separate, dedicated parameters we'll also do away with the need to perform correlation behind the scenes.
>
> Vladimir
> _______________________________________________
> jose mailing list
> jose@ietf.org
> https://www.ietf.org/mailman/listinfo/jose


From nobody Wed Jul  5 07:26:38 2017
Return-Path: <simo@redhat.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 8019B132049 for <jose@ietfa.amsl.com>; Wed,  5 Jul 2017 07:26:37 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.903
X-Spam-Level: 
X-Spam-Status: No, score=-6.903 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_HI=-5, RP_MATCHES_RCVD=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
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 mpyDvqO9CfuL for <jose@ietfa.amsl.com>; Wed,  5 Jul 2017 07:26:36 -0700 (PDT)
Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 0C96E131840 for <jose@ietf.org>; Wed,  5 Jul 2017 07:26:35 -0700 (PDT)
Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 60C0B4E4E6 for <jose@ietf.org>; Wed,  5 Jul 2017 14:26:35 +0000 (UTC)
DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 60C0B4E4E6
Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=simo@redhat.com
DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 60C0B4E4E6
Received: from rhino.ipa.ssimo.org (ovpn-116-100.phx2.redhat.com [10.3.116.100]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 45C005C897; Wed,  5 Jul 2017 14:26:29 +0000 (UTC)
Message-ID: <1499264787.11334.81.camel@redhat.com>
From: Simo Sorce <simo@redhat.com>
To: Nathaniel McCallum <npmccallum@redhat.com>
Cc: jose@ietf.org, Nikos Mavrogiannopoulos <nmav@redhat.com>, Daiki Ueno <dueno@redhat.com>
Date: Wed, 05 Jul 2017 10:26:27 -0400
In-Reply-To: <CAOASepOYo4hnqdFCJ5-Oxf1C5eLWj-qavQUwfXt_nG-1pZ=cMw@mail.gmail.com>
References: <CAOASepNR_1XjDaCHUyLL_o63EvBcQ6L1TyeMhdUzrbmtYSWRNg@mail.gmail.com> <1498896051.11334.78.camel@redhat.com> <CAOASepOYo4hnqdFCJ5-Oxf1C5eLWj-qavQUwfXt_nG-1pZ=cMw@mail.gmail.com>
Content-Type: text/plain; charset="UTF-8"
Mime-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16
X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Wed, 05 Jul 2017 14:26:35 +0000 (UTC)
Archived-At: <https://mailarchive.ietf.org/arch/msg/jose/vUVG1eb9tBR7LYy6dBpUV4K8pNE>
Subject: Re: [jose] PKCS #11 for JWK
X-BeenThere: jose@ietf.org
X-Mailman-Version: 2.1.22
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: Wed, 05 Jul 2017 14:26:37 -0000

On Wed, 2017-07-05 at 09:04 -0400, Nathaniel McCallum wrote:
> On Sat, Jul 1, 2017 at 4:00 AM, Simo Sorce <simo@redhat.com> wrote:
> > Later on you talk about performance penalty and say:
> > 
> >    Implementations SHOULD perform public
> >    key operations, such as asymmetric signature verification or
> >    asymmetric encryption, without using PKCS #11
> > 
> > I think this should be at most a MAY. If I wanted to be more
> > pedantic I
> > would say you should take in consideration there may be PKCS#11
> > modules
> > that are already smart enough to implement such functions in
> > software
> > so that they do not incur in performance penalties, so the whole
> > this
> > would have to be wrapped in something like:
> >  "If the PKCS#11 implementation perform public key operation in
> > hardare
> > that may result in poor performance then implementations MAY
> > perfrom
> > public ..."
> 
> I did some reflection on this over the long weekend. If we wanted to
> support offloading public key operations to PKCS #11, we'd need to
> have a "p11pub" JWK property which defines the URI to the public key
> to perform the operation on. This duplicates the existing public key
> information in the JWK.
> 
> We could allow three modes:
> 1. pubkey-only; no PKCS #11
> 2. URI-only; PKCS #11
> 3. both; optional PKCS #11
> 
> In mode #3, there is a possibility for public key mismatch. However,
> no attacks exist which don't also exist for mode #1.
> 
> My worry is that this is a lot of complexity for minimal gain. JOSE
> implementations already have to support #1. At best, mode #2 is going
> to be as fast as #1. I just don't see any compelling reason to
> support
> public key URIs. Do you?
> 
> As an aside, I do see value in exporting X.509 material from
> certificate URIs and placing them in the already established JWK
> parameters. However, I do not think standardization is required to
> support this; implementations can do this in a compatible way without
> any new RFCs once they have "p11".

I do not think we need to explicitly add a p11public parameter.
As Nikos noted (unless I misunderstood) implementations can infer the
public key from the private one. So implementations may chose to use
the corresponding public key via pkcs11 if they so desire. Otherwise
they can use the current stuff which is just fine.

Simo.


From nobody Wed Jul  5 07:45:58 2017
Return-Path: <nmccallu@redhat.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 A60E4131D45 for <jose@ietfa.amsl.com>; Wed,  5 Jul 2017 07:45:57 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.2
X-Spam-Level: 
X-Spam-Status: No, score=-4.2 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HK_RANDOM_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-2.8, RCVD_IN_SORBS_SPAM=0.5, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
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 hrdPZ4CaNovC for <jose@ietfa.amsl.com>; Wed,  5 Jul 2017 07:45:56 -0700 (PDT)
Received: from mail-io0-f175.google.com (mail-io0-f175.google.com [209.85.223.175]) (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 D4DE0131D3F for <jose@ietf.org>; Wed,  5 Jul 2017 07:45:55 -0700 (PDT)
Received: by mail-io0-f175.google.com with SMTP id z62so86981020ioi.3 for <jose@ietf.org>; Wed, 05 Jul 2017 07:45:55 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=VVwu+4GcW28GONn979hcHcbcVsxZL4QUbaNK6yp8YT0=; b=NocdHv5cy7usKPIwd57IzZZkZh778YMuV7MpluCjFDgPa/f5VOqqApzV7ewxuzC12T bM3zb35c608JtBtIsVAb4HPv3Iilonbx/8PnH7R6JdkCL/jXTCz9Cjlc2bllEWX4mFaL H2AD4nlXFGqgHla92w5/EGI0dN6y0XIenmcqxgQJJBurWsdLXhXcwOlcSZYgxRYC6NH1 i8hQvld7qgjBasIWdAkN/X5arr4Wt7crKP3jBuT1PxNpOBALzJsIZRSmdy8GRRxJQtHH yHFau13QXaPtw9lPupDis6y9mCmXiZxuJZmzbFM7ZBivHR0/xFDr49ll52OGSNcxN9Xt 8fyw==
X-Gm-Message-State: AKS2vOxfOEsYkSXF5aXWaWeKbEwU/FrhYLoS6TrhRCXZXzqSLDGmiKSf p2mXqOdGGY/l1gB7jI18E3Yl97jjsKXt
X-Received: by 10.107.173.66 with SMTP id w63mr48561612ioe.24.1499265955037; Wed, 05 Jul 2017 07:45:55 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.107.132.88 with HTTP; Wed, 5 Jul 2017 07:45:54 -0700 (PDT)
In-Reply-To: <1499264787.11334.81.camel@redhat.com>
References: <CAOASepNR_1XjDaCHUyLL_o63EvBcQ6L1TyeMhdUzrbmtYSWRNg@mail.gmail.com> <1498896051.11334.78.camel@redhat.com> <CAOASepOYo4hnqdFCJ5-Oxf1C5eLWj-qavQUwfXt_nG-1pZ=cMw@mail.gmail.com> <1499264787.11334.81.camel@redhat.com>
From: Nathaniel McCallum <npmccallum@redhat.com>
Date: Wed, 5 Jul 2017 10:45:54 -0400
Message-ID: <CAOASepOhvexsY52PUqpx46HfPBx-ps4UYTzAt1rZAfnWMDTXhg@mail.gmail.com>
To: Simo Sorce <simo@redhat.com>
Cc: jose@ietf.org, Nikos Mavrogiannopoulos <nmav@redhat.com>, Daiki Ueno <dueno@redhat.com>
Content-Type: text/plain; charset="UTF-8"
Archived-At: <https://mailarchive.ietf.org/arch/msg/jose/Hg7gD9sPydgVI7eEFKueP7BXqt4>
Subject: Re: [jose] PKCS #11 for JWK
X-BeenThere: jose@ietf.org
X-Mailman-Version: 2.1.22
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: Wed, 05 Jul 2017 14:45:58 -0000

I believe that this will work in most, but not all, situations. The
correlation of keys using the id= parameter is only a recommendation.

On Wed, Jul 5, 2017 at 10:26 AM, Simo Sorce <simo@redhat.com> wrote:
> On Wed, 2017-07-05 at 09:04 -0400, Nathaniel McCallum wrote:
>> On Sat, Jul 1, 2017 at 4:00 AM, Simo Sorce <simo@redhat.com> wrote:
>> > Later on you talk about performance penalty and say:
>> >
>> >    Implementations SHOULD perform public
>> >    key operations, such as asymmetric signature verification or
>> >    asymmetric encryption, without using PKCS #11
>> >
>> > I think this should be at most a MAY. If I wanted to be more
>> > pedantic I
>> > would say you should take in consideration there may be PKCS#11
>> > modules
>> > that are already smart enough to implement such functions in
>> > software
>> > so that they do not incur in performance penalties, so the whole
>> > this
>> > would have to be wrapped in something like:
>> >  "If the PKCS#11 implementation perform public key operation in
>> > hardare
>> > that may result in poor performance then implementations MAY
>> > perfrom
>> > public ..."
>>
>> I did some reflection on this over the long weekend. If we wanted to
>> support offloading public key operations to PKCS #11, we'd need to
>> have a "p11pub" JWK property which defines the URI to the public key
>> to perform the operation on. This duplicates the existing public key
>> information in the JWK.
>>
>> We could allow three modes:
>> 1. pubkey-only; no PKCS #11
>> 2. URI-only; PKCS #11
>> 3. both; optional PKCS #11
>>
>> In mode #3, there is a possibility for public key mismatch. However,
>> no attacks exist which don't also exist for mode #1.
>>
>> My worry is that this is a lot of complexity for minimal gain. JOSE
>> implementations already have to support #1. At best, mode #2 is going
>> to be as fast as #1. I just don't see any compelling reason to
>> support
>> public key URIs. Do you?
>>
>> As an aside, I do see value in exporting X.509 material from
>> certificate URIs and placing them in the already established JWK
>> parameters. However, I do not think standardization is required to
>> support this; implementations can do this in a compatible way without
>> any new RFCs once they have "p11".
>
> I do not think we need to explicitly add a p11public parameter.
> As Nikos noted (unless I misunderstood) implementations can infer the
> public key from the private one. So implementations may chose to use
> the corresponding public key via pkcs11 if they so desire. Otherwise
> they can use the current stuff which is just fine.
>
> Simo.


From nobody Wed Jul  5 12:01:22 2017
Return-Path: <nmccallu@redhat.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 3C4C5131DC8 for <jose@ietfa.amsl.com>; Wed,  5 Jul 2017 12:01:21 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.419
X-Spam-Level: 
X-Spam-Status: No, score=-1.419 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HK_RANDOM_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_SORBS_SPAM=0.5, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=no autolearn_force=no
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 XBBOjr4mYX1B for <jose@ietfa.amsl.com>; Wed,  5 Jul 2017 12:01:19 -0700 (PDT)
Received: from mail-it0-f46.google.com (mail-it0-f46.google.com [209.85.214.46]) (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 428D8131DC4 for <jose@ietf.org>; Wed,  5 Jul 2017 12:01:06 -0700 (PDT)
Received: by mail-it0-f46.google.com with SMTP id m68so121001061ith.1 for <jose@ietf.org>; Wed, 05 Jul 2017 12:01:06 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=oj/i3n7Fj9edN8a0MSduK4zKLozHqe4sqwLkxhuhHiE=; b=siaBziUFRHGNCJIvOVyPcm4BKgGoFpWYLYVqeC86U4IQNVxi+zwsAy5iSODDbbFc0B p0gOC2wykQvhRAhg6J8EUIYMfOYJtDkSbi/winuJi2SccqGEanFxms63ZT/S+MXVeMa9 3GwaStQBZtjiUfCsu1sPTDZ1N4TRdXtn0K8d1IeTAt6xLNh19I0iru6VPRASHIbzYJwA ZonQtw4VEuBRXliVmA0ho8tcG3Nwx15IHck16r5Gv12O/PaOwU5jElGZL6AhpGXDq9my TPFJMR2o6JyOosGRkV6kqMyJkj2XXrU1dJwdhx/HJCfoMYQQKxiILjMb9tb0D96qAXQS icEw==
X-Gm-Message-State: AKS2vOxDoEc7ZTSMQPHz8GmBNoBnkrF9JKsRT5iCCqpujwl1QPBkQPd9 NzYfoBfwEyC6pQMB5hE+/5+WmQgb+tOujU4=
X-Received: by 10.107.9.96 with SMTP id j93mr43332848ioi.161.1499281264765; Wed, 05 Jul 2017 12:01:04 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.107.132.88 with HTTP; Wed, 5 Jul 2017 12:01:03 -0700 (PDT)
In-Reply-To: <CAOASepNR_1XjDaCHUyLL_o63EvBcQ6L1TyeMhdUzrbmtYSWRNg@mail.gmail.com>
References: <CAOASepNR_1XjDaCHUyLL_o63EvBcQ6L1TyeMhdUzrbmtYSWRNg@mail.gmail.com>
From: Nathaniel McCallum <npmccallum@redhat.com>
Date: Wed, 5 Jul 2017 15:01:03 -0400
Message-ID: <CAOASepOjSo_Lr4x3rzbPh0gxifh_csHY0d08hpRcSCeF0e+OwA@mail.gmail.com>
To: jose@ietf.org
Cc: "Sorce, Simo" <simo@redhat.com>, Nikos Mavrogiannopoulos <nmav@redhat.com>, Daiki Ueno <dueno@redhat.com>
Content-Type: multipart/mixed; boundary="001a113fc30234ff870553969f73"
Archived-At: <https://mailarchive.ietf.org/arch/msg/jose/x8e2qEaqyQ25asxpmMrdxTZEZ1I>
Subject: Re: [jose] PKCS #11 for JWK
X-BeenThere: jose@ietf.org
X-Mailman-Version: 2.1.22
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: Wed, 05 Jul 2017 19:01:21 -0000

--001a113fc30234ff870553969f73
Content-Type: text/plain; charset="UTF-8"

I have updated the draft from the comments everyone has provided.
However, document uploads are currently locked due to the IETF
meeting, so I have attached the document here. Your feedback is
greatly appreciated.

On Fri, Jun 30, 2017 at 5:33 PM, Nathaniel McCallum
<npmccallum@redhat.com> wrote:
> I have prepared an initial stab at a draft for offloading JWK private
> key data to PKCS #11.
>
> You can find the document here:
>    https://www.ietf.org/id/draft-mccallum-jose-pkcs11-jwk-00.txt
>
> Thanks for your consideration!

--001a113fc30234ff870553969f73
Content-Type: text/plain; charset="US-ASCII"; name="draft-mccallum-jose-pkcs11-jwk-01.txt"
Content-Disposition: attachment; 
	filename="draft-mccallum-jose-pkcs11-jwk-01.txt"
Content-Transfer-Encoding: base64
X-Attachment-Id: f_j4rd3fv90

CgoKCkludGVybmV0IEVuZ2luZWVyaW5nIFRhc2sgRm9yY2UgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICBOLiBNY0NhbGx1bQpJbnRlcm5ldC1EcmFmdCAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgIFJlZCBIYXQsIEluYy4KVXBkYXRlczogNzUxNyAoaWYgYXBw
cm92ZWQpICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgSnVseSA1LCAyMDE3CkludGVu
ZGVkIHN0YXR1czogU3RhbmRhcmRzIFRyYWNrCkV4cGlyZXM6IEphbnVhcnkgNiwgMjAxOAoKCiAg
ICAgICAgICAgICAgICAgICAgICAgUEtDUyAjMTEgZm9yIEpTT04gV2ViIEtleXMKICAgICAgICAg
ICAgICAgICAgIGRyYWZ0LW1jY2FsbHVtLWpvc2UtcGtjczExLWp3ay0wMQoKQWJzdHJhY3QKCiAg
IFRoaXMgZG9jdW1lbnQgdXBkYXRlcyBSRkMgNzUxNyBpbiBvcmRlciB0byBzcGVjaWZ5IGFuIGV4
dGVuc2lvbiB0bwogICB0aGUgSlNPTiBXZWIgS2V5IChKV0spIGZvcm1hdCBzbyB0aGF0IHByaXZh
dGUga2V5IG1hdGVyaWFsIG1heSBiZQogICBzdG9yZWQgaW4gY3J5cHRvZ3JhcGhpYyBoYXJkd2Fy
ZSB1c2luZyBQS0NTICMxMS4gIEl0IGRlZmluZXMgYSBuZXcKICAgcHJvcGVydHkgZm9yIEpXS3Mg
d2hpY2ggY29udGFpbnMgdGhlIFBLQ1MgIzExIFVSSSBpZGVudGlmeWluZyB0aGUKICAgbG9jYXRp
b24gb2YgdGhlIHByaXZhdGUga2V5IG1hdGVyaWFsLiAgSW1wbGVtZW50YXRpb25zIGNhbiB1c2Ug
dGhpcwogICBVUkkgdG8gb2ZmbG9hZCB0aGUgY3J5cHRvZ3JhcGhpYyBvcGVyYXRpb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MDAgRWFzdCBEYXZpZSBTdHJlZXQKICAgUmFsZWlnaCwgTkMgIDI3NjAxCiAgIFVTQQoKICAgRU1h
aWw6IG5wbWNjYWxsdW1AcmVkaGF0LmNvbQoKCgoKCgoKCgoKCk1jQ2FsbHVtICAgICAgICAgICAg
ICAgICBFeHBpcmVzIEphbnVhcnkgNiwgMjAxOCAgICAgICAgICAgICAgICBbUGFnZSA2XQo=
--001a113fc30234ff870553969f73--


From nobody Thu Jul  6 00:57:58 2017
Return-Path: <simo@redhat.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 5B3C0126CC4 for <jose@ietfa.amsl.com>; Thu,  6 Jul 2017 00:57:57 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.903
X-Spam-Level: 
X-Spam-Status: No, score=-6.903 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_HI=-5, RP_MATCHES_RCVD=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
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 Dj83UnZ7Ex6p for <jose@ietfa.amsl.com>; Thu,  6 Jul 2017 00:57:55 -0700 (PDT)
Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id CCADA126C7A for <jose@ietf.org>; Thu,  6 Jul 2017 00:57:55 -0700 (PDT)
Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 20E017F40D for <jose@ietf.org>; Thu,  6 Jul 2017 07:57:55 +0000 (UTC)
DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 20E017F40D
Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=simo@redhat.com
DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 20E017F40D
Received: from rhino.ipa.ssimo.org (ovpn-116-100.phx2.redhat.com [10.3.116.100]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3B6CE5F909; Thu,  6 Jul 2017 07:57:50 +0000 (UTC)
Message-ID: <1499327868.11334.83.camel@redhat.com>
From: Simo Sorce <simo@redhat.com>
To: Nathaniel McCallum <npmccallum@redhat.com>
Cc: jose@ietf.org, Nikos Mavrogiannopoulos <nmav@redhat.com>, Daiki Ueno <dueno@redhat.com>
Date: Thu, 06 Jul 2017 03:57:48 -0400
In-Reply-To: <CAOASepOhvexsY52PUqpx46HfPBx-ps4UYTzAt1rZAfnWMDTXhg@mail.gmail.com>
References: <CAOASepNR_1XjDaCHUyLL_o63EvBcQ6L1TyeMhdUzrbmtYSWRNg@mail.gmail.com> <1498896051.11334.78.camel@redhat.com> <CAOASepOYo4hnqdFCJ5-Oxf1C5eLWj-qavQUwfXt_nG-1pZ=cMw@mail.gmail.com> <1499264787.11334.81.camel@redhat.com> <CAOASepOhvexsY52PUqpx46HfPBx-ps4UYTzAt1rZAfnWMDTXhg@mail.gmail.com>
Content-Type: text/plain; charset="UTF-8"
Mime-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14
X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Thu, 06 Jul 2017 07:57:55 +0000 (UTC)
Archived-At: <https://mailarchive.ietf.org/arch/msg/jose/Rm7gpGJ3bW5FW4m3-8J3KgOo_zE>
Subject: Re: [jose] PKCS #11 for JWK
X-BeenThere: jose@ietf.org
X-Mailman-Version: 2.1.22
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: Thu, 06 Jul 2017 07:57:57 -0000

On Wed, 2017-07-05 at 10:45 -0400, Nathaniel McCallum wrote:
> I believe that this will work in most, but not all, situations. The
> correlation of keys using the id= parameter is only a recommendation.

I think it is ok to rely on the recommendation and fail otherwise, all
JWK libraries must be prepared to handle public keys on their own
anyway, so they can always just do that.

Simo.

> On Wed, Jul 5, 2017 at 10:26 AM, Simo Sorce <simo@redhat.com> wrote:
> > On Wed, 2017-07-05 at 09:04 -0400, Nathaniel McCallum wrote:
> > > On Sat, Jul 1, 2017 at 4:00 AM, Simo Sorce <simo@redhat.com>
> > > wrote:
> > > > Later on you talk about performance penalty and say:
> > > > 
> > > >    Implementations SHOULD perform public
> > > >    key operations, such as asymmetric signature verification or
> > > >    asymmetric encryption, without using PKCS #11
> > > > 
> > > > I think this should be at most a MAY. If I wanted to be more
> > > > pedantic I
> > > > would say you should take in consideration there may be PKCS#11
> > > > modules
> > > > that are already smart enough to implement such functions in
> > > > software
> > > > so that they do not incur in performance penalties, so the
> > > > whole
> > > > this
> > > > would have to be wrapped in something like:
> > > >  "If the PKCS#11 implementation perform public key operation in
> > > > hardare
> > > > that may result in poor performance then implementations MAY
> > > > perfrom
> > > > public ..."
> > > 
> > > I did some reflection on this over the long weekend. If we wanted
> > > to
> > > support offloading public key operations to PKCS #11, we'd need
> > > to
> > > have a "p11pub" JWK property which defines the URI to the public
> > > key
> > > to perform the operation on. This duplicates the existing public
> > > key
> > > information in the JWK.
> > > 
> > > We could allow three modes:
> > > 1. pubkey-only; no PKCS #11
> > > 2. URI-only; PKCS #11
> > > 3. both; optional PKCS #11
> > > 
> > > In mode #3, there is a possibility for public key mismatch.
> > > However,
> > > no attacks exist which don't also exist for mode #1.
> > > 
> > > My worry is that this is a lot of complexity for minimal gain.
> > > JOSE
> > > implementations already have to support #1. At best, mode #2 is
> > > going
> > > to be as fast as #1. I just don't see any compelling reason to
> > > support
> > > public key URIs. Do you?
> > > 
> > > As an aside, I do see value in exporting X.509 material from
> > > certificate URIs and placing them in the already established JWK
> > > parameters. However, I do not think standardization is required
> > > to
> > > support this; implementations can do this in a compatible way
> > > without
> > > any new RFCs once they have "p11".
> > 
> > I do not think we need to explicitly add a p11public parameter.
> > As Nikos noted (unless I misunderstood) implementations can infer
> > the
> > public key from the private one. So implementations may chose to
> > use
> > the corresponding public key via pkcs11 if they so desire.
> > Otherwise
> > they can use the current stuff which is just fine.
> > 
> > Simo.


From nobody Thu Jul  6 14:07:52 2017
Return-Path: <vladimir@connect2id.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 DDB26131553 for <jose@ietfa.amsl.com>; Thu,  6 Jul 2017 14:07:50 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.7
X-Spam-Level: 
X-Spam-Status: No, score=-4.7 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-2.8] autolearn=ham autolearn_force=no
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 tLpC7FyFSCac for <jose@ietfa.amsl.com>; Thu,  6 Jul 2017 14:07:49 -0700 (PDT)
Received: from p3plsmtpa11-02.prod.phx3.secureserver.net (p3plsmtpa11-02.prod.phx3.secureserver.net [68.178.252.103]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 6BC1A12EA58 for <jose@ietf.org>; Thu,  6 Jul 2017 14:07:49 -0700 (PDT)
Received: from [192.168.43.252] ([212.39.89.173]) by :SMTPAUTH: with SMTP id TDzVdV3Bg9yfiTDzXd6xnU; Thu, 06 Jul 2017 14:07:18 -0700
To: Nathaniel McCallum <npmccallum@redhat.com>, jose@ietf.org
Cc: Nikos Mavrogiannopoulos <nmav@redhat.com>, Daiki Ueno <dueno@redhat.com>,  "Sorce, Simo" <simo@redhat.com>
References: <CAOASepNR_1XjDaCHUyLL_o63EvBcQ6L1TyeMhdUzrbmtYSWRNg@mail.gmail.com> <CAOASepOjSo_Lr4x3rzbPh0gxifh_csHY0d08hpRcSCeF0e+OwA@mail.gmail.com>
From: Vladimir Dzhuvinov <vladimir@connect2id.com>
Organization: Connect2id Ltd.
Message-ID: <4a84c70f-885e-3125-f736-71c404b28d95@connect2id.com>
Date: Thu, 6 Jul 2017 23:07:12 +0200
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1
MIME-Version: 1.0
In-Reply-To: <CAOASepOjSo_Lr4x3rzbPh0gxifh_csHY0d08hpRcSCeF0e+OwA@mail.gmail.com>
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
Content-Language: en-US
X-CMAE-Envelope: MS4wfLcK5vnjiuOwH/dgpcaNhy22hvs0/WLSQv8NOd1zBY8ekoGPzqq05qhNgIDlDAAIC3nCAwAiJTHIImynjRRN7B0+GVFcA7RaMdmSS47pWZsrhYAVnq7o YsxtFF3B8imRb+VDBzqSfcbMkbmBilYCVj+Yj88zpghyFjlL0uGrvyL/e0wNuHu6MpnGQ3ggL80Dqcd64biil5aWMOScvR8DWNYwVlTTKu+rZNheMvIQrcQ7 ZNnZo0gSBPZbIGcniRNg4eYTpfrO8HIkkMYyKP3rJmsJ9pp73hk0TiaXHXi69lG4
Archived-At: <https://mailarchive.ietf.org/arch/msg/jose/RWeLzDm4ibzeXrvK9A0PSejt4-E>
Subject: Re: [jose] PKCS #11 for JWK
X-BeenThere: jose@ietf.org
X-Mailman-Version: 2.1.22
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: Thu, 06 Jul 2017 21:07:51 -0000

Great!

The "k" parameter appears to be mandatory for "oct" JWKs. How can we
reconcile that with the p11 spec? Ideas?

https://tools.ietf.org/html/rfc7518#section-6.4.1


On 05/07/17 21:01, Nathaniel McCallum wrote:
> I have updated the draft from the comments everyone has provided.
> However, document uploads are currently locked due to the IETF
> meeting, so I have attached the document here. Your feedback is
> greatly appreciated.
>
> On Fri, Jun 30, 2017 at 5:33 PM, Nathaniel McCallum
> <npmccallum@redhat.com> wrote:
>> I have prepared an initial stab at a draft for offloading JWK private
>> key data to PKCS #11.
>>
>> You can find the document here:
>>    https://www.ietf.org/id/draft-mccallum-jose-pkcs11-jwk-00.txt
>>


From nobody Thu Jul  6 14:50:14 2017
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 77CC5131844 for <jose@ietfa.amsl.com>; Thu,  6 Jul 2017 14:50:12 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.002
X-Spam-Level: 
X-Spam-Status: No, score=-2.002 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=augustcellars.com
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 EQj97CPPJwkl for <jose@ietfa.amsl.com>; Thu,  6 Jul 2017 14:50:08 -0700 (PDT)
Received: from mail4.augustcellars.com (augustcellars.com [50.45.239.150]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id EEFA7126B7F for <jose@ietf.org>; Thu,  6 Jul 2017 14:50:07 -0700 (PDT)
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Content-Language: en-us
DKIM-Signature: v=1; a=rsa-sha256; d=augustcellars.com; s=winery; c=simple/simple; t=1499377797; h=from:subject:to:date:message-id; bh=MWoPvGa1FsWoltwQEES2wEGkrTi+UlIF+5oSUnseeKE=; b=fpvBsHUyzTb9t7CMvDpGzG8cM85cD0sQTbG/9W46wZPTRI21rzBKbB0e+PKA2Ah23tVlEIQmSEH DVhqMzxpue0ntZUr+71Yon0nw5d+iIObxCn3mInFA5osQZKNNaJZmy2OIhtApWiC77xAHyK9fqGxN tykOEBVafY9Hu3Q/ukNZ+Ig/0I56cwDGItrhrk4nhFhmdyl7sYHf6UlgB+Ex6vv1pFXCxa94HDdZw 4cwnTqyxZWpe7iWJOondhZkyywVrDP4WU3or6fmjhGwCD28kBp0rAyXMW2pMjKVw/N47MahCD/F2p S6EiuYmhs5I46E2EQRKs3juiAtHJ3escZPIA==
Received: from mail2.augustcellars.com (192.168.1.201) by mail4.augustcellars.com (192.168.1.153) with Microsoft SMTP Server (TLS) id 15.0.1263.5; Thu, 6 Jul 2017 14:49:56 -0700
Received: from Hebrews (24.21.96.37) by mail2.augustcellars.com (192.168.0.56) with Microsoft SMTP Server (TLS) id 15.0.1263.5; Thu, 6 Jul 2017 14:49:52 -0700
From: Jim Schaad <ietf@augustcellars.com>
To: 'Vladimir Dzhuvinov' <vladimir@connect2id.com>, 'Nathaniel McCallum' <npmccallum@redhat.com>, <jose@ietf.org>
References: <CAOASepNR_1XjDaCHUyLL_o63EvBcQ6L1TyeMhdUzrbmtYSWRNg@mail.gmail.com> <CAOASepOjSo_Lr4x3rzbPh0gxifh_csHY0d08hpRcSCeF0e+OwA@mail.gmail.com> <4a84c70f-885e-3125-f736-71c404b28d95@connect2id.com>
In-Reply-To: <4a84c70f-885e-3125-f736-71c404b28d95@connect2id.com>
Date: Thu, 6 Jul 2017 14:49:58 -0700
Message-ID: <01cb01d2f6a1$d1d795e0$7586c1a0$@augustcellars.com>
MIME-Version: 1.0
X-Mailer: Microsoft Outlook 16.0
Thread-Index: AQE+CZkqRZsSU48EP4Y+XkYClZmhtgID4I7rAaEcpzCjVAgg4A==
X-Originating-IP: [24.21.96.37]
Archived-At: <https://mailarchive.ietf.org/arch/msg/jose/6eRqod3KYzuKXmYfpTzP4YcqSTs>
Subject: Re: [jose] PKCS #11 for JWK
X-BeenThere: jose@ietf.org
X-Mailman-Version: 2.1.22
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: Thu, 06 Jul 2017 21:50:12 -0000

This would require that this document update RFC 7518 to make one or the
other be present.

You probably want to have a general update of some type that says you either
have the 'p11' element or the private fields but not both for all key types.

Jim


-----Original Message-----
From: jose [mailto:jose-bounces@ietf.org] On Behalf Of Vladimir Dzhuvinov
Sent: Thursday, July 6, 2017 2:07 PM
To: Nathaniel McCallum <npmccallum@redhat.com>; jose@ietf.org
Cc: Nikos Mavrogiannopoulos <nmav@redhat.com>; Daiki Ueno
<dueno@redhat.com>; Sorce, Simo <simo@redhat.com>
Subject: Re: [jose] PKCS #11 for JWK

Great!

The "k" parameter appears to be mandatory for "oct" JWKs. How can we
reconcile that with the p11 spec? Ideas?

https://tools.ietf.org/html/rfc7518#section-6.4.1


On 05/07/17 21:01, Nathaniel McCallum wrote:
> I have updated the draft from the comments everyone has provided.
> However, document uploads are currently locked due to the IETF 
> meeting, so I have attached the document here. Your feedback is 
> greatly appreciated.
>
> On Fri, Jun 30, 2017 at 5:33 PM, Nathaniel McCallum 
> <npmccallum@redhat.com> wrote:
>> I have prepared an initial stab at a draft for offloading JWK private 
>> key data to PKCS #11.
>>
>> You can find the document here:
>>    https://www.ietf.org/id/draft-mccallum-jose-pkcs11-jwk-00.txt
>>

_______________________________________________
jose mailing list
jose@ietf.org
https://www.ietf.org/mailman/listinfo/jose


From nobody Fri Jul  7 00:05:49 2017
Return-Path: <anders.rundgren.net@gmail.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 EB6B5129B31 for <jose@ietfa.amsl.com>; Fri,  7 Jul 2017 00:05:47 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.999
X-Spam-Level: 
X-Spam-Status: No, score=-1.999 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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com
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 ia1EMxzPQW2a for <jose@ietfa.amsl.com>; Fri,  7 Jul 2017 00:05:46 -0700 (PDT)
Received: from mail-wr0-x241.google.com (mail-wr0-x241.google.com [IPv6:2a00:1450:400c:c0c::241]) (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 DEC3B126579 for <jose@ietf.org>; Fri,  7 Jul 2017 00:05:45 -0700 (PDT)
Received: by mail-wr0-x241.google.com with SMTP id x23so5587153wrb.0 for <jose@ietf.org>; Fri, 07 Jul 2017 00:05:45 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;  h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=BQ2XhWDIk9KRmA61PkNUMqw/HMARU377s1nr9KDfYUk=; b=vgob4DWp5ZksHtWbBUw4x7xRJruOA/lWdidd17L4qKFo8a0MHmhiu8rAxxYK7B9jYB i76Gsz6FIhwpCZe2dHU3NcCUnJE++CANJXJ3UpZbwLw8WBk4QxWflKgSleOEyXFtSt0x fuE1/UAJuXFZEmhQUJ/58zBy1WSSLmlLPF8joOz86C+YwFJZrPUcVGhDtHl45bdZs0/9 RH5pkLKDdWbkYnNTs941WXLb2I9im2480G59eQzLxjxazSxDF+e4hRqD+z2AqqDn3rlR JLpxCK+cYsTPLlKbprCzpn5COYJpRd19hobjLLLv0nb5Lf+xEtp12zdJQXMQuSwzyBNS S8+w==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=BQ2XhWDIk9KRmA61PkNUMqw/HMARU377s1nr9KDfYUk=; b=ezgHbsSgk4UfxyRDEC1Uh6hGOrX2WbGBwcbGGEzFCTUi0jqME888PbKWQ6duWp4zRc vw8kcJkgGMCqsH8TgEa3ujbwZEDXAoNudjjWmbMbi4WIyZEenXZHdfoTVZswG5wFNSqo h3q/KmTvgZIPPyynQEW51y7A6pbnVEL9upaMViib+e18AWDfXepicRzT9jXLcqQYHXFp biCJKlhxXO5fnXoVe9HDDdKPjLKJfmMUOkX/nAIypCD4aDZSVImuC/2ImRFOrQmPeaup PozZDf6TvPEw0NLLESM6pHub5vwLVeFmxkh+I/QI3GBCaFVJRb5slxdUqEMeZsy6xESt 2pKg==
X-Gm-Message-State: AIVw112tigB0dHP67MRpgoOqVDAGg5L93cCb/O6of50nocDMUeVAzm6A 8NhSfKwPcrfiyA==
X-Received: by 10.28.109.218 with SMTP id b87mr1105632wmi.125.1499411144472; Fri, 07 Jul 2017 00:05:44 -0700 (PDT)
Received: from [192.168.1.79] (25.131.146.77.rev.sfr.net. [77.146.131.25]) by smtp.googlemail.com with ESMTPSA id b94sm1809784wrd.40.2017.07.07.00.05.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 07 Jul 2017 00:05:43 -0700 (PDT)
To: Vladimir Dzhuvinov <vladimir@connect2id.com>, Nathaniel McCallum <npmccallum@redhat.com>, jose@ietf.org
Cc: Nikos Mavrogiannopoulos <nmav@redhat.com>, Daiki Ueno <dueno@redhat.com>,  "Sorce, Simo" <simo@redhat.com>
References: <CAOASepNR_1XjDaCHUyLL_o63EvBcQ6L1TyeMhdUzrbmtYSWRNg@mail.gmail.com> <CAOASepOjSo_Lr4x3rzbPh0gxifh_csHY0d08hpRcSCeF0e+OwA@mail.gmail.com> <4a84c70f-885e-3125-f736-71c404b28d95@connect2id.com>
From: Anders Rundgren <anders.rundgren.net@gmail.com>
Message-ID: <78d0105d-cccc-49ed-2e9e-ff1c6caf8e6c@gmail.com>
Date: Fri, 7 Jul 2017 09:05:38 +0200
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1
MIME-Version: 1.0
In-Reply-To: <4a84c70f-885e-3125-f736-71c404b28d95@connect2id.com>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit
Archived-At: <https://mailarchive.ietf.org/arch/msg/jose/pOIdewrk55ZN0JnMIhczABiZDYw>
Subject: Re: [jose] PKCS #11 for JWK
X-BeenThere: jose@ietf.org
X-Mailman-Version: 2.1.22
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: Fri, 07 Jul 2017 07:05:48 -0000

On 2017-07-06 23:07, Vladimir Dzhuvinov wrote:
> Great!
> 
> The "k" parameter appears to be mandatory for "oct" JWKs. How can we
> reconcile that with the p11 spec? Ideas?
> 
> https://tools.ietf.org/html/rfc7518#section-6.4.1

It gets even more fun with OKP JWKs:

https://github.com/cyberphone/java-cfrg-spec

Anders

> 
> 
> On 05/07/17 21:01, Nathaniel McCallum wrote:
>> I have updated the draft from the comments everyone has provided.
>> However, document uploads are currently locked due to the IETF
>> meeting, so I have attached the document here. Your feedback is
>> greatly appreciated.
>>
>> On Fri, Jun 30, 2017 at 5:33 PM, Nathaniel McCallum
>> <npmccallum@redhat.com> wrote:
>>> I have prepared an initial stab at a draft for offloading JWK private
>>> key data to PKCS #11.
>>>
>>> You can find the document here:
>>>     https://www.ietf.org/id/draft-mccallum-jose-pkcs11-jwk-00.txt
>>>
> 
> _______________________________________________
> jose mailing list
> jose@ietf.org
> https://www.ietf.org/mailman/listinfo/jose
> 


From nobody Fri Jul  7 02:56:57 2017
Return-Path: <simo@redhat.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 948FA12EC3F for <jose@ietfa.amsl.com>; Fri,  7 Jul 2017 02:56:55 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.902
X-Spam-Level: 
X-Spam-Status: No, score=-6.902 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_HI=-5, RP_MATCHES_RCVD=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
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 7C7ay8bq6Mdi for <jose@ietfa.amsl.com>; Fri,  7 Jul 2017 02:56:54 -0700 (PDT)
Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 06B9F12EC3B for <jose@ietf.org>; Fri,  7 Jul 2017 02:56:54 -0700 (PDT)
Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 81064C0587C4; Fri,  7 Jul 2017 09:56:53 +0000 (UTC)
DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 81064C0587C4
Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=simo@redhat.com
DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 81064C0587C4
Received: from rhino.ipa.ssimo.org (ovpn-116-56.phx2.redhat.com [10.3.116.56]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 95B986CDA0; Fri,  7 Jul 2017 09:56:48 +0000 (UTC)
Message-ID: <1499421406.4686.5.camel@redhat.com>
From: Simo Sorce <simo@redhat.com>
To: Vladimir Dzhuvinov <vladimir@connect2id.com>, Nathaniel McCallum <npmccallum@redhat.com>, jose@ietf.org
Cc: Nikos Mavrogiannopoulos <nmav@redhat.com>, Daiki Ueno <dueno@redhat.com>
Date: Fri, 07 Jul 2017 05:56:46 -0400
In-Reply-To: <4a84c70f-885e-3125-f736-71c404b28d95@connect2id.com>
References: <CAOASepNR_1XjDaCHUyLL_o63EvBcQ6L1TyeMhdUzrbmtYSWRNg@mail.gmail.com> <CAOASepOjSo_Lr4x3rzbPh0gxifh_csHY0d08hpRcSCeF0e+OwA@mail.gmail.com> <4a84c70f-885e-3125-f736-71c404b28d95@connect2id.com>
Content-Type: text/plain; charset="UTF-8"
Mime-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14
X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Fri, 07 Jul 2017 09:56:53 +0000 (UTC)
Archived-At: <https://mailarchive.ietf.org/arch/msg/jose/w-nb0Ua16Wo-alSLy4kYMUBw188>
Subject: Re: [jose] PKCS #11 for JWK
X-BeenThere: jose@ietf.org
X-Mailman-Version: 2.1.22
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: Fri, 07 Jul 2017 09:56:55 -0000

On Thu, 2017-07-06 at 23:07 +0200, Vladimir Dzhuvinov wrote:
> Great!
> 
> The "k" parameter appears to be mandatory for "oct" JWKs. How can we
> reconcile that with the p11 spec? Ideas?
> 
> https://tools.ietf.org/html/rfc7518#section-6.4.1

I wonder if an empty value would be properly handled by implementations
or would cause them to leak information instead of encrypting it, or
worse fall over themselves.

Worst case we could define a new type "hwoct" ? Sounds a bit silly tho.

Simo.


From nobody Fri Jul  7 03:32:00 2017
Return-Path: <ilariliusvaara@welho.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 A91F313167D for <jose@ietfa.amsl.com>; Fri,  7 Jul 2017 03:31:59 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.9
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, RP_MATCHES_RCVD=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
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 8XJWVoWw9fZe for <jose@ietfa.amsl.com>; Fri,  7 Jul 2017 03:31:57 -0700 (PDT)
Received: from welho-filter1.welho.com (welho-filter1.welho.com [83.102.41.23]) by ietfa.amsl.com (Postfix) with ESMTP id 0D798129AD3 for <jose@ietf.org>; Fri,  7 Jul 2017 03:31:56 -0700 (PDT)
Received: from localhost (localhost [127.0.0.1]) by welho-filter1.welho.com (Postfix) with ESMTP id 26B8A65374 for <jose@ietf.org>; Fri,  7 Jul 2017 13:31:55 +0300 (EEST)
X-Virus-Scanned: Debian amavisd-new at pp.htv.fi
Received: from welho-smtp2.welho.com ([IPv6:::ffff:83.102.41.85]) by localhost (welho-filter1.welho.com [::ffff:83.102.41.23]) (amavisd-new, port 10024) with ESMTP id 5vMgYApcAj8X for <jose@ietf.org>; Fri,  7 Jul 2017 13:31:54 +0300 (EEST)
Received: from LK-Perkele-VII (87-92-19-27.bb.dnainternet.fi [87.92.19.27]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by welho-smtp2.welho.com (Postfix) with ESMTPSA id B413E21C for <jose@ietf.org>; Fri,  7 Jul 2017 13:31:53 +0300 (EEST)
Date: Fri, 7 Jul 2017 13:31:53 +0300
From: Ilari Liusvaara <ilariliusvaara@welho.com>
To: jose@ietf.org
Message-ID: <20170707103153.foufsm2wuibmomip@LK-Perkele-VII>
References: <CAOASepNR_1XjDaCHUyLL_o63EvBcQ6L1TyeMhdUzrbmtYSWRNg@mail.gmail.com> <CAOASepOjSo_Lr4x3rzbPh0gxifh_csHY0d08hpRcSCeF0e+OwA@mail.gmail.com> <4a84c70f-885e-3125-f736-71c404b28d95@connect2id.com> <78d0105d-cccc-49ed-2e9e-ff1c6caf8e6c@gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
In-Reply-To: <78d0105d-cccc-49ed-2e9e-ff1c6caf8e6c@gmail.com>
User-Agent: NeoMutt/20170609 (1.8.3)
Sender: ilariliusvaara@welho.com
Archived-At: <https://mailarchive.ietf.org/arch/msg/jose/uYTx04BPspkSPJyoHx3SCw4nt14>
Subject: Re: [jose] PKCS #11 for JWK
X-BeenThere: jose@ietf.org
X-Mailman-Version: 2.1.22
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: Fri, 07 Jul 2017 10:32:00 -0000

On Fri, Jul 07, 2017 at 09:05:38AM +0200, Anders Rundgren wrote:
> On 2017-07-06 23:07, Vladimir Dzhuvinov wrote:
> > Great!
> > 
> > The "k" parameter appears to be mandatory for "oct" JWKs. How can we
> > reconcile that with the p11 spec? Ideas?
> > 
> > https://tools.ietf.org/html/rfc7518#section-6.4.1
> 
> It gets even more fun with OKP JWKs:

Actually from what I can gather, RSA and OKP require the private key
material for private keys. EC and OCT do not (at least I can't find
explicit language saying they have to).

So sounds like updating to RFC 7518 and RFC 8037 is in order.

(Of course, I don't think presently OKP keys can be used with PKCS#11,
but that is due to lack of specification, so it could change...)


-Ilari


From nobody Fri Jul  7 07:24:04 2017
Return-Path: <vladimir@connect2id.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 75B5E12EC23 for <jose@ietfa.amsl.com>; Fri,  7 Jul 2017 07:24:03 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.419
X-Spam-Level: 
X-Spam-Status: No, score=-0.419 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_SORBS_WEB=1.5, URIBL_BLOCKED=0.001] autolearn=no autolearn_force=no
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 irnW4EGzpuUR for <jose@ietfa.amsl.com>; Fri,  7 Jul 2017 07:24:02 -0700 (PDT)
Received: from p3plsmtpa07-08.prod.phx3.secureserver.net (p3plsmtpa07-08.prod.phx3.secureserver.net [173.201.192.237]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 58D02129ABE for <jose@ietf.org>; Fri,  7 Jul 2017 07:24:02 -0700 (PDT)
Received: from [192.168.43.252] ([212.5.158.160]) by :SMTPAUTH: with SMTP id TUAIdiOHyznf6TUAJd5Wov; Fri, 07 Jul 2017 07:23:31 -0700
To: Nathaniel McCallum <npmccallum@redhat.com>, jose@ietf.org
Cc: Nikos Mavrogiannopoulos <nmav@redhat.com>, Daiki Ueno <dueno@redhat.com>,  "Sorce, Simo" <simo@redhat.com>
References: <CAOASepNR_1XjDaCHUyLL_o63EvBcQ6L1TyeMhdUzrbmtYSWRNg@mail.gmail.com> <CAOASepOjSo_Lr4x3rzbPh0gxifh_csHY0d08hpRcSCeF0e+OwA@mail.gmail.com>
From: Vladimir Dzhuvinov <vladimir@connect2id.com>
Organization: Connect2id Ltd.
Message-ID: <e5cb68fc-2ff4-e0da-c7ff-660c0bd9a35c@connect2id.com>
Date: Fri, 7 Jul 2017 16:23:21 +0200
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1
MIME-Version: 1.0
In-Reply-To: <CAOASepOjSo_Lr4x3rzbPh0gxifh_csHY0d08hpRcSCeF0e+OwA@mail.gmail.com>
Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha-256; boundary="------------ms050300030507070809030405"
X-CMAE-Envelope: MS4wfNKIVOnNV0utvvQcqbjG7mAMIKQJqmxVMBPMRsxOsly9F8CeYGfjwITHV8HuC4Tnc7qJZK6DfirnnC9y+iSzxIortv1W6+HXjBcEyw3osVlBR8lp374K k/tGYukmaJUmzAOcSN1KSprEV1OxmGrJgRL5U5gDLY+QEwEDj5Y3wZs0y0EY3Cq04glBR903FDUYZoNSX+ix9r8bOCg1xn0ma0pwpzsTMqtyFPm8DtghlEia UYTG6Vya+/u4CtHgrCVV8e9w41vDQf+4w7qax87N3rBYWmNnhk5YnWaNf9tax3be
Archived-At: <https://mailarchive.ietf.org/arch/msg/jose/UvuRmMXx_7E-KuEXtQJAtVa3s1U>
Subject: Re: [jose] PKCS #11 for JWK
X-BeenThere: jose@ietf.org
X-Mailman-Version: 2.1.22
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: Fri, 07 Jul 2017 14:24:03 -0000

This is a cryptographically signed message in MIME format.

--------------ms050300030507070809030405
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
Content-Language: en-US

Regarding section 4 of the proposed -01 spec:

When dealing with "oct" JWKs, shouldn't the PKCS#11 URI type parameter
become "secret-key"?

Vladimir


On 05/07/17 21:01, Nathaniel McCallum wrote:
> I have updated the draft from the comments everyone has provided.
> However, document uploads are currently locked due to the IETF
> meeting, so I have attached the document here. Your feedback is
> greatly appreciated.
>
> On Fri, Jun 30, 2017 at 5:33 PM, Nathaniel McCallum
> <npmccallum@redhat.com> wrote:
>> I have prepared an initial stab at a draft for offloading JWK private
>> key data to PKCS #11.
>>
>> You can find the document here:
>>    https://www.ietf.org/id/draft-mccallum-jose-pkcs11-jwk-00.txt
>>
>> Thanks for your consideration!



--------------ms050300030507070809030405
Content-Type: application/pkcs7-signature; name="smime.p7s"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="smime.p7s"
Content-Description: S/MIME Cryptographic Signature

MIAGCSqGSIb3DQEHAqCAMIACAQExDzANBglghkgBZQMEAgEFADCABgkqhkiG9w0BBwEAAKCC
CfwwggSvMIIDl6ADAgECAhEA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ZH5Mo/3sTCBwwYLKoZI
hvcNAQkQAgsxgbOggbAwgZsxCzAJBgNVBAYTAkdCMRswGQYDVQQIExJHcmVhdGVyIE1hbmNo
ZXN0ZXIxEDAOBgNVBAcTB1NhbGZvcmQxGjAYBgNVBAoTEUNPTU9ETyBDQSBMaW1pdGVkMUEw
PwYDVQQDEzhDT01PRE8gU0hBLTI1NiBDbGllbnQgQXV0aGVudGljYXRpb24gYW5kIFNlY3Vy
ZSBFbWFpbCBDQQIQJUrAV9eov8hmWZH5Mo/3sTANBgkqhkiG9w0BAQEFAASCAQCB7aIVgYry
vj6VryuKQnFBx8Xufp5+waqwQfRfbZIbeQvGyEKApL0PDJ5hq3kty3uzjBZp59LELxZcqymP
GtewHv0lRfJh4+I2+Ka+Wjvph0zZBOAgcl/P7azz+pqZnv0ceSbiJPt4QHPp6jXIS3XV3jre
xdANcl5SXerF0XxLLdxagDFypgcMwIJrpNyR9OmgBqcQSNbnSv+3S+yLXDK5L6hf9hsgZFkq
yvzhdV7iGjd7C/6xfUkDHoDMgueQs/RroPseteFwhSbbeGDjS0nGfA2AEjuTrsLNgjHJ+KYC
MQA25XqMBaCYZ5/e7xs46aL9+uwaOJsN9pY/54Wgp463AAAAAAAA
--------------ms050300030507070809030405--


From nobody Fri Jul  7 07:25:06 2017
Return-Path: <nmccallu@redhat.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 A47AA131533 for <jose@ietfa.amsl.com>; Fri,  7 Jul 2017 07:25:05 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.419
X-Spam-Level: 
X-Spam-Status: No, score=-1.419 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HK_RANDOM_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_SORBS_SPAM=0.5, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=no autolearn_force=no
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 MX7_dUePGOBe for <jose@ietfa.amsl.com>; Fri,  7 Jul 2017 07:25:03 -0700 (PDT)
Received: from mail-it0-f47.google.com (mail-it0-f47.google.com [209.85.214.47]) (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 C195B12EC23 for <jose@ietf.org>; Fri,  7 Jul 2017 07:25:03 -0700 (PDT)
Received: by mail-it0-f47.google.com with SMTP id m84so37414913ita.0 for <jose@ietf.org>; Fri, 07 Jul 2017 07:25:03 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=HSofTAq9nOGpvbP97hITeEI1/b+PdOHHrkYneRAqGWQ=; b=gICpToeHfdzgLfSJkFm/ohjDlC1m/EsddE8sTppwybqo3vuId3cKtxFTiHBPp60h9v Is9DpmmU/BNrR5HMDTaHXIw3sW9f2RFiNn0uEVTh2oS3rlLS/Wlc6uECnopCiX/uoszT 4D/9CRObKH1HFmWANxx+l5QZwqHFdv6zungVR39kav8MLz2F+FGT8RfYJmDbNwE5SREK 42uPTPd4r8Tb73yfaJq0PLFhL+aiNcdX0mueUPyYOcE5Ff9WjbCwnoy5uEZVOkUdiKr/ /2dqyaXcy7tdbgvK10OzRt39uIh+aMKlJeq2TLrTYjhd0uK1jCmpl8akxcS7asvqwPrH lA6w==
X-Gm-Message-State: AIVw111u2siiWvdAp2oyZR97JJ7iCvctkW//jxdlSFIRahlpLvhSLtFu fqLOeEK8BAdU/+u2nblC9xhn4/fVn7t9zeg=
X-Received: by 10.36.254.199 with SMTP id w190mr3482449ith.108.1499437502933;  Fri, 07 Jul 2017 07:25:02 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.107.132.88 with HTTP; Fri, 7 Jul 2017 07:25:02 -0700 (PDT)
In-Reply-To: <e5cb68fc-2ff4-e0da-c7ff-660c0bd9a35c@connect2id.com>
References: <CAOASepNR_1XjDaCHUyLL_o63EvBcQ6L1TyeMhdUzrbmtYSWRNg@mail.gmail.com> <CAOASepOjSo_Lr4x3rzbPh0gxifh_csHY0d08hpRcSCeF0e+OwA@mail.gmail.com> <e5cb68fc-2ff4-e0da-c7ff-660c0bd9a35c@connect2id.com>
From: Nathaniel McCallum <npmccallum@redhat.com>
Date: Fri, 7 Jul 2017 10:25:02 -0400
Message-ID: <CAOASepPCG7DpU9=H6KUwrj4a-Ese9ap6v4CJiLDx9ZE5bkgKjg@mail.gmail.com>
To: Vladimir Dzhuvinov <vladimir@connect2id.com>
Cc: jose@ietf.org, Nikos Mavrogiannopoulos <nmav@redhat.com>, Daiki Ueno <dueno@redhat.com>, "Sorce, Simo" <simo@redhat.com>
Content-Type: text/plain; charset="UTF-8"
Archived-At: <https://mailarchive.ietf.org/arch/msg/jose/PA0TXj0xH2LLpv9p_k0Z5uMq7Do>
Subject: Re: [jose] PKCS #11 for JWK
X-BeenThere: jose@ietf.org
X-Mailman-Version: 2.1.22
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: Fri, 07 Jul 2017 14:25:06 -0000

Yes. Thank you for correcting my oversight!

On Fri, Jul 7, 2017 at 10:23 AM, Vladimir Dzhuvinov
<vladimir@connect2id.com> wrote:
> Regarding section 4 of the proposed -01 spec:
>
> When dealing with "oct" JWKs, shouldn't the PKCS#11 URI type parameter
> become "secret-key"?
>
> Vladimir
>
>
> On 05/07/17 21:01, Nathaniel McCallum wrote:
>> I have updated the draft from the comments everyone has provided.
>> However, document uploads are currently locked due to the IETF
>> meeting, so I have attached the document here. Your feedback is
>> greatly appreciated.
>>
>> On Fri, Jun 30, 2017 at 5:33 PM, Nathaniel McCallum
>> <npmccallum@redhat.com> wrote:
>>> I have prepared an initial stab at a draft for offloading JWK private
>>> key data to PKCS #11.
>>>
>>> You can find the document here:
>>>    https://www.ietf.org/id/draft-mccallum-jose-pkcs11-jwk-00.txt
>>>
>>> Thanks for your consideration!
>
>


From nobody Sat Jul  8 21:48:31 2017
Return-Path: <anders.rundgren.net@gmail.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 3A0E9126B71 for <jose@ietfa.amsl.com>; Sat,  8 Jul 2017 21:48:30 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.999
X-Spam-Level: 
X-Spam-Status: No, score=-1.999 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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com
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 r3lyTSr-aqXI for <jose@ietfa.amsl.com>; Sat,  8 Jul 2017 21:48:28 -0700 (PDT)
Received: from mail-wr0-x242.google.com (mail-wr0-x242.google.com [IPv6:2a00:1450:400c:c0c::242]) (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 087BA124D37 for <jose@ietf.org>; Sat,  8 Jul 2017 21:48:27 -0700 (PDT)
Received: by mail-wr0-x242.google.com with SMTP id k67so16891305wrc.1 for <jose@ietf.org>; Sat, 08 Jul 2017 21:48:27 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;  h=subject:references:to:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=S2qz6CimD6X/ARw/DJ8SZIenUw0diwpqolTUQNbcTBo=; b=DfTZKrQ9WWu//9rx7YcwDPYpgZlCQWnYqpxUFh5EKRyyYIUbHaD4GU/i+5Xg6TJbNH NumGHGpLZFR+GQuy6m9qQCExC4iGj2IVSFWqCwfR1n5NxiV+wZkunORGoBsbDnEuTeaQ sngVnBKpQjVHpzZavNWmjn97+QiweVgh/vojYjZofrUQDr/nn+jfIrx/ocfzfVXT+KOM lvbF5xMfMdP2QH2M9aMrcDk5S10/xDO3N4WBgb7O/PNNi28M8yN0JTqS+PkfrzjooqFo FZvqyzXvxgsnJuMZPWvQ32tDuAPWS1fM+sfHnp9QfITvi+bwj6p3jpjk5XwRHJD9jgZT COkA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:references:to:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=S2qz6CimD6X/ARw/DJ8SZIenUw0diwpqolTUQNbcTBo=; b=jo7H6m/fn4cmB4gZWCXVL5r2kDWwjt0iSoFatFZLANPqAznAikoKekY7D8Pq7QiYLi k4SwCxbUICRY7mVLikNKif+dtPbq2ZNBROfndTrURh4mcK/XBawNEzPrbUMB0rqZn+lM qQN5ijMyOCE14TGOUFIuhcYNakYNJh29p+o1Zp2CzMULUodkucWOS7i0S1aQIu5o69Sk p7m+DQjV07ZqEomRneGD+mkQ/jye0c4K+ljoIa8P4+lWAhbK+Gt0HyMbZUtyTmHzJ/IG O8wc4fznz3WtbPXjs+edcTAFqglHUXz5ADoywN1A+MaSHk3bcqoWza9t7qJ6PfrSV5bY n4/A==
X-Gm-Message-State: AIVw110viHqFMXTt5eZTpa5qVKeO0BDCMEKxYQVbiOYm6xJRkOkSozYz jRBpjTWxHRETkZfc
X-Received: by 10.28.133.76 with SMTP id h73mr3563622wmd.92.1499575705911; Sat, 08 Jul 2017 21:48:25 -0700 (PDT)
Received: from [192.168.1.79] (25.131.146.77.rev.sfr.net. [77.146.131.25]) by smtp.googlemail.com with ESMTPSA id b94sm6046809wrd.40.2017.07.08.21.48.25 for <jose@ietf.org> (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 08 Jul 2017 21:48:25 -0700 (PDT)
References: <c76cd89f-8b37-ac39-2cdd-7795bf4ae111@gmail.com>
To: "jose@ietf.org" <jose@ietf.org>
From: Anders Rundgren <anders.rundgren.net@gmail.com>
X-Forwarded-Message-Id: <c76cd89f-8b37-ac39-2cdd-7795bf4ae111@gmail.com>
Message-ID: <24f14cb1-3117-0eaa-4447-6f26581595d6@gmail.com>
Date: Sun, 9 Jul 2017 06:48:21 +0200
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1
MIME-Version: 1.0
In-Reply-To: <c76cd89f-8b37-ac39-2cdd-7795bf4ae111@gmail.com>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit
Archived-At: <https://mailarchive.ietf.org/arch/msg/jose/TqGu3LntFurpJouT7bFYV4MpMlY>
Subject: [jose] JSON Signatures in OpenBanking (UK)
X-BeenThere: jose@ietf.org
X-Mailman-Version: 2.1.22
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: Sun, 09 Jul 2017 04:48:30 -0000

Since the market for clear text JSON signatures is sort of heating up, the following may be of some interest...

Here is a (probably biased), extremely condensed comparison of the three JSON signature schemes, all having one thing in common which was NOT the priority of the IETF JOSE WG, namely preserving the JSON text "as is" (=human readable).

The OpenBanking signature scheme is quite straightforward but also have huge limitations since messages are tied to HTTP making the concept incompatible with JavaScript/Browsers, WebSockets, Message Embedding as well as with Serialization in databases.

LDS (Linked Data Signatures) and JCS both claim adherence to JOSE standards but achieves that through entirely different methods:
- LDS use (a subset of) the JWS detached signature format but put all information regarding the signature key outside of the base64-encoded JWS container.
- JCS do not use the JWS container since one of the goals was providing all information in clear, including algorithms, public keys, etc. JCS rather reuse (a subset of) the JWK container and the JWA signature algorithms.

Since in-line signatures need some form of normalization in order to be interoperable, LDS utilizes a specific canonicalization algorithm while JCS only relies on JSON.stringify() as defined by ECMA.  This difference has major implications for applications as well as tools.

LDS primarily targets Linked Data, while JCS only targets plain-vanilla JSON/JavaScript.

Anders

On 2017-07-08 22:04, Kim Hamilton wrote:
> 
> We're about to release a paper on this topic originating out of last Rebooting Web of Trust. Manu developed an approach reconciling LD signatures with JWS. The approach uses the unencoded payload option (also detached), enabled by RFC7797 (https://tools.ietf.org/html/rfc7797).
> 
> The LD signature suite is called RSA Signature Suite 2017 (https://w3c-dvcg.github.io/lds-rsa2017/).
> 
> The paper describing the approach and implementation is in draft form below, but will soon be released in final form
> https://github.com/WebOfTrustInfo/rebooting-the-web-of-trust-spring2017/blob/master/event-documents/group-abstracts/SignatureAlignmentAbstract.md
> 
> -- Kim
> 
> On Sat, Jul 8, 2017 at 4:25 AM Anders Rundgren <anders.rundgren.net@gmail.com <mailto:anders.rundgren.net@gmail.com>> wrote:
> 
>     Maybe of interest to the Security Task Force:
>     https://www.openbanking.org.uk/read-write-apis/payment-initiation-api/v1-0-0/#basics-headers
> 
>     Apparently they use a signature based on a detached JWS supplied as a header parameter and where the data to be signed is simply the HTTP body "as is".
> 
>     So at this stage we have not less than three entirely different ways of dealing with signed JSON:
> 
>     - OpenBanking(UK) as described above
> 
>     - The Linked Data Signature scheme (initially) created by Digitalbazaar and adopted by the Verified Credentials CG: https://github.com/w3c-dvcg/ld-signatures
> 
>     - My JSON Cleartext Signature scheme: https://cyberphone.github.io/doc/security/jcs.html
> 
>     Anders
> 


From nobody Sun Jul  9 23:03:05 2017
Return-Path: <nmav@redhat.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 5D0C6120454 for <jose@ietfa.amsl.com>; Sun,  9 Jul 2017 23:03:03 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.701
X-Spam-Level: 
X-Spam-Status: No, score=-4.701 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-2.8, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
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 HCjCDYS8oaCX for <jose@ietfa.amsl.com>; Sun,  9 Jul 2017 23:03:01 -0700 (PDT)
Received: from mail-wr0-f177.google.com (mail-wr0-f177.google.com [209.85.128.177]) (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 807E11200B9 for <jose@ietf.org>; Sun,  9 Jul 2017 23:03:01 -0700 (PDT)
Received: by mail-wr0-f177.google.com with SMTP id k67so122959901wrc.2 for <jose@ietf.org>; Sun, 09 Jul 2017 23:03:00 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:mime-version:content-transfer-encoding; bh=/1/hR2wuD2kd5A/vl72DeLM1c9odQ1dmWmL5wgdxutA=; b=HLWXSku+EBpQkfjubx8DM1UI3fB5oJjYwX94z4gric7B97C0x0oYRxiIxpJxXPp5Y2 RagOb1aJaGiYjcsXbNC6Y8ZDXMEwn08OkkVJzdqXv62m/oHpwFpELy9zBNfPnbAZqjg1 yZuCYlvlQ71zO8WvVQSoGXYBnFPqNOw2TScPqDwxoydsl5IBt1U7rOX02OZUF6igntR0 A0Cd12fMRRWEDy5/HIVh8wisIXWTyN4gMBCE+E17WM875OUwO02xyFbdq1mOmREjH6aq oh+Vp76227jM5RuxGSPaK1FgKOMwsgoOMBOWPEK3rRDowTYAeF5DuF3JzkjKSQbCecQs Pvdg==
X-Gm-Message-State: AIVw112G1By0999h2NJAY8Ue3ndpV4lvUVYZQuLANEqcLhWcNaM4BUty 3B2edzR0kvSrTrApf2gBpw==
X-Received: by 10.223.142.202 with SMTP id q68mr5860878wrb.13.1499666579504; Sun, 09 Jul 2017 23:02:59 -0700 (PDT)
Received: from dhcp-10-40-1-102.brq.redhat.com (nat-pool-brq-t.redhat.com. [213.175.37.10]) by smtp.gmail.com with ESMTPSA id v2sm15026494wrb.68.2017.07.09.23.02.58 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 09 Jul 2017 23:02:58 -0700 (PDT)
Message-ID: <1499666578.2933.3.camel@redhat.com>
From: Nikos Mavrogiannopoulos <nmav@redhat.com>
To: Nathaniel McCallum <npmccallum@redhat.com>, Simo Sorce <simo@redhat.com>
Cc: jose@ietf.org, Daiki Ueno <dueno@redhat.com>
Date: Mon, 10 Jul 2017 08:02:58 +0200
In-Reply-To: <CAOASepOYo4hnqdFCJ5-Oxf1C5eLWj-qavQUwfXt_nG-1pZ=cMw@mail.gmail.com>
References: <CAOASepNR_1XjDaCHUyLL_o63EvBcQ6L1TyeMhdUzrbmtYSWRNg@mail.gmail.com> <1498896051.11334.78.camel@redhat.com> <CAOASepOYo4hnqdFCJ5-Oxf1C5eLWj-qavQUwfXt_nG-1pZ=cMw@mail.gmail.com>
Content-Type: text/plain; charset="UTF-8"
X-Mailer: Evolution 3.22.6 (3.22.6-2.fc25) 
Mime-Version: 1.0
Content-Transfer-Encoding: 8bit
Archived-At: <https://mailarchive.ietf.org/arch/msg/jose/lCja-9IzsEEwzcHzLf8WcT0EUXc>
Subject: Re: [jose] PKCS #11 for JWK
X-BeenThere: jose@ietf.org
X-Mailman-Version: 2.1.22
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, 10 Jul 2017 06:03:03 -0000

On Wed, 2017-07-05 at 09:04 -0400, Nathaniel McCallum wrote:
> On Sat, Jul 1, 2017 at 4:00 AM, Simo Sorce <simo@redhat.com> wrote:
> > Later on you talk about performance penalty and say:
> > 
> >    Implementations SHOULD perform public
> >    key operations, such as asymmetric signature verification or
> >    asymmetric encryption, without using PKCS #11
> > 
> > I think this should be at most a MAY. If I wanted to be more
> > pedantic I
> > would say you should take in consideration there may be PKCS#11
> > modules
> > that are already smart enough to implement such functions in
> > software
> > so that they do not incur in performance penalties, so the whole
> > this
> > would have to be wrapped in something like:
> >  "If the PKCS#11 implementation perform public key operation in
> > hardare
> > that may result in poor performance then implementations MAY
> > perfrom
> > public ..."
> 
> I did some reflection on this over the long weekend. If we wanted to
> support offloading public key operations to PKCS #11, we'd need to
> have a "p11pub" JWK property which defines the URI to the public key
> to perform the operation on. This duplicates the existing public key
> information in the JWK.
> 
> We could allow three modes:
> 1. pubkey-only; no PKCS #11
> 2. URI-only; PKCS #11
> 3. both; optional PKCS #11
> 
> In mode #3, there is a possibility for public key mismatch. However,
> no attacks exist which don't also exist for mode #1.
> 
> My worry is that this is a lot of complexity for minimal gain. JOSE
> implementations already have to support #1. At best, mode #2 is going
> to be as fast as #1. I just don't see any compelling reason to
> support public key URIs. Do you?

As long as you have the tooling to extract that public key/cert from
the HSM, I can think of no reason using the HSM for public key
operations.

regards,
Nikos


From nobody Thu Jul 27 11:50:32 2017
Return-Path: <bcampbell@pingidentity.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 733F41320D8 for <jose@ietfa.amsl.com>; Thu, 27 Jul 2017 11:50:30 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.999
X-Spam-Level: 
X-Spam-Status: No, score=-1.999 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=pingidentity.com
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 lDoB7GU8BCSt for <jose@ietfa.amsl.com>; Thu, 27 Jul 2017 11:50:28 -0700 (PDT)
Received: from mail-pf0-x22c.google.com (mail-pf0-x22c.google.com [IPv6:2607:f8b0:400e:c00::22c]) (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 3C3A51320CD for <jose@ietf.org>; Thu, 27 Jul 2017 11:50:28 -0700 (PDT)
Received: by mail-pf0-x22c.google.com with SMTP id z129so47293316pfb.3 for <jose@ietf.org>; Thu, 27 Jul 2017 11:50:28 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pingidentity.com; s=gmail; h=mime-version:from:date:message-id:subject:to; bh=AGV8lNuZMlSJvBhNn1opB4HDTBLBuGCi0M1VXnxMv48=; b=Pizl4/Q8s57Q0QQSjWypPCivU2zAoYXlyCeSDJuNOa6iJOptGBJIzQLo5n0FS/uJBR BxRZ7eRU3xmZa92W4Kc1OceD48h/Ugg7f2pWrazrj+y6F6VFku5o/yt2VIaXuCN+ZF0C cRcu4xZbwMTyjbSTbzR42OE6hlpgHF9F2tGmY=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=AGV8lNuZMlSJvBhNn1opB4HDTBLBuGCi0M1VXnxMv48=; b=Sz0FKeLDFWhpnXKFtbGAuWhFq5O+wBhSHyJNTtypUl+qdF8TKr9HsiUY9GyE2WIE5X MMG6TqwYEjzKIu3FHssGy65jSLI6OMb46iGTe4pn3nLjXlXh/VzJ6+9OxK16qHsYLxvd Vi72XHhubjdpQoc62G7MPuBNDMblk3RokOVmG3wAztO1W5m2xQJDiAWlI8ufZub46rHx DnnGgShn6nqjNZ7t+TVoX7FMymPEgs7iKdaE00UU7LcsPzzMdVTg6642Wh10c7jxLkQx ek5cUC3h8JmPj9qqYxwb+L8pl1v8bZhgj/JgwTT0MInGueyi9C828V2dKcAlRGoikfm7 Sfqw==
X-Gm-Message-State: AIVw111xhBbeHL2fezmkRp+2wIX+jvtm7T9pE2cl5QanPy+09ILyLdUu qYaFnaFJ1aofQXjTKsMzCv/nS/hGWW/V6q+EyE5YCf5zs/HOD8hNKCeiwv8Qlb4jesxgu24DlPE KAFRPvA==
X-Received: by 10.84.232.143 with SMTP id i15mr5409741plk.248.1501181427707; Thu, 27 Jul 2017 11:50:27 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.100.145.87 with HTTP; Thu, 27 Jul 2017 11:49:57 -0700 (PDT)
From: Brian Campbell <bcampbell@pingidentity.com>
Date: Thu, 27 Jul 2017 12:49:57 -0600
Message-ID: <CA+k3eCRT_iuLHYrLxz+tf1MT9L9XG2jV0D0anC0h5w7A_ujEdQ@mail.gmail.com>
To: oauth <oauth@ietf.org>, "jose@ietf.org" <jose@ietf.org>
Content-Type: multipart/alternative; boundary="f40304361ef4be0b9d05555109bf"
Archived-At: <https://mailarchive.ietf.org/arch/msg/jose/XF578Xbf6yf-SkZdumj4quW4EXw>
Subject: [jose] preventing confusion of one kind of JWT for another in JWT BCP
X-BeenThere: jose@ietf.org
X-Mailman-Version: 2.1.22
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: Thu, 27 Jul 2017 18:50:30 -0000

--f40304361ef4be0b9d05555109bf
Content-Type: text/plain; charset="UTF-8"

During the first WG meeting last week
<https://datatracker.ietf.org/doc/minutes-99-oauth/> I asked if use of the
JOSE "crit" (Critical) Header Parameter had been considered as a
recommendation for preventing confusion of one kind of JWT for another.
Time was running short in the meeting so there wasn't much discussion and
it was requested that I take the question to the list. And so here on the
list is that.

Section 3.9
<https://tools.ietf.org/html/draft-sheffer-oauth-jwt-bcp-01#section-3.9> of
the JWT BCP draft now recommends explicit typing using the "typ" JWS/JWE
header parameter but does concede that 'the use of explicit typing may not
achieve disambiguation from existing kinds of JWTs, as the validation rules
for existing kinds JWTs often do not use the "typ" header parameter
value.'  And the recommendations for how to use the Type Header Parameter
in JWT <https://tools.ietf.org/html/rfc7519#section-5.1> strongly suggest
that it's not currently being used for any validation.

Alternatively using the JWS/JWE "crit" (Critical) Header Parameter
<https://tools.ietf.org/html/rfc7515#section-4.1.11> to signal the
type/intent/profile/application of a JWT could achieve disambiguation even
in validation of existing kinds of JWTs. The critical header lists other
headers which must be understood and processed by the receiver and that the
JWS/JWE is invalid if those listed aren't understood. So a new type/profile
of JWT that uses the "crit" header would produce JWTs that would be
rejected even by existing applications of JWT validation (that actually
implement "crit" properly anyway).

The JWT BCP could suggest the use of "crit" in conjunction with a
profile/application/type specific header. Or it could provide a bit more of
a framework like defining a registering a new JOSE header "p" (strawman of
p as a very short name for profile) and create a registry for its values. A
JWT header using that approach might look like the following where the
value 1 is registered as some cool new JWT profile/application. The
consumer of such a JWT would have to understand and process the "p" header,
which would mean checking that it had the value expected.

     {
      "alg":"ES256",
      "crit":["p"],
      "p":1
     }

A JOSE compliant JWT validator would reject such a JWT even for an OAuth
access token or OIDC id_token because the "p" header isn't known or
understood but is marked as critical.

To me, that seems like an approach to preventing confusion that has more
teeth than the "typ" header. Which is why I asked about it last week and am
now bringing it to the list.

-- 
*CONFIDENTIALITY NOTICE: This email may contain confidential and privileged 
material for the sole use of the intended recipient(s). Any review, use, 
distribution or disclosure by others is strictly prohibited.  If you have 
received this communication in error, please notify the sender immediately 
by e-mail and delete the message and any file attachments from your 
computer. Thank you.*

--f40304361ef4be0b9d05555109bf
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div><div><div><div><div>During the <a href=3D"https://dat=
atracker.ietf.org/doc/minutes-99-oauth/">first WG meeting last week</a> I a=
sked if use of the JOSE &quot;crit&quot; (Critical) Header Parameter had be=
en considered as a recommendation for preventing confusion of one kind of J=
WT for another. Time was running short in the meeting so there wasn&#39;t m=
uch discussion and it was requested that I take the question to the list. A=
nd so here on the list is that. <br><br></div><a href=3D"https://tools.ietf=
.org/html/draft-sheffer-oauth-jwt-bcp-01#section-3.9">Section 3.9</a> of th=
e JWT BCP draft now recommends explicit typing using the &quot;typ&quot; JW=
S/JWE header parameter but does concede that &#39;the use of explicit typin=
g may not achieve disambiguation from existing kinds of JWTs, as the valida=
tion rules for existing kinds JWTs often do not use the &quot;typ&quot; hea=
der parameter value.&#39;=C2=A0 And the recommendations for how to use the =
<a href=3D"https://tools.ietf.org/html/rfc7519#section-5.1">Type Header Par=
ameter in JWT</a> strongly suggest that it&#39;s not currently being used f=
or any validation. <br><br></div>Alternatively using the JWS/JWE <a href=3D=
"https://tools.ietf.org/html/rfc7515#section-4.1.11">&quot;crit&quot; (Crit=
ical) Header Parameter</a> to signal the type/intent/profile/application of=
 a JWT could achieve disambiguation even in validation of existing kinds of=
 JWTs. The critical header lists other headers which must be understood and=
 processed by the receiver and that the JWS/JWE is invalid if those listed =
aren&#39;t understood. So a new type/profile of JWT that uses the &quot;cri=
t&quot; header would produce JWTs that would be rejected even by existing a=
pplications of JWT validation (that actually implement &quot;crit&quot; pro=
perly anyway).<br><br></div>The JWT BCP could suggest the use of &quot;crit=
&quot; in conjunction with a profile/application/type specific header. Or i=
t could provide a bit more of a framework like defining a registering a new=
 JOSE header &quot;p&quot; (strawman of p as a very short name for profile)=
 and create a registry for its values. A JWT header using that approach mig=
ht look like the following where the value 1 is registered as some cool new=
 JWT profile/application. The consumer of such a JWT would have to understa=
nd and process the &quot;p&quot; header, which would mean checking that it =
had the value expected. <br>=C2=A0<br>=C2=A0=C2=A0=C2=A0=C2=A0 {<br>=C2=A0=
=C2=A0=C2=A0=C2=A0=C2=A0 &quot;alg&quot;:&quot;ES256&quot;,<br>=C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0 &quot;crit&quot;:[&quot;p&quot;],<br>=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0 &quot;p&quot;:1<br>=C2=A0=C2=A0=C2=A0=C2=A0 }<br><br></div>A J=
OSE compliant JWT validator would reject such a JWT even for an OAuth acces=
s token or OIDC id_token because the &quot;p&quot; header isn&#39;t known o=
r understood but is marked as critical. <br><br></div>To me, that seems lik=
e an approach to preventing confusion that has more teeth than the &quot;ty=
p&quot; header. Which is why I asked about it last week and am now bringing=
 it to the list. <br><div><div><br><br><div><div><div><div><br><br><div><br=
><br><br><br><br></div></div></div></div></div></div></div></div>

<br>
<i style=3D"margin:0px;padding:0px;border:0px;outline:0px;vertical-align:ba=
seline;background:rgb(255,255,255);font-family:proxima-nova-zendesk,system-=
ui,-apple-system,system-ui,&quot;Segoe UI&quot;,Roboto,Oxygen-Sans,Ubuntu,C=
antarell,&quot;Helvetica Neue&quot;,Arial,sans-serif;color:rgb(85,85,85)"><=
span style=3D"margin:0px;padding:0px;border:0px;outline:0px;vertical-align:=
baseline;background:transparent;font-family:proxima-nova-zendesk,system-ui,=
-apple-system,BlinkMacSystemFont,&quot;Segoe UI&quot;,Roboto,Oxygen-Sans,Ub=
untu,Cantarell,&quot;Helvetica Neue&quot;,Arial,sans-serif;font-weight:600"=
><font size=3D"2">CONFIDENTIALITY NOTICE: This email may contain confidenti=
al and privileged material for the sole use of the intended recipient(s). A=
ny review, use, distribution or disclosure by others is strictly prohibited=
.=C2=A0 If you have received this communication in error, please notify the=
 sender immediately by e-mail and delete the message and any file attachmen=
ts from your computer. Thank you.</font></span></i>
--f40304361ef4be0b9d05555109bf--


From nobody Thu Jul 27 12:31:06 2017
Return-Path: <nmccallu@redhat.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 05AC8132184 for <jose@ietfa.amsl.com>; Thu, 27 Jul 2017 12:31:00 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.419
X-Spam-Level: 
X-Spam-Status: No, score=-1.419 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HK_RANDOM_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_SORBS_SPAM=0.5, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=no autolearn_force=no
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 XWH-TPx7xEWk for <jose@ietfa.amsl.com>; Thu, 27 Jul 2017 12:30:58 -0700 (PDT)
Received: from mail-it0-f51.google.com (mail-it0-f51.google.com [209.85.214.51]) (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 E15BD129562 for <jose@ietf.org>; Thu, 27 Jul 2017 12:30:57 -0700 (PDT)
Received: by mail-it0-f51.google.com with SMTP id h199so87600327ith.0 for <jose@ietf.org>; Thu, 27 Jul 2017 12:30:57 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=cxqnsmY86lDsmVHlQ4LcmGoFHKwPin2R2bfMlQxKjVE=; b=q7/BSUxd611dR/pdHmRBt25gfnpE+VObB99RKhkUXP2IWTlgssNCvBWVc8h40N95yY +9dqABqaTOiRdrHBUFyOLXyNLRESvaw6SDT9FiGVgSOagb3DWj2ow9BoNvYmQpQj7luC mzhgUUL3HfU8lrcHf1+Xgvzy7hLhfC1lFeBrAJtTmIvBhpEDmYNqlas0VETwh1aRbtnK VsEhAC1Z1ez7ERcpQcRkkQcp8Xm3Lu3cgza6GAO+o0kFVxXZx7g7CLcbCUBOcdf0j83W RygGau4Q8kwi1gGaQ/C+LvfQ1zgUAAKfvmfENBi8FCtPr34yEZ9GmoF1HA5vOapihKhf rRRA==
X-Gm-Message-State: AIVw111tHH+afK8r3y9WEH5jEOqkuY6c0EJ8k1yupusHhmEgFiSwKHvN dSQVMBa2Vk9678yZH3a4niSz+5rKka+a
X-Received: by 10.36.185.14 with SMTP id w14mr6557593ite.76.1501183857107; Thu, 27 Jul 2017 12:30:57 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.107.21.6 with HTTP; Thu, 27 Jul 2017 12:30:56 -0700 (PDT)
In-Reply-To: <CA+k3eCRT_iuLHYrLxz+tf1MT9L9XG2jV0D0anC0h5w7A_ujEdQ@mail.gmail.com>
References: <CA+k3eCRT_iuLHYrLxz+tf1MT9L9XG2jV0D0anC0h5w7A_ujEdQ@mail.gmail.com>
From: Nathaniel McCallum <npmccallum@redhat.com>
Date: Thu, 27 Jul 2017 15:30:56 -0400
Message-ID: <CAOASepOjYBYoKYEVvCLMzZgsdyGhr2LOB-dNqekxsKFm_gxixg@mail.gmail.com>
To: Brian Campbell <bcampbell@pingidentity.com>
Cc: oauth <oauth@ietf.org>, "jose@ietf.org" <jose@ietf.org>
Content-Type: text/plain; charset="UTF-8"
Archived-At: <https://mailarchive.ietf.org/arch/msg/jose/LrsKzErtCieGDTu2o8Ty_WeBaik>
Subject: Re: [jose] preventing confusion of one kind of JWT for another in JWT BCP
X-BeenThere: jose@ietf.org
X-Mailman-Version: 2.1.22
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: Thu, 27 Jul 2017 19:31:00 -0000

What class of attacks is this trying to prevent? I frankly don't see a
problem with confusing different types of JWT. But I may just be
ignorant.

On Thu, Jul 27, 2017 at 2:49 PM, Brian Campbell
<bcampbell@pingidentity.com> wrote:
> During the first WG meeting last week I asked if use of the JOSE "crit"
> (Critical) Header Parameter had been considered as a recommendation for
> preventing confusion of one kind of JWT for another. Time was running short
> in the meeting so there wasn't much discussion and it was requested that I
> take the question to the list. And so here on the list is that.
>
> Section 3.9 of the JWT BCP draft now recommends explicit typing using the
> "typ" JWS/JWE header parameter but does concede that 'the use of explicit
> typing may not achieve disambiguation from existing kinds of JWTs, as the
> validation rules for existing kinds JWTs often do not use the "typ" header
> parameter value.'  And the recommendations for how to use the Type Header
> Parameter in JWT strongly suggest that it's not currently being used for any
> validation.
>
> Alternatively using the JWS/JWE "crit" (Critical) Header Parameter to signal
> the type/intent/profile/application of a JWT could achieve disambiguation
> even in validation of existing kinds of JWTs. The critical header lists
> other headers which must be understood and processed by the receiver and
> that the JWS/JWE is invalid if those listed aren't understood. So a new
> type/profile of JWT that uses the "crit" header would produce JWTs that
> would be rejected even by existing applications of JWT validation (that
> actually implement "crit" properly anyway).
>
> The JWT BCP could suggest the use of "crit" in conjunction with a
> profile/application/type specific header. Or it could provide a bit more of
> a framework like defining a registering a new JOSE header "p" (strawman of p
> as a very short name for profile) and create a registry for its values. A
> JWT header using that approach might look like the following where the value
> 1 is registered as some cool new JWT profile/application. The consumer of
> such a JWT would have to understand and process the "p" header, which would
> mean checking that it had the value expected.
>
>      {
>       "alg":"ES256",
>       "crit":["p"],
>       "p":1
>      }
>
> A JOSE compliant JWT validator would reject such a JWT even for an OAuth
> access token or OIDC id_token because the "p" header isn't known or
> understood but is marked as critical.
>
> To me, that seems like an approach to preventing confusion that has more
> teeth than the "typ" header. Which is why I asked about it last week and am
> now bringing it to the list.
>
>
>
>
>
>
>
>
>
>
> CONFIDENTIALITY NOTICE: This email may contain confidential and privileged
> material for the sole use of the intended recipient(s). Any review, use,
> distribution or disclosure by others is strictly prohibited.  If you have
> received this communication in error, please notify the sender immediately
> by e-mail and delete the message and any file attachments from your
> computer. Thank you.
> _______________________________________________
> jose mailing list
> jose@ietf.org
> https://www.ietf.org/mailman/listinfo/jose
>


From nobody Thu Jul 27 12:34:57 2017
Return-Path: <bcampbell@pingidentity.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 5C370129B55 for <jose@ietfa.amsl.com>; Thu, 27 Jul 2017 12:34:50 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.999
X-Spam-Level: 
X-Spam-Status: No, score=-1.999 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=unavailable autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=pingidentity.com
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 xWceP1htQRMD for <jose@ietfa.amsl.com>; Thu, 27 Jul 2017 12:34:47 -0700 (PDT)
Received: from mail-pg0-x232.google.com (mail-pg0-x232.google.com [IPv6:2607:f8b0:400e:c05::232]) (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 164F81287A5 for <jose@ietf.org>; Thu, 27 Jul 2017 12:34:47 -0700 (PDT)
Received: by mail-pg0-x232.google.com with SMTP id y129so101734178pgy.4 for <jose@ietf.org>; Thu, 27 Jul 2017 12:34:47 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pingidentity.com; s=gmail; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=lnhRzdoimbqhOwwyNhZHA9pWM1yyLBI7aSS1N48vdoY=; b=SelcqJ/rTLxB02yXyhD8ixVLZeuY+kwHNwzU0wSAadpRotn1sPizESw4vv8SexVW1P Lced2VBHl6C26O2UjO7UpI8WfPSPOy/KYRmUCGOkprq5mViwJJ4BAtodOKIBfVCqVZFY THRQm9L65GUIWQbhrENEZJk5jeWyWABD/iwJo=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=lnhRzdoimbqhOwwyNhZHA9pWM1yyLBI7aSS1N48vdoY=; b=d5sDEvdAL++KxJByNiZ2DBhEBghPUxLkjhK61hpofQDDSyUeJhNICInNZeU/J4jW7x mdQIRG6Mpo6hV/keQehpcFXPGpzONYF3OLsSG5Ks3mknS72n/5KjGtEb7Udlwra+QFRm dVXHI0A+p+fmW1DKX93AEZhkmHK2N8sz1oYqHZCVOFSZo3H0VERJd7LNFhiaSO5lUn4f cEPgnJBK1oGpZHgfJg3Vj2LUpG8rD19zkQPhi05sNClO88hXpa8nMJTsYFIWxgCf9HSu o9/dbcUWDCp67OX8Tu6gVttPZk7G7EwZkqk8fyDQd5uazNRrkxgn06QJTwAJ+zccn+MC CNxA==
X-Gm-Message-State: AIVw110ujYrtYlNjFY+pm8v4e3qiFJBzEHnMFuWBrCNKTL8NEngX8Ud8 yV0HTIWiPvQPL6nkT4WtTXlRzFt2vDU6HlRJDvkhbJH7k7LgsD14vOlrOryayxqjWTFaFLpu3w+ LM3I=
X-Received: by 10.84.212.1 with SMTP id d1mr5579071pli.17.1501184086633; Thu, 27 Jul 2017 12:34:46 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.100.145.87 with HTTP; Thu, 27 Jul 2017 12:34:16 -0700 (PDT)
In-Reply-To: <CAOASepOjYBYoKYEVvCLMzZgsdyGhr2LOB-dNqekxsKFm_gxixg@mail.gmail.com>
References: <CA+k3eCRT_iuLHYrLxz+tf1MT9L9XG2jV0D0anC0h5w7A_ujEdQ@mail.gmail.com> <CAOASepOjYBYoKYEVvCLMzZgsdyGhr2LOB-dNqekxsKFm_gxixg@mail.gmail.com>
From: Brian Campbell <bcampbell@pingidentity.com>
Date: Thu, 27 Jul 2017 13:34:16 -0600
Message-ID: <CA+k3eCS-Va2AvzRhWia_ETqSDYUMBOoi=sY3jg7TbJFhhuVnZA@mail.gmail.com>
To: Nathaniel McCallum <npmccallum@redhat.com>
Cc: oauth <oauth@ietf.org>, "jose@ietf.org" <jose@ietf.org>
Content-Type: multipart/alternative; boundary="f403045d1f5e3a0e49055551a86e"
Archived-At: <https://mailarchive.ietf.org/arch/msg/jose/luSNFzi3W0YiSY7jQhLW9BdWmCg>
Subject: Re: [jose] preventing confusion of one kind of JWT for another in JWT BCP
X-BeenThere: jose@ietf.org
X-Mailman-Version: 2.1.22
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: Thu, 27 Jul 2017 19:34:50 -0000

--f403045d1f5e3a0e49055551a86e
Content-Type: text/plain; charset="UTF-8"

The draft describes it in
https://tools.ietf.org/html/draft-sheffer-oauth-jwt-bcp-01#section-2.7

On Thu, Jul 27, 2017 at 1:30 PM, Nathaniel McCallum <npmccallum@redhat.com>
wrote:

> What class of attacks is this trying to prevent? I frankly don't see a
> problem with confusing different types of JWT. But I may just be
> ignorant.
>
> On Thu, Jul 27, 2017 at 2:49 PM, Brian Campbell
> <bcampbell@pingidentity.com> wrote:
> > During the first WG meeting last week I asked if use of the JOSE "crit"
> > (Critical) Header Parameter had been considered as a recommendation for
> > preventing confusion of one kind of JWT for another. Time was running
> short
> > in the meeting so there wasn't much discussion and it was requested that
> I
> > take the question to the list. And so here on the list is that.
> >
> > Section 3.9 of the JWT BCP draft now recommends explicit typing using the
> > "typ" JWS/JWE header parameter but does concede that 'the use of explicit
> > typing may not achieve disambiguation from existing kinds of JWTs, as the
> > validation rules for existing kinds JWTs often do not use the "typ"
> header
> > parameter value.'  And the recommendations for how to use the Type Header
> > Parameter in JWT strongly suggest that it's not currently being used for
> any
> > validation.
> >
> > Alternatively using the JWS/JWE "crit" (Critical) Header Parameter to
> signal
> > the type/intent/profile/application of a JWT could achieve
> disambiguation
> > even in validation of existing kinds of JWTs. The critical header lists
> > other headers which must be understood and processed by the receiver and
> > that the JWS/JWE is invalid if those listed aren't understood. So a new
> > type/profile of JWT that uses the "crit" header would produce JWTs that
> > would be rejected even by existing applications of JWT validation (that
> > actually implement "crit" properly anyway).
> >
> > The JWT BCP could suggest the use of "crit" in conjunction with a
> > profile/application/type specific header. Or it could provide a bit more
> of
> > a framework like defining a registering a new JOSE header "p" (strawman
> of p
> > as a very short name for profile) and create a registry for its values. A
> > JWT header using that approach might look like the following where the
> value
> > 1 is registered as some cool new JWT profile/application. The consumer of
> > such a JWT would have to understand and process the "p" header, which
> would
> > mean checking that it had the value expected.
> >
> >      {
> >       "alg":"ES256",
> >       "crit":["p"],
> >       "p":1
> >      }
> >
> > A JOSE compliant JWT validator would reject such a JWT even for an OAuth
> > access token or OIDC id_token because the "p" header isn't known or
> > understood but is marked as critical.
> >
> > To me, that seems like an approach to preventing confusion that has more
> > teeth than the "typ" header. Which is why I asked about it last week and
> am
> > now bringing it to the list.
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > CONFIDENTIALITY NOTICE: This email may contain confidential and
> privileged
> > material for the sole use of the intended recipient(s). Any review, use,
> > distribution or disclosure by others is strictly prohibited.  If you have
> > received this communication in error, please notify the sender
> immediately
> > by e-mail and delete the message and any file attachments from your
> > computer. Thank you.
> > _______________________________________________
> > jose mailing list
> > jose@ietf.org
> > https://www.ietf.org/mailman/listinfo/jose
> >
>

-- 
*CONFIDENTIALITY NOTICE: This email may contain confidential and privileged 
material for the sole use of the intended recipient(s). Any review, use, 
distribution or disclosure by others is strictly prohibited.  If you have 
received this communication in error, please notify the sender immediately 
by e-mail and delete the message and any file attachments from your 
computer. Thank you.*

--f403045d1f5e3a0e49055551a86e
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">The draft describes it in <a href=3D"https://tools.ietf.or=
g/html/draft-sheffer-oauth-jwt-bcp-01#section-2.7">https://tools.ietf.org/h=
tml/draft-sheffer-oauth-jwt-bcp-01#section-2.7</a> <br></div><div class=3D"=
gmail_extra"><br><div class=3D"gmail_quote">On Thu, Jul 27, 2017 at 1:30 PM=
, Nathaniel McCallum <span dir=3D"ltr">&lt;<a href=3D"mailto:npmccallum@red=
hat.com" target=3D"_blank">npmccallum@redhat.com</a>&gt;</span> wrote:<br><=
blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px=
 #ccc solid;padding-left:1ex">What class of attacks is this trying to preve=
nt? I frankly don&#39;t see a<br>
problem with confusing different types of JWT. But I may just be<br>
ignorant.<br>
<div><div class=3D"h5"><br>
On Thu, Jul 27, 2017 at 2:49 PM, Brian Campbell<br>
&lt;<a href=3D"mailto:bcampbell@pingidentity.com">bcampbell@pingidentity.co=
m</a>&gt; wrote:<br>
&gt; During the first WG meeting last week I asked if use of the JOSE &quot=
;crit&quot;<br>
&gt; (Critical) Header Parameter had been considered as a recommendation fo=
r<br>
&gt; preventing confusion of one kind of JWT for another. Time was running =
short<br>
&gt; in the meeting so there wasn&#39;t much discussion and it was requeste=
d that I<br>
&gt; take the question to the list. And so here on the list is that.<br>
&gt;<br>
&gt; Section 3.9 of the JWT BCP draft now recommends explicit typing using =
the<br>
&gt; &quot;typ&quot; JWS/JWE header parameter but does concede that &#39;th=
e use of explicit<br>
&gt; typing may not achieve disambiguation from existing kinds of JWTs, as =
the<br>
&gt; validation rules for existing kinds JWTs often do not use the &quot;ty=
p&quot; header<br>
&gt; parameter value.&#39;=C2=A0 And the recommendations for how to use the=
 Type Header<br>
&gt; Parameter in JWT strongly suggest that it&#39;s not currently being us=
ed for any<br>
&gt; validation.<br>
&gt;<br>
&gt; Alternatively using the JWS/JWE &quot;crit&quot; (Critical) Header Par=
ameter to signal<br>
&gt; the type/intent/profile/<wbr>application of a JWT could achieve disamb=
iguation<br>
&gt; even in validation of existing kinds of JWTs. The critical header list=
s<br>
&gt; other headers which must be understood and processed by the receiver a=
nd<br>
&gt; that the JWS/JWE is invalid if those listed aren&#39;t understood. So =
a new<br>
&gt; type/profile of JWT that uses the &quot;crit&quot; header would produc=
e JWTs that<br>
&gt; would be rejected even by existing applications of JWT validation (tha=
t<br>
&gt; actually implement &quot;crit&quot; properly anyway).<br>
&gt;<br>
&gt; The JWT BCP could suggest the use of &quot;crit&quot; in conjunction w=
ith a<br>
&gt; profile/application/type specific header. Or it could provide a bit mo=
re of<br>
&gt; a framework like defining a registering a new JOSE header &quot;p&quot=
; (strawman of p<br>
&gt; as a very short name for profile) and create a registry for its values=
. A<br>
&gt; JWT header using that approach might look like the following where the=
 value<br>
&gt; 1 is registered as some cool new JWT profile/application. The consumer=
 of<br>
&gt; such a JWT would have to understand and process the &quot;p&quot; head=
er, which would<br>
&gt; mean checking that it had the value expected.<br>
&gt;<br>
&gt;=C2=A0 =C2=A0 =C2=A0 {<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0&quot;alg&quot;:&quot;ES256&quot;,<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0&quot;crit&quot;:[&quot;p&quot;],<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0&quot;p&quot;:1<br>
&gt;=C2=A0 =C2=A0 =C2=A0 }<br>
&gt;<br>
&gt; A JOSE compliant JWT validator would reject such a JWT even for an OAu=
th<br>
&gt; access token or OIDC id_token because the &quot;p&quot; header isn&#39=
;t known or<br>
&gt; understood but is marked as critical.<br>
&gt;<br>
&gt; To me, that seems like an approach to preventing confusion that has mo=
re<br>
&gt; teeth than the &quot;typ&quot; header. Which is why I asked about it l=
ast week and am<br>
&gt; now bringing it to the list.<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
</div></div>&gt; CONFIDENTIALITY NOTICE: This email may contain confidentia=
l and privileged<br>
&gt; material for the sole use of the intended recipient(s). Any review, us=
e,<br>
&gt; distribution or disclosure by others is strictly prohibited.=C2=A0 If =
you have<br>
&gt; received this communication in error, please notify the sender immedia=
tely<br>
&gt; by e-mail and delete the message and any file attachments from your<br=
>
&gt; computer. Thank you.<br>
&gt; ______________________________<wbr>_________________<br>
&gt; jose mailing list<br>
&gt; <a href=3D"mailto:jose@ietf.org">jose@ietf.org</a><br>
&gt; <a href=3D"https://www.ietf.org/mailman/listinfo/jose" rel=3D"noreferr=
er" target=3D"_blank">https://www.ietf.org/mailman/<wbr>listinfo/jose</a><b=
r>
&gt;<br>
</blockquote></div><br></div>

<br>
<i style=3D"margin:0px;padding:0px;border:0px;outline:0px;vertical-align:ba=
seline;background:rgb(255,255,255);font-family:proxima-nova-zendesk,system-=
ui,-apple-system,system-ui,&quot;Segoe UI&quot;,Roboto,Oxygen-Sans,Ubuntu,C=
antarell,&quot;Helvetica Neue&quot;,Arial,sans-serif;color:rgb(85,85,85)"><=
span style=3D"margin:0px;padding:0px;border:0px;outline:0px;vertical-align:=
baseline;background:transparent;font-family:proxima-nova-zendesk,system-ui,=
-apple-system,BlinkMacSystemFont,&quot;Segoe UI&quot;,Roboto,Oxygen-Sans,Ub=
untu,Cantarell,&quot;Helvetica Neue&quot;,Arial,sans-serif;font-weight:600"=
><font size=3D"2">CONFIDENTIALITY NOTICE: This email may contain confidenti=
al and privileged material for the sole use of the intended recipient(s). A=
ny review, use, distribution or disclosure by others is strictly prohibited=
.=C2=A0 If you have received this communication in error, please notify the=
 sender immediately by e-mail and delete the message and any file attachmen=
ts from your computer. Thank you.</font></span></i>
--f403045d1f5e3a0e49055551a86e--


From nobody Thu Jul 27 14:00:15 2017
Return-Path: <nmccallu@redhat.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 6E9891321B1 for <jose@ietfa.amsl.com>; Thu, 27 Jul 2017 14:00:09 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.119
X-Spam-Level: 
X-Spam-Status: No, score=-2.119 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HK_RANDOM_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_SORBS_SPAM=0.5, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
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 ONJkeyEvcVHJ for <jose@ietfa.amsl.com>; Thu, 27 Jul 2017 14:00:07 -0700 (PDT)
Received: from mail-it0-f54.google.com (mail-it0-f54.google.com [209.85.214.54]) (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 EF220129B10 for <jose@ietf.org>; Thu, 27 Jul 2017 14:00:06 -0700 (PDT)
Received: by mail-it0-f54.google.com with SMTP id v127so3368181itd.0 for <jose@ietf.org>; Thu, 27 Jul 2017 14:00:06 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=XxgZ/BpiJRPSmPuIyBMEikiwlmKnTswyKvdgDeqRxmg=; b=U8N9+tkSkybuRc6QX2dQY7wmPbHnNyxXPC3gWXT5mo++2xR85FFeUbekovHpt1AV4/ 8uKvB32leCNqJ/KuaYtpzODLlQkZLfFOHuDJVyAhyKudox9bjayR7CVCuy5bCcxbSehY J6nGogaknGCYj9HLZNDLAe2JZRmVqhKVMPynolfS3flRQjZg9wznFfQTaIZXb9jnpbLz 4XiAtmgU9zAnwKar67+puyC+GQJObUtoQp8bqrCPtFJK4Sl1SpKH1/InODWiJMuf7ALJ ZB6pJUCG6835hpTb/TgW0cZXQmjv7ZpaD5TEcjf0gIdEJx/Bx5RFydnCnNc+r1ivIeoM QxzA==
X-Gm-Message-State: AIVw113EQzwZ3wQfj/dCmq4g85/ukifNa7153q/N9WGOM+AboOjI8rSd 32oeF5ovmB082+4fFlMJi+eiwK3kbhQ4
X-Received: by 10.36.185.14 with SMTP id w14mr6837480ite.76.1501189206161; Thu, 27 Jul 2017 14:00:06 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.107.21.6 with HTTP; Thu, 27 Jul 2017 14:00:05 -0700 (PDT)
In-Reply-To: <CA+k3eCS-Va2AvzRhWia_ETqSDYUMBOoi=sY3jg7TbJFhhuVnZA@mail.gmail.com>
References: <CA+k3eCRT_iuLHYrLxz+tf1MT9L9XG2jV0D0anC0h5w7A_ujEdQ@mail.gmail.com> <CAOASepOjYBYoKYEVvCLMzZgsdyGhr2LOB-dNqekxsKFm_gxixg@mail.gmail.com> <CA+k3eCS-Va2AvzRhWia_ETqSDYUMBOoi=sY3jg7TbJFhhuVnZA@mail.gmail.com>
From: Nathaniel McCallum <npmccallum@redhat.com>
Date: Thu, 27 Jul 2017 17:00:05 -0400
Message-ID: <CAOASepMaeS8WrCMb+WHV0FC2_w3f0KnY5XuDsuWJhAW2ayfryQ@mail.gmail.com>
To: Brian Campbell <bcampbell@pingidentity.com>
Cc: oauth <oauth@ietf.org>, "jose@ietf.org" <jose@ietf.org>
Content-Type: text/plain; charset="UTF-8"
Archived-At: <https://mailarchive.ietf.org/arch/msg/jose/bhriDz5kCE6v0Nxfnw1b2XvhLtY>
Subject: Re: [jose] preventing confusion of one kind of JWT for another in JWT BCP
X-BeenThere: jose@ietf.org
X-Mailman-Version: 2.1.22
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: Thu, 27 Jul 2017 21:00:09 -0000

Even after reading the whole section, I still don't understand the
problem. Yes, a class of attack could exist where an attacker
substitutes a valid JWT from one security context into another
context. But isn't this resolved by audience validation?

On Thu, Jul 27, 2017 at 3:34 PM, Brian Campbell
<bcampbell@pingidentity.com> wrote:
> The draft describes it in
> https://tools.ietf.org/html/draft-sheffer-oauth-jwt-bcp-01#section-2.7
>
> On Thu, Jul 27, 2017 at 1:30 PM, Nathaniel McCallum <npmccallum@redhat.com>
> wrote:
>>
>> What class of attacks is this trying to prevent? I frankly don't see a
>> problem with confusing different types of JWT. But I may just be
>> ignorant.
>>
>> On Thu, Jul 27, 2017 at 2:49 PM, Brian Campbell
>> <bcampbell@pingidentity.com> wrote:
>> > During the first WG meeting last week I asked if use of the JOSE "crit"
>> > (Critical) Header Parameter had been considered as a recommendation for
>> > preventing confusion of one kind of JWT for another. Time was running
>> > short
>> > in the meeting so there wasn't much discussion and it was requested that
>> > I
>> > take the question to the list. And so here on the list is that.
>> >
>> > Section 3.9 of the JWT BCP draft now recommends explicit typing using
>> > the
>> > "typ" JWS/JWE header parameter but does concede that 'the use of
>> > explicit
>> > typing may not achieve disambiguation from existing kinds of JWTs, as
>> > the
>> > validation rules for existing kinds JWTs often do not use the "typ"
>> > header
>> > parameter value.'  And the recommendations for how to use the Type
>> > Header
>> > Parameter in JWT strongly suggest that it's not currently being used for
>> > any
>> > validation.
>> >
>> > Alternatively using the JWS/JWE "crit" (Critical) Header Parameter to
>> > signal
>> > the type/intent/profile/application of a JWT could achieve
>> > disambiguation
>> > even in validation of existing kinds of JWTs. The critical header lists
>> > other headers which must be understood and processed by the receiver and
>> > that the JWS/JWE is invalid if those listed aren't understood. So a new
>> > type/profile of JWT that uses the "crit" header would produce JWTs that
>> > would be rejected even by existing applications of JWT validation (that
>> > actually implement "crit" properly anyway).
>> >
>> > The JWT BCP could suggest the use of "crit" in conjunction with a
>> > profile/application/type specific header. Or it could provide a bit more
>> > of
>> > a framework like defining a registering a new JOSE header "p" (strawman
>> > of p
>> > as a very short name for profile) and create a registry for its values.
>> > A
>> > JWT header using that approach might look like the following where the
>> > value
>> > 1 is registered as some cool new JWT profile/application. The consumer
>> > of
>> > such a JWT would have to understand and process the "p" header, which
>> > would
>> > mean checking that it had the value expected.
>> >
>> >      {
>> >       "alg":"ES256",
>> >       "crit":["p"],
>> >       "p":1
>> >      }
>> >
>> > A JOSE compliant JWT validator would reject such a JWT even for an OAuth
>> > access token or OIDC id_token because the "p" header isn't known or
>> > understood but is marked as critical.
>> >
>> > To me, that seems like an approach to preventing confusion that has more
>> > teeth than the "typ" header. Which is why I asked about it last week and
>> > am
>> > now bringing it to the list.
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>> > CONFIDENTIALITY NOTICE: This email may contain confidential and
>> > privileged
>> > material for the sole use of the intended recipient(s). Any review, use,
>> > distribution or disclosure by others is strictly prohibited.  If you
>> > have
>> > received this communication in error, please notify the sender
>> > immediately
>> > by e-mail and delete the message and any file attachments from your
>> > computer. Thank you.
>> > _______________________________________________
>> > jose mailing list
>> > jose@ietf.org
>> > https://www.ietf.org/mailman/listinfo/jose
>> >
>
>
>
> CONFIDENTIALITY NOTICE: This email may contain confidential and privileged
> material for the sole use of the intended recipient(s). Any review, use,
> distribution or disclosure by others is strictly prohibited.  If you have
> received this communication in error, please notify the sender immediately
> by e-mail and delete the message and any file attachments from your
> computer. Thank you.


From nobody Thu Jul 27 14:18:00 2017
Return-Path: <dick.hardt@gmail.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 AE402131761; Thu, 27 Jul 2017 14:17:51 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.698
X-Spam-Level: 
X-Spam-Status: No, score=-2.698 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, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com
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 2H8r98A1ZnkI; Thu, 27 Jul 2017 14:17:49 -0700 (PDT)
Received: from mail-qk0-x233.google.com (mail-qk0-x233.google.com [IPv6:2607:f8b0:400d:c09::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 BBE3C131563; Thu, 27 Jul 2017 14:17:48 -0700 (PDT)
Received: by mail-qk0-x233.google.com with SMTP id d136so113996717qkg.3; Thu, 27 Jul 2017 14:17:48 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;  h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=tIaTRg+C0wRkbJieUt6+8XLmpSZ0zuWe1rm8LIj9dOg=; b=YUh0/Sbs/PO/kjA1eaoQm7tUnJLTN3No2dRiAIZv2RwbS3NfJNtzGPFOhqmPBBRNJH ujjHfZH6iBV87QVHM+HzPUKR0UVDomY+J1d3C7vPsRFLU/LYjgPB6Q/67RJANk5funrQ s2Mbd0VUAlix4RKefe5JcVSrqdARqLCzhcda9IDxD8jYLNDq3UL01o4VrXqVyZ+5tKKf DM4qsFOVm1mQ3ppwK9jzefT8/dwy8hUqJlVXL89cZCyzFaqTcPCzsbYHuuz5rCdYx51u rI6tLwekk6uI55r4Vc2EowOrv/qeeaBpRoh9j96T38wLqymzb9pJB6Ff4zcRS/0mWW0D T8wQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=tIaTRg+C0wRkbJieUt6+8XLmpSZ0zuWe1rm8LIj9dOg=; b=Tc2RNUuXgpZ+ImtGqqMmyk+CFM+99pLOa4BXKr3NXmXQlAbL8hGIuthbn3k5+iibYH i3R5m6juv9eC+hSnofKGfLBJ5IFOygX7GPFwktwVSM/K9nKQSPkS05nBOWb+NogzGucu 96/wqTHyXZWsqHZCdT6BD3HE1dJQ1BqWnqbn6ram6QD52/Z14qAH47E008PNmdQM4L2L +mLYgaYTmiYhKGCS5hXsDjqsPb9p6UNCZ2CWhanV7IijvTL4i70bvqgshUcXM9/rsc/5 qPwYrYd3Jr9TMRqDzkfX/ul+YKpheS5+gWWNQ3r50oYqYg8kTaLQY0tibS4eEsJhW57t dwxQ==
X-Gm-Message-State: AIVw112AY77cZWoJboJFCrcmbFuFF4rOP4EAU73tM5Fe0RRj2SavCYoU uuOgx2sjUisUEZV3blXyOp4m1oRpCQ==
X-Received: by 10.55.124.67 with SMTP id x64mr7710969qkc.98.1501190267828; Thu, 27 Jul 2017 14:17:47 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.140.104.131 with HTTP; Thu, 27 Jul 2017 14:17:27 -0700 (PDT)
In-Reply-To: <CAOASepMaeS8WrCMb+WHV0FC2_w3f0KnY5XuDsuWJhAW2ayfryQ@mail.gmail.com>
References: <CA+k3eCRT_iuLHYrLxz+tf1MT9L9XG2jV0D0anC0h5w7A_ujEdQ@mail.gmail.com> <CAOASepOjYBYoKYEVvCLMzZgsdyGhr2LOB-dNqekxsKFm_gxixg@mail.gmail.com> <CA+k3eCS-Va2AvzRhWia_ETqSDYUMBOoi=sY3jg7TbJFhhuVnZA@mail.gmail.com> <CAOASepMaeS8WrCMb+WHV0FC2_w3f0KnY5XuDsuWJhAW2ayfryQ@mail.gmail.com>
From: Dick Hardt <dick.hardt@gmail.com>
Date: Thu, 27 Jul 2017 22:17:27 +0100
Message-ID: <CAD9ie-upQ8GYumi6NTGELQoc4s=7AWkZj3rk-iaeiPZOnpYBbQ@mail.gmail.com>
To: Nathaniel McCallum <npmccallum@redhat.com>
Cc: Brian Campbell <bcampbell@pingidentity.com>, oauth <oauth@ietf.org>,  "jose@ietf.org" <jose@ietf.org>
Content-Type: multipart/alternative; boundary="94eb2c062748a7852e0555531832"
Archived-At: <https://mailarchive.ietf.org/arch/msg/jose/ngtgxDHU_5cgL2b6n5W4TQ0ykpw>
Subject: Re: [jose] [OAUTH-WG] preventing confusion of one kind of JWT for another in JWT BCP
X-BeenThere: jose@ietf.org
X-Mailman-Version: 2.1.22
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: Thu, 27 Jul 2017 21:17:51 -0000

--94eb2c062748a7852e0555531832
Content-Type: text/plain; charset="UTF-8"

Only if the audience is different.

On Thu, Jul 27, 2017 at 10:00 PM, Nathaniel McCallum <npmccallum@redhat.com>
wrote:

> Even after reading the whole section, I still don't understand the
> problem. Yes, a class of attack could exist where an attacker
> substitutes a valid JWT from one security context into another
> context. But isn't this resolved by audience validation?
>
> On Thu, Jul 27, 2017 at 3:34 PM, Brian Campbell
> <bcampbell@pingidentity.com> wrote:
> > The draft describes it in
> > https://tools.ietf.org/html/draft-sheffer-oauth-jwt-bcp-01#section-2.7
> >
> > On Thu, Jul 27, 2017 at 1:30 PM, Nathaniel McCallum <
> npmccallum@redhat.com>
> > wrote:
> >>
> >> What class of attacks is this trying to prevent? I frankly don't see a
> >> problem with confusing different types of JWT. But I may just be
> >> ignorant.
> >>
> >> On Thu, Jul 27, 2017 at 2:49 PM, Brian Campbell
> >> <bcampbell@pingidentity.com> wrote:
> >> > During the first WG meeting last week I asked if use of the JOSE
> "crit"
> >> > (Critical) Header Parameter had been considered as a recommendation
> for
> >> > preventing confusion of one kind of JWT for another. Time was running
> >> > short
> >> > in the meeting so there wasn't much discussion and it was requested
> that
> >> > I
> >> > take the question to the list. And so here on the list is that.
> >> >
> >> > Section 3.9 of the JWT BCP draft now recommends explicit typing using
> >> > the
> >> > "typ" JWS/JWE header parameter but does concede that 'the use of
> >> > explicit
> >> > typing may not achieve disambiguation from existing kinds of JWTs, as
> >> > the
> >> > validation rules for existing kinds JWTs often do not use the "typ"
> >> > header
> >> > parameter value.'  And the recommendations for how to use the Type
> >> > Header
> >> > Parameter in JWT strongly suggest that it's not currently being used
> for
> >> > any
> >> > validation.
> >> >
> >> > Alternatively using the JWS/JWE "crit" (Critical) Header Parameter to
> >> > signal
> >> > the type/intent/profile/application of a JWT could achieve
> >> > disambiguation
> >> > even in validation of existing kinds of JWTs. The critical header
> lists
> >> > other headers which must be understood and processed by the receiver
> and
> >> > that the JWS/JWE is invalid if those listed aren't understood. So a
> new
> >> > type/profile of JWT that uses the "crit" header would produce JWTs
> that
> >> > would be rejected even by existing applications of JWT validation
> (that
> >> > actually implement "crit" properly anyway).
> >> >
> >> > The JWT BCP could suggest the use of "crit" in conjunction with a
> >> > profile/application/type specific header. Or it could provide a bit
> more
> >> > of
> >> > a framework like defining a registering a new JOSE header "p"
> (strawman
> >> > of p
> >> > as a very short name for profile) and create a registry for its
> values.
> >> > A
> >> > JWT header using that approach might look like the following where the
> >> > value
> >> > 1 is registered as some cool new JWT profile/application. The consumer
> >> > of
> >> > such a JWT would have to understand and process the "p" header, which
> >> > would
> >> > mean checking that it had the value expected.
> >> >
> >> >      {
> >> >       "alg":"ES256",
> >> >       "crit":["p"],
> >> >       "p":1
> >> >      }
> >> >
> >> > A JOSE compliant JWT validator would reject such a JWT even for an
> OAuth
> >> > access token or OIDC id_token because the "p" header isn't known or
> >> > understood but is marked as critical.
> >> >
> >> > To me, that seems like an approach to preventing confusion that has
> more
> >> > teeth than the "typ" header. Which is why I asked about it last week
> and
> >> > am
> >> > now bringing it to the list.
> >> >
> >> >
> >> >
> >> >
> >> >
> >> >
> >> >
> >> >
> >> >
> >> >
> >> > CONFIDENTIALITY NOTICE: This email may contain confidential and
> >> > privileged
> >> > material for the sole use of the intended recipient(s). Any review,
> use,
> >> > distribution or disclosure by others is strictly prohibited.  If you
> >> > have
> >> > received this communication in error, please notify the sender
> >> > immediately
> >> > by e-mail and delete the message and any file attachments from your
> >> > computer. Thank you.
> >> > _______________________________________________
> >> > jose mailing list
> >> > jose@ietf.org
> >> > https://www.ietf.org/mailman/listinfo/jose
> >> >
> >
> >
> >
> > CONFIDENTIALITY NOTICE: This email may contain confidential and
> privileged
> > material for the sole use of the intended recipient(s). Any review, use,
> > distribution or disclosure by others is strictly prohibited.  If you have
> > received this communication in error, please notify the sender
> immediately
> > by e-mail and delete the message and any file attachments from your
> > computer. Thank you.
>
> _______________________________________________
> OAuth mailing list
> OAuth@ietf.org
> https://www.ietf.org/mailman/listinfo/oauth
>



-- 
Subscribe to the HARDTWARE <http://hardtware.com/> mail list to learn about
projects I am working on!

--94eb2c062748a7852e0555531832
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Only if the audience is different.=C2=A0</div><div class=
=3D"gmail_extra"><br><div class=3D"gmail_quote">On Thu, Jul 27, 2017 at 10:=
00 PM, Nathaniel McCallum <span dir=3D"ltr">&lt;<a href=3D"mailto:npmccallu=
m@redhat.com" target=3D"_blank">npmccallum@redhat.com</a>&gt;</span> wrote:=
<br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-lef=
t:1px #ccc solid;padding-left:1ex">Even after reading the whole section, I =
still don&#39;t understand the<br>
problem. Yes, a class of attack could exist where an attacker<br>
substitutes a valid JWT from one security context into another<br>
context. But isn&#39;t this resolved by audience validation?<br>
<br>
On Thu, Jul 27, 2017 at 3:34 PM, Brian Campbell<br>
<div class=3D"HOEnZb"><div class=3D"h5">&lt;<a href=3D"mailto:bcampbell@pin=
gidentity.com">bcampbell@pingidentity.com</a>&gt; wrote:<br>
&gt; The draft describes it in<br>
&gt; <a href=3D"https://tools.ietf.org/html/draft-sheffer-oauth-jwt-bcp-01#=
section-2.7" rel=3D"noreferrer" target=3D"_blank">https://tools.ietf.org/ht=
ml/<wbr>draft-sheffer-oauth-jwt-bcp-<wbr>01#section-2.7</a><br>
&gt;<br>
&gt; On Thu, Jul 27, 2017 at 1:30 PM, Nathaniel McCallum &lt;<a href=3D"mai=
lto:npmccallum@redhat.com">npmccallum@redhat.com</a>&gt;<br>
&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt; What class of attacks is this trying to prevent? I frankly don&#39=
;t see a<br>
&gt;&gt; problem with confusing different types of JWT. But I may just be<b=
r>
&gt;&gt; ignorant.<br>
&gt;&gt;<br>
&gt;&gt; On Thu, Jul 27, 2017 at 2:49 PM, Brian Campbell<br>
&gt;&gt; &lt;<a href=3D"mailto:bcampbell@pingidentity.com">bcampbell@pingid=
entity.com</a>&gt; wrote:<br>
&gt;&gt; &gt; During the first WG meeting last week I asked if use of the J=
OSE &quot;crit&quot;<br>
&gt;&gt; &gt; (Critical) Header Parameter had been considered as a recommen=
dation for<br>
&gt;&gt; &gt; preventing confusion of one kind of JWT for another. Time was=
 running<br>
&gt;&gt; &gt; short<br>
&gt;&gt; &gt; in the meeting so there wasn&#39;t much discussion and it was=
 requested that<br>
&gt;&gt; &gt; I<br>
&gt;&gt; &gt; take the question to the list. And so here on the list is tha=
t.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Section 3.9 of the JWT BCP draft now recommends explicit typi=
ng using<br>
&gt;&gt; &gt; the<br>
&gt;&gt; &gt; &quot;typ&quot; JWS/JWE header parameter but does concede tha=
t &#39;the use of<br>
&gt;&gt; &gt; explicit<br>
&gt;&gt; &gt; typing may not achieve disambiguation from existing kinds of =
JWTs, as<br>
&gt;&gt; &gt; the<br>
&gt;&gt; &gt; validation rules for existing kinds JWTs often do not use the=
 &quot;typ&quot;<br>
&gt;&gt; &gt; header<br>
&gt;&gt; &gt; parameter value.&#39;=C2=A0 And the recommendations for how t=
o use the Type<br>
&gt;&gt; &gt; Header<br>
&gt;&gt; &gt; Parameter in JWT strongly suggest that it&#39;s not currently=
 being used for<br>
&gt;&gt; &gt; any<br>
&gt;&gt; &gt; validation.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Alternatively using the JWS/JWE &quot;crit&quot; (Critical) H=
eader Parameter to<br>
&gt;&gt; &gt; signal<br>
&gt;&gt; &gt; the type/intent/profile/<wbr>application of a JWT could achie=
ve<br>
&gt;&gt; &gt; disambiguation<br>
&gt;&gt; &gt; even in validation of existing kinds of JWTs. The critical he=
ader lists<br>
&gt;&gt; &gt; other headers which must be understood and processed by the r=
eceiver and<br>
&gt;&gt; &gt; that the JWS/JWE is invalid if those listed aren&#39;t unders=
tood. So a new<br>
&gt;&gt; &gt; type/profile of JWT that uses the &quot;crit&quot; header wou=
ld produce JWTs that<br>
&gt;&gt; &gt; would be rejected even by existing applications of JWT valida=
tion (that<br>
&gt;&gt; &gt; actually implement &quot;crit&quot; properly anyway).<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; The JWT BCP could suggest the use of &quot;crit&quot; in conj=
unction with a<br>
&gt;&gt; &gt; profile/application/type specific header. Or it could provide=
 a bit more<br>
&gt;&gt; &gt; of<br>
&gt;&gt; &gt; a framework like defining a registering a new JOSE header &qu=
ot;p&quot; (strawman<br>
&gt;&gt; &gt; of p<br>
&gt;&gt; &gt; as a very short name for profile) and create a registry for i=
ts values.<br>
&gt;&gt; &gt; A<br>
&gt;&gt; &gt; JWT header using that approach might look like the following =
where the<br>
&gt;&gt; &gt; value<br>
&gt;&gt; &gt; 1 is registered as some cool new JWT profile/application. The=
 consumer<br>
&gt;&gt; &gt; of<br>
&gt;&gt; &gt; such a JWT would have to understand and process the &quot;p&q=
uot; header, which<br>
&gt;&gt; &gt; would<br>
&gt;&gt; &gt; mean checking that it had the value expected.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;=C2=A0 =C2=A0 =C2=A0 {<br>
&gt;&gt; &gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0&quot;alg&quot;:&quot;ES256&quot;,<=
br>
&gt;&gt; &gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0&quot;crit&quot;:[&quot;p&quot;],<b=
r>
&gt;&gt; &gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0&quot;p&quot;:1<br>
&gt;&gt; &gt;=C2=A0 =C2=A0 =C2=A0 }<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; A JOSE compliant JWT validator would reject such a JWT even f=
or an OAuth<br>
&gt;&gt; &gt; access token or OIDC id_token because the &quot;p&quot; heade=
r isn&#39;t known or<br>
&gt;&gt; &gt; understood but is marked as critical.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; To me, that seems like an approach to preventing confusion th=
at has more<br>
&gt;&gt; &gt; teeth than the &quot;typ&quot; header. Which is why I asked a=
bout it last week and<br>
&gt;&gt; &gt; am<br>
&gt;&gt; &gt; now bringing it to the list.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; CONFIDENTIALITY NOTICE: This email may contain confidential a=
nd<br>
&gt;&gt; &gt; privileged<br>
&gt;&gt; &gt; material for the sole use of the intended recipient(s). Any r=
eview, use,<br>
&gt;&gt; &gt; distribution or disclosure by others is strictly prohibited.=
=C2=A0 If you<br>
&gt;&gt; &gt; have<br>
&gt;&gt; &gt; received this communication in error, please notify the sende=
r<br>
&gt;&gt; &gt; immediately<br>
&gt;&gt; &gt; by e-mail and delete the message and any file attachments fro=
m your<br>
&gt;&gt; &gt; computer. Thank you.<br>
&gt;&gt; &gt; ______________________________<wbr>_________________<br>
&gt;&gt; &gt; jose mailing list<br>
&gt;&gt; &gt; <a href=3D"mailto:jose@ietf.org">jose@ietf.org</a><br>
&gt;&gt; &gt; <a href=3D"https://www.ietf.org/mailman/listinfo/jose" rel=3D=
"noreferrer" target=3D"_blank">https://www.ietf.org/mailman/<wbr>listinfo/j=
ose</a><br>
&gt;&gt; &gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; CONFIDENTIALITY NOTICE: This email may contain confidential and privil=
eged<br>
&gt; material for the sole use of the intended recipient(s). Any review, us=
e,<br>
&gt; distribution or disclosure by others is strictly prohibited.=C2=A0 If =
you have<br>
&gt; received this communication in error, please notify the sender immedia=
tely<br>
&gt; by e-mail and delete the message and any file attachments from your<br=
>
&gt; computer. Thank you.<br>
<br>
</div></div><div class=3D"HOEnZb"><div class=3D"h5">_______________________=
_______<wbr>_________________<br>
OAuth mailing list<br>
<a href=3D"mailto:OAuth@ietf.org">OAuth@ietf.org</a><br>
<a href=3D"https://www.ietf.org/mailman/listinfo/oauth" rel=3D"noreferrer" =
target=3D"_blank">https://www.ietf.org/mailman/<wbr>listinfo/oauth</a><br>
</div></div></blockquote></div><br><br clear=3D"all"><div><br></div>-- <br>=
<div class=3D"gmail_signature" data-smartmail=3D"gmail_signature"><div dir=
=3D"ltr"><div><div dir=3D"ltr"><div dir=3D"ltr"><div>Subscribe to the <a hr=
ef=3D"http://hardtware.com/" target=3D"_blank">HARDTWARE</a> mail list to l=
earn about projects I am working on!</div></div></div></div></div></div>
</div>

--94eb2c062748a7852e0555531832--


From nobody Thu Jul 27 14:20:05 2017
Return-Path: <phil.hunt@oracle.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 67B7C131771; Thu, 27 Jul 2017 14:19:56 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -7
X-Spam-Level: 
X-Spam-Status: No, score=-7 tagged_above=-999 required=5 tests=[BAYES_00=-1.9,  HTML_MESSAGE=0.001, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H2=-2.8,  RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
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 rtR8bQjO1m31; Thu, 27 Jul 2017 14:19:53 -0700 (PDT)
Received: from userp1040.oracle.com (userp1040.oracle.com [156.151.31.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 92431131563; Thu, 27 Jul 2017 14:19:53 -0700 (PDT)
Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id v6RLJpca029999 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 27 Jul 2017 21:19:51 GMT
Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id v6RLJpC1006758 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 27 Jul 2017 21:19:51 GMT
Received: from abhmp0002.oracle.com (abhmp0002.oracle.com [141.146.116.8]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id v6RLJokN002416; Thu, 27 Jul 2017 21:19:50 GMT
Received: from [10.0.1.37] (/24.86.190.97) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 27 Jul 2017 14:19:50 -0700
From: Phil Hunt <phil.hunt@oracle.com>
Message-Id: <91B882A0-48A0-4F08-8ADB-B675D9F1C08F@oracle.com>
Content-Type: multipart/alternative; boundary="Apple-Mail=_0396C5EF-FEE2-483C-BA89-2556CEBF7219"
Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\))
Date: Thu, 27 Jul 2017 14:19:48 -0700
In-Reply-To: <CAOASepMaeS8WrCMb+WHV0FC2_w3f0KnY5XuDsuWJhAW2ayfryQ@mail.gmail.com>
Cc: Brian Campbell <bcampbell@pingidentity.com>, oauth <oauth@ietf.org>, "jose@ietf.org" <jose@ietf.org>
To: Nathaniel McCallum <npmccallum@redhat.com>
References: <CA+k3eCRT_iuLHYrLxz+tf1MT9L9XG2jV0D0anC0h5w7A_ujEdQ@mail.gmail.com> <CAOASepOjYBYoKYEVvCLMzZgsdyGhr2LOB-dNqekxsKFm_gxixg@mail.gmail.com> <CA+k3eCS-Va2AvzRhWia_ETqSDYUMBOoi=sY3jg7TbJFhhuVnZA@mail.gmail.com> <CAOASepMaeS8WrCMb+WHV0FC2_w3f0KnY5XuDsuWJhAW2ayfryQ@mail.gmail.com>
X-Mailer: Apple Mail (2.3273)
X-Source-IP: userv0022.oracle.com [156.151.31.74]
Archived-At: <https://mailarchive.ietf.org/arch/msg/jose/uwBzU_VxEO3yYF8Z9nX5qKS6zzw>
Subject: Re: [jose] preventing confusion of one kind of JWT for another in JWT BCP
X-BeenThere: jose@ietf.org
X-Mailman-Version: 2.1.22
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: Thu, 27 Jul 2017 21:19:56 -0000

--Apple-Mail=_0396C5EF-FEE2-483C-BA89-2556CEBF7219
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=utf-8

We have the use case in SECEVENTS where a logout event (e.g. OIDF =
backchannel logout) is extremely close to an ID_TOKEN.=20

Older relying parties who are do not yet support logout could be tricked =
into accepting a logout assertion as an ID_TOKEN since they are too =
similar, and  because a valid ID_TOKEN parser is in theory allowed to =
ignore claims it does not understand (e.g. =E2=80=9Cevents=E2=80=9D) - =
leading to a possible erroneous acceptance of the logout event AS and =
ID_TOKEN.

Because of this the issue of distinguishing classes or types of JWTs =
emerged.

We discussed a number of differentiators like =E2=80=9Caud=E2=80=9D, =
=E2=80=9Ctyp=E2=80=9D, =E2=80=9Ccrit", etc that would help.  But that =
really lead to the idea there there should be some best practices in the =
JWT BCP covering the issue(s).

Phil

Oracle Corporation, Identity Cloud Services Architect & Standards
@independentid
www.independentid.com =
<http://www.independentid.com/>phil.hunt@oracle.com =
<mailto:phil.hunt@oracle.com>
> On Jul 27, 2017, at 2:00 PM, Nathaniel McCallum =
<npmccallum@redhat.com> wrote:
>=20
> Even after reading the whole section, I still don't understand the
> problem. Yes, a class of attack could exist where an attacker
> substitutes a valid JWT from one security context into another
> context. But isn't this resolved by audience validation?
>=20
> On Thu, Jul 27, 2017 at 3:34 PM, Brian Campbell
> <bcampbell@pingidentity.com> wrote:
>> The draft describes it in
>> =
https://urldefense.proofpoint.com/v2/url?u=3Dhttps-3A__tools.ietf.org_html=
_draft-2Dsheffer-2Doauth-2Djwt-2Dbcp-2D01-23section-2D2.7&d=3DDwICAg&c=3DR=
oP1YumCXCgaWHvlZYR8PQcxBKCX5YTpkKY057SbK10&r=3DJBm5biRrKugCH0FkITSeGJxPEiv=
zjWwlNKe4C_lLIGk&m=3D02yWnzzFGNlefgVregxSncXu0b9sbh5pTrtBfQsC52A&s=3D9GmPC=
ouCMXE4enC48gfq0l0yc7ZlIxvEBAnQCVja_kY&e=3D=20
>>=20
>> On Thu, Jul 27, 2017 at 1:30 PM, Nathaniel McCallum =
<npmccallum@redhat.com>
>> wrote:
>>>=20
>>> What class of attacks is this trying to prevent? I frankly don't see =
a
>>> problem with confusing different types of JWT. But I may just be
>>> ignorant.
>>>=20
>>> On Thu, Jul 27, 2017 at 2:49 PM, Brian Campbell
>>> <bcampbell@pingidentity.com> wrote:
>>>> During the first WG meeting last week I asked if use of the JOSE =
"crit"
>>>> (Critical) Header Parameter had been considered as a recommendation =
for
>>>> preventing confusion of one kind of JWT for another. Time was =
running
>>>> short
>>>> in the meeting so there wasn't much discussion and it was requested =
that
>>>> I
>>>> take the question to the list. And so here on the list is that.
>>>>=20
>>>> Section 3.9 of the JWT BCP draft now recommends explicit typing =
using
>>>> the
>>>> "typ" JWS/JWE header parameter but does concede that 'the use of
>>>> explicit
>>>> typing may not achieve disambiguation from existing kinds of JWTs, =
as
>>>> the
>>>> validation rules for existing kinds JWTs often do not use the "typ"
>>>> header
>>>> parameter value.'  And the recommendations for how to use the Type
>>>> Header
>>>> Parameter in JWT strongly suggest that it's not currently being =
used for
>>>> any
>>>> validation.
>>>>=20
>>>> Alternatively using the JWS/JWE "crit" (Critical) Header Parameter =
to
>>>> signal
>>>> the type/intent/profile/application of a JWT could achieve
>>>> disambiguation
>>>> even in validation of existing kinds of JWTs. The critical header =
lists
>>>> other headers which must be understood and processed by the =
receiver and
>>>> that the JWS/JWE is invalid if those listed aren't understood. So a =
new
>>>> type/profile of JWT that uses the "crit" header would produce JWTs =
that
>>>> would be rejected even by existing applications of JWT validation =
(that
>>>> actually implement "crit" properly anyway).
>>>>=20
>>>> The JWT BCP could suggest the use of "crit" in conjunction with a
>>>> profile/application/type specific header. Or it could provide a bit =
more
>>>> of
>>>> a framework like defining a registering a new JOSE header "p" =
(strawman
>>>> of p
>>>> as a very short name for profile) and create a registry for its =
values.
>>>> A
>>>> JWT header using that approach might look like the following where =
the
>>>> value
>>>> 1 is registered as some cool new JWT profile/application. The =
consumer
>>>> of
>>>> such a JWT would have to understand and process the "p" header, =
which
>>>> would
>>>> mean checking that it had the value expected.
>>>>=20
>>>>     {
>>>>      "alg":"ES256",
>>>>      "crit":["p"],
>>>>      "p":1
>>>>     }
>>>>=20
>>>> A JOSE compliant JWT validator would reject such a JWT even for an =
OAuth
>>>> access token or OIDC id_token because the "p" header isn't known or
>>>> understood but is marked as critical.
>>>>=20
>>>> To me, that seems like an approach to preventing confusion that has =
more
>>>> teeth than the "typ" header. Which is why I asked about it last =
week and
>>>> am
>>>> now bringing it to the list.
>>>>=20
>>>>=20
>>>>=20
>>>>=20
>>>>=20
>>>>=20
>>>>=20
>>>>=20
>>>>=20
>>>>=20
>>>> CONFIDENTIALITY NOTICE: This email may contain confidential and
>>>> privileged
>>>> material for the sole use of the intended recipient(s). Any review, =
use,
>>>> distribution or disclosure by others is strictly prohibited.  If =
you
>>>> have
>>>> received this communication in error, please notify the sender
>>>> immediately
>>>> by e-mail and delete the message and any file attachments from your
>>>> computer. Thank you.
>>>> _______________________________________________
>>>> jose mailing list
>>>> jose@ietf.org
>>>> =
https://urldefense.proofpoint.com/v2/url?u=3Dhttps-3A__www.ietf.org_mailma=
n_listinfo_jose&d=3DDwICAg&c=3DRoP1YumCXCgaWHvlZYR8PQcxBKCX5YTpkKY057SbK10=
&r=3DJBm5biRrKugCH0FkITSeGJxPEivzjWwlNKe4C_lLIGk&m=3D02yWnzzFGNlefgVregxSn=
cXu0b9sbh5pTrtBfQsC52A&s=3DeJ8QZBwe5AO-RDl_E16U1q_KpobaeSRUP4Cp2W-_jJU&e=3D=
=20
>>>>=20
>>=20
>>=20
>>=20
>> CONFIDENTIALITY NOTICE: This email may contain confidential and =
privileged
>> material for the sole use of the intended recipient(s). Any review, =
use,
>> distribution or disclosure by others is strictly prohibited.  If you =
have
>> received this communication in error, please notify the sender =
immediately
>> by e-mail and delete the message and any file attachments from your
>> computer. Thank you.
>=20
> _______________________________________________
> jose mailing list
> jose@ietf.org
> =
https://urldefense.proofpoint.com/v2/url?u=3Dhttps-3A__www.ietf.org_mailma=
n_listinfo_jose&d=3DDwICAg&c=3DRoP1YumCXCgaWHvlZYR8PQcxBKCX5YTpkKY057SbK10=
&r=3DJBm5biRrKugCH0FkITSeGJxPEivzjWwlNKe4C_lLIGk&m=3D02yWnzzFGNlefgVregxSn=
cXu0b9sbh5pTrtBfQsC52A&s=3DeJ8QZBwe5AO-RDl_E16U1q_KpobaeSRUP4Cp2W-_jJU&e=3D=
=20


--Apple-Mail=_0396C5EF-FEE2-483C-BA89-2556CEBF7219
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html;
	charset=utf-8

<html><head><meta http-equiv=3D"Content-Type" content=3D"text/html =
charset=3Dutf-8"></head><body style=3D"word-wrap: break-word; =
-webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" =
class=3D"">We have the use case in SECEVENTS where a logout event (e.g. =
OIDF backchannel logout) is extremely close to an ID_TOKEN.&nbsp;<div =
class=3D""><br class=3D""></div><div class=3D"">Older relying parties =
who are do not yet support logout could be tricked into accepting a =
logout assertion as an ID_TOKEN since they are too similar, and =
&nbsp;because a valid ID_TOKEN parser is in theory allowed to ignore =
claims it does not understand (e.g. =E2=80=9Cevents=E2=80=9D) - leading =
to a possible erroneous acceptance of the logout event AS and =
ID_TOKEN.</div><div class=3D""><br class=3D""></div><div =
class=3D"">Because of this the issue of distinguishing classes or types =
of JWTs emerged.</div><div class=3D""><br class=3D""></div><div =
class=3D"">We discussed a number of differentiators like =E2=80=9Caud=E2=80=
=9D, =E2=80=9Ctyp=E2=80=9D, =E2=80=9Ccrit", etc that would help. =
&nbsp;But that really lead to the idea there there should be some best =
practices in the JWT BCP covering the issue(s).</div><div class=3D""><br =
class=3D""><div class=3D"">
<div style=3D"color: rgb(0, 0, 0); letter-spacing: normal; text-align: =
start; text-indent: 0px; text-transform: none; white-space: normal; =
word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: =
break-word; -webkit-nbsp-mode: space; -webkit-line-break: =
after-white-space;" class=3D""><div style=3D"color: rgb(0, 0, 0); =
letter-spacing: normal; text-align: start; text-indent: 0px; =
text-transform: none; white-space: normal; word-spacing: 0px; =
-webkit-text-stroke-width: 0px; word-wrap: break-word; =
-webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" =
class=3D""><div style=3D"color: rgb(0, 0, 0); letter-spacing: normal; =
text-align: start; text-indent: 0px; text-transform: none; white-space: =
normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: =
break-word; -webkit-nbsp-mode: space; -webkit-line-break: =
after-white-space;" class=3D""><div style=3D"color: rgb(0, 0, 0); =
letter-spacing: normal; text-align: start; text-indent: 0px; =
text-transform: none; white-space: normal; word-spacing: 0px; =
-webkit-text-stroke-width: 0px; word-wrap: break-word; =
-webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" =
class=3D""><div style=3D"color: rgb(0, 0, 0); letter-spacing: normal; =
text-align: start; text-indent: 0px; text-transform: none; white-space: =
normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: =
break-word; -webkit-nbsp-mode: space; -webkit-line-break: =
after-white-space;" class=3D""><div style=3D"color: rgb(0, 0, 0); =
letter-spacing: normal; text-align: start; text-indent: 0px; =
text-transform: none; white-space: normal; word-spacing: 0px; =
-webkit-text-stroke-width: 0px; word-wrap: break-word; =
-webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" =
class=3D""><div style=3D"color: rgb(0, 0, 0); letter-spacing: normal; =
text-align: start; text-indent: 0px; text-transform: none; white-space: =
normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: =
break-word; -webkit-nbsp-mode: space; -webkit-line-break: =
after-white-space;" class=3D""><div style=3D"color: rgb(0, 0, 0); =
letter-spacing: normal; text-align: start; text-indent: 0px; =
text-transform: none; white-space: normal; word-spacing: 0px; =
-webkit-text-stroke-width: 0px; word-wrap: break-word; =
-webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" =
class=3D""><div style=3D"color: rgb(0, 0, 0); letter-spacing: normal; =
text-align: start; text-indent: 0px; text-transform: none; white-space: =
normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: =
break-word; -webkit-nbsp-mode: space; -webkit-line-break: =
after-white-space;" class=3D""><div style=3D"color: rgb(0, 0, 0); =
letter-spacing: normal; text-align: start; text-indent: 0px; =
text-transform: none; white-space: normal; word-spacing: 0px; =
-webkit-text-stroke-width: 0px; word-wrap: break-word; =
-webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" =
class=3D""><div style=3D"color: rgb(0, 0, 0); letter-spacing: normal; =
text-align: start; text-indent: 0px; text-transform: none; white-space: =
normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: =
break-word; -webkit-nbsp-mode: space; -webkit-line-break: =
after-white-space;" class=3D""><div class=3D""><span =
class=3D"Apple-style-span" style=3D"border-collapse: separate; =
line-height: normal; border-spacing: 0px;"><div class=3D"" =
style=3D"word-wrap: break-word; -webkit-nbsp-mode: space; =
-webkit-line-break: after-white-space;"><div class=3D""><div =
class=3D""><div class=3D"">Phil</div><div class=3D""><br =
class=3D""></div><div class=3D"">Oracle Corporation, Identity Cloud =
Services Architect &amp; Standards</div><div =
class=3D"">@independentid</div><div class=3D""><a =
href=3D"http://www.independentid.com" =
class=3D"">www.independentid.com</a></div></div></div></div></span><a =
href=3D"mailto:phil.hunt@oracle.com" class=3D"" style=3D"orphans: 2; =
widows: =
2;">phil.hunt@oracle.com</a></div></div></div></div></div></div></div></di=
v></div></div></div></div>
</div>
<br class=3D""><div><blockquote type=3D"cite" class=3D""><div =
class=3D"">On Jul 27, 2017, at 2:00 PM, Nathaniel McCallum &lt;<a =
href=3D"mailto:npmccallum@redhat.com" =
class=3D"">npmccallum@redhat.com</a>&gt; wrote:</div><br =
class=3D"Apple-interchange-newline"><div class=3D""><div class=3D"">Even =
after reading the whole section, I still don't understand the<br =
class=3D"">problem. Yes, a class of attack could exist where an =
attacker<br class=3D"">substitutes a valid JWT from one security context =
into another<br class=3D"">context. But isn't this resolved by audience =
validation?<br class=3D""><br class=3D"">On Thu, Jul 27, 2017 at 3:34 =
PM, Brian Campbell<br class=3D"">&lt;<a =
href=3D"mailto:bcampbell@pingidentity.com" =
class=3D"">bcampbell@pingidentity.com</a>&gt; wrote:<br =
class=3D""><blockquote type=3D"cite" class=3D"">The draft describes it =
in<br class=3D""><a =
href=3D"https://urldefense.proofpoint.com/v2/url?u=3Dhttps-3A__tools.ietf.=
org_html_draft-2Dsheffer-2Doauth-2Djwt-2Dbcp-2D01-23section-2D2.7&amp;d=3D=
DwICAg&amp;c=3DRoP1YumCXCgaWHvlZYR8PQcxBKCX5YTpkKY057SbK10&amp;r=3DJBm5biR=
rKugCH0FkITSeGJxPEivzjWwlNKe4C_lLIGk&amp;m=3D02yWnzzFGNlefgVregxSncXu0b9sb=
h5pTrtBfQsC52A&amp;s=3D9GmPCouCMXE4enC48gfq0l0yc7ZlIxvEBAnQCVja_kY&amp;e=3D=
" =
class=3D"">https://urldefense.proofpoint.com/v2/url?u=3Dhttps-3A__tools.ie=
tf.org_html_draft-2Dsheffer-2Doauth-2Djwt-2Dbcp-2D01-23section-2D2.7&amp;d=
=3DDwICAg&amp;c=3DRoP1YumCXCgaWHvlZYR8PQcxBKCX5YTpkKY057SbK10&amp;r=3DJBm5=
biRrKugCH0FkITSeGJxPEivzjWwlNKe4C_lLIGk&amp;m=3D02yWnzzFGNlefgVregxSncXu0b=
9sbh5pTrtBfQsC52A&amp;s=3D9GmPCouCMXE4enC48gfq0l0yc7ZlIxvEBAnQCVja_kY&amp;=
e=3D</a> <br class=3D""><br class=3D"">On Thu, Jul 27, 2017 at 1:30 PM, =
Nathaniel McCallum &lt;<a href=3D"mailto:npmccallum@redhat.com" =
class=3D"">npmccallum@redhat.com</a>&gt;<br class=3D"">wrote:<br =
class=3D""><blockquote type=3D"cite" class=3D""><br class=3D"">What =
class of attacks is this trying to prevent? I frankly don't see a<br =
class=3D"">problem with confusing different types of JWT. But I may just =
be<br class=3D"">ignorant.<br class=3D""><br class=3D"">On Thu, Jul 27, =
2017 at 2:49 PM, Brian Campbell<br class=3D"">&lt;<a =
href=3D"mailto:bcampbell@pingidentity.com" =
class=3D"">bcampbell@pingidentity.com</a>&gt; wrote:<br =
class=3D""><blockquote type=3D"cite" class=3D"">During the first WG =
meeting last week I asked if use of the JOSE "crit"<br =
class=3D"">(Critical) Header Parameter had been considered as a =
recommendation for<br class=3D"">preventing confusion of one kind of JWT =
for another. Time was running<br class=3D"">short<br class=3D"">in the =
meeting so there wasn't much discussion and it was requested that<br =
class=3D"">I<br class=3D"">take the question to the list. And so here on =
the list is that.<br class=3D""><br class=3D"">Section 3.9 of the JWT =
BCP draft now recommends explicit typing using<br class=3D"">the<br =
class=3D"">"typ" JWS/JWE header parameter but does concede that 'the use =
of<br class=3D"">explicit<br class=3D"">typing may not achieve =
disambiguation from existing kinds of JWTs, as<br class=3D"">the<br =
class=3D"">validation rules for existing kinds JWTs often do not use the =
"typ"<br class=3D"">header<br class=3D"">parameter value.' &nbsp;And the =
recommendations for how to use the Type<br class=3D"">Header<br =
class=3D"">Parameter in JWT strongly suggest that it's not currently =
being used for<br class=3D"">any<br class=3D"">validation.<br =
class=3D""><br class=3D"">Alternatively using the JWS/JWE "crit" =
(Critical) Header Parameter to<br class=3D"">signal<br class=3D"">the =
type/intent/profile/application of a JWT could achieve<br =
class=3D"">disambiguation<br class=3D"">even in validation of existing =
kinds of JWTs. The critical header lists<br class=3D"">other headers =
which must be understood and processed by the receiver and<br =
class=3D"">that the JWS/JWE is invalid if those listed aren't =
understood. So a new<br class=3D"">type/profile of JWT that uses the =
"crit" header would produce JWTs that<br class=3D"">would be rejected =
even by existing applications of JWT validation (that<br =
class=3D"">actually implement "crit" properly anyway).<br class=3D""><br =
class=3D"">The JWT BCP could suggest the use of "crit" in conjunction =
with a<br class=3D"">profile/application/type specific header. Or it =
could provide a bit more<br class=3D"">of<br class=3D"">a framework like =
defining a registering a new JOSE header "p" (strawman<br class=3D"">of =
p<br class=3D"">as a very short name for profile) and create a registry =
for its values.<br class=3D"">A<br class=3D"">JWT header using that =
approach might look like the following where the<br class=3D"">value<br =
class=3D"">1 is registered as some cool new JWT profile/application. The =
consumer<br class=3D"">of<br class=3D"">such a JWT would have to =
understand and process the "p" header, which<br class=3D"">would<br =
class=3D"">mean checking that it had the value expected.<br class=3D""><br=
 class=3D""> &nbsp;&nbsp;&nbsp;&nbsp;{<br class=3D""> =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"alg":"ES256",<br class=3D""> =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"crit":["p"],<br class=3D""> =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"p":1<br class=3D""> =
&nbsp;&nbsp;&nbsp;&nbsp;}<br class=3D""><br class=3D"">A JOSE compliant =
JWT validator would reject such a JWT even for an OAuth<br =
class=3D"">access token or OIDC id_token because the "p" header isn't =
known or<br class=3D"">understood but is marked as critical.<br =
class=3D""><br class=3D"">To me, that seems like an approach to =
preventing confusion that has more<br class=3D"">teeth than the "typ" =
header. Which is why I asked about it last week and<br class=3D"">am<br =
class=3D"">now bringing it to the list.<br class=3D""><br class=3D""><br =
class=3D""><br class=3D""><br class=3D""><br class=3D""><br class=3D""><br=
 class=3D""><br class=3D""><br class=3D""><br class=3D"">CONFIDENTIALITY =
NOTICE: This email may contain confidential and<br =
class=3D"">privileged<br class=3D"">material for the sole use of the =
intended recipient(s). Any review, use,<br class=3D"">distribution or =
disclosure by others is strictly prohibited. &nbsp;If you<br =
class=3D"">have<br class=3D"">received this communication in error, =
please notify the sender<br class=3D"">immediately<br class=3D"">by =
e-mail and delete the message and any file attachments from your<br =
class=3D"">computer. Thank you.<br =
class=3D"">_______________________________________________<br =
class=3D"">jose mailing list<br class=3D""><a =
href=3D"mailto:jose@ietf.org" class=3D"">jose@ietf.org</a><br =
class=3D"">https://urldefense.proofpoint.com/v2/url?u=3Dhttps-3A__www.ietf=
.org_mailman_listinfo_jose&amp;d=3DDwICAg&amp;c=3DRoP1YumCXCgaWHvlZYR8PQcx=
BKCX5YTpkKY057SbK10&amp;r=3DJBm5biRrKugCH0FkITSeGJxPEivzjWwlNKe4C_lLIGk&am=
p;m=3D02yWnzzFGNlefgVregxSncXu0b9sbh5pTrtBfQsC52A&amp;s=3DeJ8QZBwe5AO-RDl_=
E16U1q_KpobaeSRUP4Cp2W-_jJU&amp;e=3D <br class=3D""><br =
class=3D""></blockquote></blockquote><br class=3D""><br class=3D""><br =
class=3D"">CONFIDENTIALITY NOTICE: This email may contain confidential =
and privileged<br class=3D"">material for the sole use of the intended =
recipient(s). Any review, use,<br class=3D"">distribution or disclosure =
by others is strictly prohibited. &nbsp;If you have<br class=3D"">received=
 this communication in error, please notify the sender immediately<br =
class=3D"">by e-mail and delete the message and any file attachments =
from your<br class=3D"">computer. Thank you.<br =
class=3D""></blockquote><br =
class=3D"">_______________________________________________<br =
class=3D"">jose mailing list<br class=3D""><a =
href=3D"mailto:jose@ietf.org" class=3D"">jose@ietf.org</a><br =
class=3D"">https://urldefense.proofpoint.com/v2/url?u=3Dhttps-3A__www.ietf=
.org_mailman_listinfo_jose&amp;d=3DDwICAg&amp;c=3DRoP1YumCXCgaWHvlZYR8PQcx=
BKCX5YTpkKY057SbK10&amp;r=3DJBm5biRrKugCH0FkITSeGJxPEivzjWwlNKe4C_lLIGk&am=
p;m=3D02yWnzzFGNlefgVregxSncXu0b9sbh5pTrtBfQsC52A&amp;s=3DeJ8QZBwe5AO-RDl_=
E16U1q_KpobaeSRUP4Cp2W-_jJU&amp;e=3D <br =
class=3D""></div></div></blockquote></div><br =
class=3D""></div></body></html>=

--Apple-Mail=_0396C5EF-FEE2-483C-BA89-2556CEBF7219--


From nobody Thu Jul 27 14:29:38 2017
Return-Path: <dick.hardt@gmail.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 5F1431321BB; Thu, 27 Jul 2017 14:29:37 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.998
X-Spam-Level: 
X-Spam-Status: No, score=-1.998 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, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com
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 q-xh4Gj3Qq9n; Thu, 27 Jul 2017 14:29:34 -0700 (PDT)
Received: from mail-qt0-x234.google.com (mail-qt0-x234.google.com [IPv6:2607:f8b0:400d:c0d::234]) (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 0158D1321BD; Thu, 27 Jul 2017 14:29:33 -0700 (PDT)
Received: by mail-qt0-x234.google.com with SMTP id p3so68181167qtg.2; Thu, 27 Jul 2017 14:29:33 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;  h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=XSTLI0ZY66yudmGmJZcDkLZ735Q2jjVHp5LbBwYYvWo=; b=UpO8xZzuHo4vtbTfiN2K+TSoXSCin+2JqXkt++jbzaXsaXdWIE7R95wCj+/myOK4Uc nd0/8VH4+lFuWFBQlSvp7/ltcsHxVqJbDGffESRh5P4gVMk+U6mCwAqR5dbNvl27Irmw fHv4xh5VNifsi4TbRyvmh58NgeVqD2QWqE5Og7yjwQxQyXnX1BnZV03Rej/kHD7DKzWY YN6wWriizYFk+1vtObex5LLELxRUEr+WZH/uDcJIulQc+0Y+Vukbb9HmgJWXgheFrLK4 dApngr1FDMXOCh675WWeIn8cBfwhTeQGV1eXLnvmr8J+nBb6Zy23KFgTvqAdKLFy1MJE yOYw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=XSTLI0ZY66yudmGmJZcDkLZ735Q2jjVHp5LbBwYYvWo=; b=Y+oz7a7J3F8EYIJycLS8R5Kz9udUoULHJ4dMHPXP292E6PDzOscK3SBR+c6F3IQvxl MhLCbdxUG2FjGLa8mVE82dat69KMDEtExq4KzrphANn9O4v5HzpMlVHV6tvB1bwmu0SX Cdt2dpU5vCXT3YpAMONyGj82gVlMhc56tO4xWgm6EjDOwcw//14JYjPHJRuK8rYBzw0D xX61wSKDxNBH8CGAMmIm8KKgrHS/Zbcqd12B7R0U8MONTBLEZ09KWWZ7ZUMCvgQa2B7h zAh/yubROlGPOS+cs1pZAWzwTea05xBIhT4KdAnpe3WNScx7QRyYfhF3TVKiZirOkZkk ntYQ==
X-Gm-Message-State: AIVw112qzOLPcvgAfBNe4ubX3Pvzk1d4UU4Gq7jVWWClk14jOu4Kg1mq 3K/9d1gLUH73IxAbDPrSCPW+D1sGLQ==
X-Received: by 10.237.63.92 with SMTP id q28mr8355802qtf.49.1501190973101; Thu, 27 Jul 2017 14:29:33 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.140.104.131 with HTTP; Thu, 27 Jul 2017 14:29:09 -0700 (PDT)
In-Reply-To: <CA+k3eCRT_iuLHYrLxz+tf1MT9L9XG2jV0D0anC0h5w7A_ujEdQ@mail.gmail.com>
References: <CA+k3eCRT_iuLHYrLxz+tf1MT9L9XG2jV0D0anC0h5w7A_ujEdQ@mail.gmail.com>
From: Dick Hardt <dick.hardt@gmail.com>
Date: Thu, 27 Jul 2017 22:29:09 +0100
Message-ID: <CAD9ie-sM-FrVxZKrNLk91Nfr8kWzZgZ6_o=yLhyOYx=GLB34fw@mail.gmail.com>
To: Brian Campbell <bcampbell@pingidentity.com>
Cc: oauth <oauth@ietf.org>, "jose@ietf.org" <jose@ietf.org>
Content-Type: multipart/alternative; boundary="001a1146e496b11e36055553428c"
Archived-At: <https://mailarchive.ietf.org/arch/msg/jose/E36OE9N1wjf4waPsJPN7HZm8L8o>
Subject: Re: [jose] preventing confusion of one kind of JWT for another in JWT BCP
X-BeenThere: jose@ietf.org
X-Mailman-Version: 2.1.22
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: Thu, 27 Jul 2017 21:29:37 -0000

--001a1146e496b11e36055553428c
Content-Type: text/plain; charset="UTF-8"

Brian: I did not think that 'crit' processing is required in JWT
https://tools.ietf.org/html/rfc7519

We have two goals:

Preventing new JWT profiles from being confused with older JWTs, which
'typ' solves (as does your proposal of 'crit' and 'p', but requires more
bytes)

Preventing existing JWT implementations from being confused with new JWT
profiles. 'crit' can solve that for JOSE JWTs, but not other JWTs.



On Thu, Jul 27, 2017 at 7:49 PM, Brian Campbell <bcampbell@pingidentity.com>
wrote:

> During the first WG meeting last week
> <https://datatracker.ietf.org/doc/minutes-99-oauth/> I asked if use of
> the JOSE "crit" (Critical) Header Parameter had been considered as a
> recommendation for preventing confusion of one kind of JWT for another.
> Time was running short in the meeting so there wasn't much discussion and
> it was requested that I take the question to the list. And so here on the
> list is that.
>
> Section 3.9
> <https://tools.ietf.org/html/draft-sheffer-oauth-jwt-bcp-01#section-3.9>
> of the JWT BCP draft now recommends explicit typing using the "typ" JWS/JWE
> header parameter but does concede that 'the use of explicit typing may not
> achieve disambiguation from existing kinds of JWTs, as the validation rules
> for existing kinds JWTs often do not use the "typ" header parameter
> value.'  And the recommendations for how to use the Type Header Parameter
> in JWT <https://tools.ietf.org/html/rfc7519#section-5.1> strongly suggest
> that it's not currently being used for any validation.
>
> Alternatively using the JWS/JWE "crit" (Critical) Header Parameter
> <https://tools.ietf.org/html/rfc7515#section-4.1.11> to signal the
> type/intent/profile/application of a JWT could achieve disambiguation
> even in validation of existing kinds of JWTs. The critical header lists
> other headers which must be understood and processed by the receiver and
> that the JWS/JWE is invalid if those listed aren't understood. So a new
> type/profile of JWT that uses the "crit" header would produce JWTs that
> would be rejected even by existing applications of JWT validation (that
> actually implement "crit" properly anyway).
>
> The JWT BCP could suggest the use of "crit" in conjunction with a
> profile/application/type specific header. Or it could provide a bit more of
> a framework like defining a registering a new JOSE header "p" (strawman of
> p as a very short name for profile) and create a registry for its values. A
> JWT header using that approach might look like the following where the
> value 1 is registered as some cool new JWT profile/application. The
> consumer of such a JWT would have to understand and process the "p" header,
> which would mean checking that it had the value expected.
>
>      {
>       "alg":"ES256",
>       "crit":["p"],
>       "p":1
>      }
>
> A JOSE compliant JWT validator would reject such a JWT even for an OAuth
> access token or OIDC id_token because the "p" header isn't known or
> understood but is marked as critical.
>
> To me, that seems like an approach to preventing confusion that has more
> teeth than the "typ" header. Which is why I asked about it last week and am
> now bringing it to the list.
>
>
>
>
>
>
>
>
>
>
> *CONFIDENTIALITY NOTICE: This email may contain confidential and
> privileged material for the sole use of the intended recipient(s). Any
> review, use, distribution or disclosure by others is strictly prohibited.
> If you have received this communication in error, please notify the sender
> immediately by e-mail and delete the message and any file attachments from
> your computer. Thank you.*
> _______________________________________________
> jose mailing list
> jose@ietf.org
> https://www.ietf.org/mailman/listinfo/jose
>
>


-- 
Subscribe to the HARDTWARE <http://hardtware.com/> mail list to learn about
projects I am working on!

--001a1146e496b11e36055553428c
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Brian: I did not think that &#39;crit&#39; processing is r=
equired in JWT=C2=A0<a href=3D"https://tools.ietf.org/html/rfc7519">https:/=
/tools.ietf.org/html/rfc7519</a><div><br></div><div>We have two goals:=C2=
=A0</div><div><br></div><div>Preventing new JWT profiles from being confuse=
d with older JWTs, which &#39;typ&#39; solves (as does your proposal of &#3=
9;crit&#39; and &#39;p&#39;, but requires more bytes)</div><div><br></div><=
div>Preventing existing JWT implementations from being confused with new JW=
T profiles. &#39;crit&#39; can solve that for JOSE JWTs, but not other JWTs=
.</div><div><br></div><div><br></div></div><div class=3D"gmail_extra"><br><=
div class=3D"gmail_quote">On Thu, Jul 27, 2017 at 7:49 PM, Brian Campbell <=
span dir=3D"ltr">&lt;<a href=3D"mailto:bcampbell@pingidentity.com" target=
=3D"_blank">bcampbell@pingidentity.com</a>&gt;</span> wrote:<br><blockquote=
 class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc soli=
d;padding-left:1ex"><div dir=3D"ltr"><div><div><div><div><div>During the <a=
 href=3D"https://datatracker.ietf.org/doc/minutes-99-oauth/" target=3D"_bla=
nk">first WG meeting last week</a> I asked if use of the JOSE &quot;crit&qu=
ot; (Critical) Header Parameter had been considered as a recommendation for=
 preventing confusion of one kind of JWT for another. Time was running shor=
t in the meeting so there wasn&#39;t much discussion and it was requested t=
hat I take the question to the list. And so here on the list is that. <br><=
br></div><a href=3D"https://tools.ietf.org/html/draft-sheffer-oauth-jwt-bcp=
-01#section-3.9" target=3D"_blank">Section 3.9</a> of the JWT BCP draft now=
 recommends explicit typing using the &quot;typ&quot; JWS/JWE header parame=
ter but does concede that &#39;the use of explicit typing may not achieve d=
isambiguation from existing kinds of JWTs, as the validation rules for exis=
ting kinds JWTs often do not use the &quot;typ&quot; header parameter value=
.&#39;=C2=A0 And the recommendations for how to use the <a href=3D"https://=
tools.ietf.org/html/rfc7519#section-5.1" target=3D"_blank">Type Header Para=
meter in JWT</a> strongly suggest that it&#39;s not currently being used fo=
r any validation. <br><br></div>Alternatively using the JWS/JWE <a href=3D"=
https://tools.ietf.org/html/rfc7515#section-4.1.11" target=3D"_blank">&quot=
;crit&quot; (Critical) Header Parameter</a> to signal the type/intent/profi=
le/<wbr>application of a JWT could achieve disambiguation even in validatio=
n of existing kinds of JWTs. The critical header lists other headers which =
must be understood and processed by the receiver and that the JWS/JWE is in=
valid if those listed aren&#39;t understood. So a new type/profile of JWT t=
hat uses the &quot;crit&quot; header would produce JWTs that would be rejec=
ted even by existing applications of JWT validation (that actually implemen=
t &quot;crit&quot; properly anyway).<br><br></div>The JWT BCP could suggest=
 the use of &quot;crit&quot; in conjunction with a profile/application/type=
 specific header. Or it could provide a bit more of a framework like defini=
ng a registering a new JOSE header &quot;p&quot; (strawman of p as a very s=
hort name for profile) and create a registry for its values. A JWT header u=
sing that approach might look like the following where the value 1 is regis=
tered as some cool new JWT profile/application. The consumer of such a JWT =
would have to understand and process the &quot;p&quot; header, which would =
mean checking that it had the value expected. <br>=C2=A0<br>=C2=A0=C2=A0=C2=
=A0=C2=A0 {<br>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 &quot;alg&quot;:&quot;ES256&q=
uot;,<br>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 &quot;crit&quot;:[&quot;p&quot;],<b=
r>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 &quot;p&quot;:1<br>=C2=A0=C2=A0=C2=A0=C2=
=A0 }<br><br></div>A JOSE compliant JWT validator would reject such a JWT e=
ven for an OAuth access token or OIDC id_token because the &quot;p&quot; he=
ader isn&#39;t known or understood but is marked as critical. <br><br></div=
>To me, that seems like an approach to preventing confusion that has more t=
eeth than the &quot;typ&quot; header. Which is why I asked about it last we=
ek and am now bringing it to the list. <br><div><div><br><br><div><div><div=
><div><br><br><div><br><br><br><br><br></div></div></div></div></div></div>=
</div></div>

<br>
<i style=3D"margin:0px;padding:0px;border:0px;outline:0px;vertical-align:ba=
seline;background:rgb(255,255,255);font-family:proxima-nova-zendesk,system-=
ui,-apple-system,system-ui,&quot;Segoe UI&quot;,Roboto,Oxygen-Sans,Ubuntu,C=
antarell,&quot;Helvetica Neue&quot;,Arial,sans-serif;color:rgb(85,85,85)"><=
span style=3D"margin:0px;padding:0px;border:0px;outline:0px;vertical-align:=
baseline;background:transparent;font-family:proxima-nova-zendesk,system-ui,=
-apple-system,BlinkMacSystemFont,&quot;Segoe UI&quot;,Roboto,Oxygen-Sans,Ub=
untu,Cantarell,&quot;Helvetica Neue&quot;,Arial,sans-serif;font-weight:600"=
><font size=3D"2">CONFIDENTIALITY NOTICE: This email may contain confidenti=
al and privileged material for the sole use of the intended recipient(s). A=
ny review, use, distribution or disclosure by others is strictly prohibited=
.=C2=A0 If you have received this communication in error, please notify the=
 sender immediately by e-mail and delete the message and any file attachmen=
ts from your computer. Thank you.</font></span></i><br>____________________=
__________<wbr>_________________<br>
jose mailing list<br>
<a href=3D"mailto:jose@ietf.org">jose@ietf.org</a><br>
<a href=3D"https://www.ietf.org/mailman/listinfo/jose" rel=3D"noreferrer" t=
arget=3D"_blank">https://www.ietf.org/mailman/<wbr>listinfo/jose</a><br>
<br></blockquote></div><br><br clear=3D"all"><div><br></div>-- <br><div cla=
ss=3D"gmail_signature" data-smartmail=3D"gmail_signature"><div dir=3D"ltr">=
<div><div dir=3D"ltr"><div dir=3D"ltr"><div>Subscribe to the <a href=3D"htt=
p://hardtware.com/" target=3D"_blank">HARDTWARE</a> mail list to learn abou=
t projects I am working on!</div></div></div></div></div></div>
</div>

--001a1146e496b11e36055553428c--


From nobody Thu Jul 27 14:40:28 2017
Return-Path: <ve7jtb@ve7jtb.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 AFC2D131CEB for <jose@ietfa.amsl.com>; Thu, 27 Jul 2017 14:40:18 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.899
X-Spam-Level: 
X-Spam-Status: No, score=-1.899 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=ve7jtb-com.20150623.gappssmtp.com
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 jQGJlfoLsWLe for <jose@ietfa.amsl.com>; Thu, 27 Jul 2017 14:40:12 -0700 (PDT)
Received: from mail-qt0-x231.google.com (mail-qt0-x231.google.com [IPv6:2607:f8b0:400d:c0d::231]) (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 BFBF413170E for <jose@ietf.org>; Thu, 27 Jul 2017 14:40:11 -0700 (PDT)
Received: by mail-qt0-x231.google.com with SMTP id p3so68302256qtg.2 for <jose@ietf.org>; Thu, 27 Jul 2017 14:40:11 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ve7jtb-com.20150623.gappssmtp.com; s=20150623; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=cxp9wXk9ykh5BfDv5Z2+pzBZpqu2XV2tTavHx+C264A=; b=Wu7KIExtHCdYHd+/jPecJM4qNN+RnI1Dj1VaL+HLwOAC9C1d3N6du7/MNqa1kprtDe m0bEwQaQEB0Qs4k+i7MA75Uj1QCjLHWE/m1pBtoANxbVkDeEDsXNMGuIvv+JLm0x5BtB wI8ewb5+wCAZmSbAo1ydTj9GHoGzIft+UIiVgVCO3abEqDoPQ3+7w7QXWqijdgqxF5li SRNfbUGKns3UBLFa3QAObUyt1JeqxpapKlzDiq0o2y5wy5GCGe2AwXwfoSe6R0eRl7Ij n4V5JmPbeLIbipTgOOTbE7tCVnzK7zeMAnghzKJCbbxj5absRijWYQDphLfeBVKOwOjN yBVg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=cxp9wXk9ykh5BfDv5Z2+pzBZpqu2XV2tTavHx+C264A=; b=ekPsJYTv5eH/KI4hED3imZvYKE8nmPuFQPJ1DXnRsd5Jl2ZxTbio+gNdcLLRRhxU/G Y3mEKwW1EH4X8cqTN5Xf9Ui1yn2o6NdlgRuhj/W+ik0a1lzWJsL9Gq66V+/Gt6FTU0WF CAIg/B0k454x6yx1aoqVcLA92BOz/vLhYSNki9HlMir2sFvFmE5kHfVWBsyP4Gsc+GFR eX5Izx6IjjvVKq6lPot8ubpampgMCGAazxfRtVszMvSBubUGpSgsH5g/5rYojPbFbPs3 HjzvEh7YiA1KCb2ufdLQ4a6Hp6ray9klIgH+EyTbqCLYYKIFsqJ3g3zOEhClC6Tjgr5T v9BQ==
X-Gm-Message-State: AIVw112pfw0xdVbUx0BCy5n3yeotw3pcS6lEkG9bmxSqhP957CfxhkBJ 2heIlCaFTWHL2t/e
X-Received: by 10.200.3.135 with SMTP id t7mr7593721qtg.216.1501191610483; Thu, 27 Jul 2017 14:40:10 -0700 (PDT)
Received: from [192.168.86.103] ([191.115.36.222]) by smtp.gmail.com with ESMTPSA id m123sm13847245qke.12.2017.07.27.14.40.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 27 Jul 2017 14:40:09 -0700 (PDT)
From: John Bradley <ve7jtb@ve7jtb.com>
Message-Id: <7041D358-E4C8-4D8C-BD94-0D65C238B449@ve7jtb.com>
Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\))
Date: Thu, 27 Jul 2017 17:40:02 -0400
In-Reply-To: <91B882A0-48A0-4F08-8ADB-B675D9F1C08F@oracle.com>
Cc: Nathaniel McCallum <npmccallum@redhat.com>, oauth <oauth@ietf.org>, "jose@ietf.org" <jose@ietf.org>
To: Phil Hunt <phil.hunt@oracle.com>
References: <CA+k3eCRT_iuLHYrLxz+tf1MT9L9XG2jV0D0anC0h5w7A_ujEdQ@mail.gmail.com> <CAOASepOjYBYoKYEVvCLMzZgsdyGhr2LOB-dNqekxsKFm_gxixg@mail.gmail.com> <CA+k3eCS-Va2AvzRhWia_ETqSDYUMBOoi=sY3jg7TbJFhhuVnZA@mail.gmail.com> <CAOASepMaeS8WrCMb+WHV0FC2_w3f0KnY5XuDsuWJhAW2ayfryQ@mail.gmail.com> <91B882A0-48A0-4F08-8ADB-B675D9F1C08F@oracle.com>
X-Mailer: Apple Mail (2.3273)
Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha-256; boundary="f4030435c300b6252a05555368fd"
Archived-At: <https://mailarchive.ietf.org/arch/msg/jose/SFl3mTC9zwyFhYmQ_wiXKOFstx4>
Subject: Re: [jose] [OAUTH-WG] preventing confusion of one kind of JWT for another in JWT BCP
X-BeenThere: jose@ietf.org
X-Mailman-Version: 2.1.22
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: Thu, 27 Jul 2017 21:40:19 -0000

--f4030435c300b6252a05555368fd
Content-Type: multipart/alternative;
 boundary="Apple-Mail=_88FC2852-5BA7-481E-92F6-396B90D2D313"


--Apple-Mail=_88FC2852-5BA7-481E-92F6-396B90D2D313
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=utf-8

Not that I am against the general desire for JWT not to be confused, but =
the attack surface for someone to take a sec event from one context and =
replay it as a id_token to login is very small and if the client is =
correctly configured would not work as it is now.

The only way you could replay the sec event JWT is via the implicit =
flow.   The other flows would require a malicious AS and at that point =
you have bigger problems with a compromised token endpoint.

If you were to create a implicit response with the sec event token that =
has the correct issuer and aud, connect requires that nonce value from =
the request be present in the id_token.   This would require that the =
attacker somehow get the AS to put not only the claim but the correct =
value from the request into the token.

All in all I think that it is more likely (not 100% I admit) that a =
client will do that rather than checking the typ or a new crit JWT =
header parameter.

I am all for a general solution for this but I think the issue with =
Connect is overstated sometimes.

John B.
=20
> On Jul 27, 2017, at 5:19 PM, Phil Hunt <phil.hunt@oracle.com> wrote:
>=20
> We have the use case in SECEVENTS where a logout event (e.g. OIDF =
backchannel logout) is extremely close to an ID_TOKEN.=20
>=20
> Older relying parties who are do not yet support logout could be =
tricked into accepting a logout assertion as an ID_TOKEN since they are =
too similar, and  because a valid ID_TOKEN parser is in theory allowed =
to ignore claims it does not understand (e.g. =E2=80=9Cevents=E2=80=9D) =
- leading to a possible erroneous acceptance of the logout event AS and =
ID_TOKEN.
>=20
> Because of this the issue of distinguishing classes or types of JWTs =
emerged.
>=20
> We discussed a number of differentiators like =E2=80=9Caud=E2=80=9D, =
=E2=80=9Ctyp=E2=80=9D, =E2=80=9Ccrit", etc that would help.  But that =
really lead to the idea there there should be some best practices in the =
JWT BCP covering the issue(s).
>=20
> Phil
>=20
> Oracle Corporation, Identity Cloud Services Architect & Standards
> @independentid
> www.independentid.com =
<http://www.independentid.com/>phil.hunt@oracle.com =
<mailto:phil.hunt@oracle.com>
>> On Jul 27, 2017, at 2:00 PM, Nathaniel McCallum =
<npmccallum@redhat.com <mailto:npmccallum@redhat.com>> wrote:
>>=20
>> Even after reading the whole section, I still don't understand the
>> problem. Yes, a class of attack could exist where an attacker
>> substitutes a valid JWT from one security context into another
>> context. But isn't this resolved by audience validation?
>>=20
>> On Thu, Jul 27, 2017 at 3:34 PM, Brian Campbell
>> <bcampbell@pingidentity.com <mailto:bcampbell@pingidentity.com>> =
wrote:
>>> The draft describes it in
>>> =
https://urldefense.proofpoint.com/v2/url?u=3Dhttps-3A__tools.ietf.org_html=
_draft-2Dsheffer-2Doauth-2Djwt-2Dbcp-2D01-23section-2D2.7&d=3DDwICAg&c=3DR=
oP1YumCXCgaWHvlZYR8PQcxBKCX5YTpkKY057SbK10&r=3DJBm5biRrKugCH0FkITSeGJxPEiv=
zjWwlNKe4C_lLIGk&m=3D02yWnzzFGNlefgVregxSncXu0b9sbh5pTrtBfQsC52A&s=3D9GmPC=
ouCMXE4enC48gfq0l0yc7ZlIxvEBAnQCVja_kY&e=3D =
<https://urldefense.proofpoint.com/v2/url?u=3Dhttps-3A__tools.ietf.org_htm=
l_draft-2Dsheffer-2Doauth-2Djwt-2Dbcp-2D01-23section-2D2.7&d=3DDwICAg&c=3D=
RoP1YumCXCgaWHvlZYR8PQcxBKCX5YTpkKY057SbK10&r=3DJBm5biRrKugCH0FkITSeGJxPEi=
vzjWwlNKe4C_lLIGk&m=3D02yWnzzFGNlefgVregxSncXu0b9sbh5pTrtBfQsC52A&s=3D9GmP=
CouCMXE4enC48gfq0l0yc7ZlIxvEBAnQCVja_kY&e=3D>=20
>>>=20
>>> On Thu, Jul 27, 2017 at 1:30 PM, Nathaniel McCallum =
<npmccallum@redhat.com <mailto:npmccallum@redhat.com>>
>>> wrote:
>>>>=20
>>>> What class of attacks is this trying to prevent? I frankly don't =
see a
>>>> problem with confusing different types of JWT. But I may just be
>>>> ignorant.
>>>>=20
>>>> On Thu, Jul 27, 2017 at 2:49 PM, Brian Campbell
>>>> <bcampbell@pingidentity.com <mailto:bcampbell@pingidentity.com>> =
wrote:
>>>>> During the first WG meeting last week I asked if use of the JOSE =
"crit"
>>>>> (Critical) Header Parameter had been considered as a =
recommendation for
>>>>> preventing confusion of one kind of JWT for another. Time was =
running
>>>>> short
>>>>> in the meeting so there wasn't much discussion and it was =
requested that
>>>>> I
>>>>> take the question to the list. And so here on the list is that.
>>>>>=20
>>>>> Section 3.9 of the JWT BCP draft now recommends explicit typing =
using
>>>>> the
>>>>> "typ" JWS/JWE header parameter but does concede that 'the use of
>>>>> explicit
>>>>> typing may not achieve disambiguation from existing kinds of JWTs, =
as
>>>>> the
>>>>> validation rules for existing kinds JWTs often do not use the =
"typ"
>>>>> header
>>>>> parameter value.'  And the recommendations for how to use the Type
>>>>> Header
>>>>> Parameter in JWT strongly suggest that it's not currently being =
used for
>>>>> any
>>>>> validation.
>>>>>=20
>>>>> Alternatively using the JWS/JWE "crit" (Critical) Header Parameter =
to
>>>>> signal
>>>>> the type/intent/profile/application of a JWT could achieve
>>>>> disambiguation
>>>>> even in validation of existing kinds of JWTs. The critical header =
lists
>>>>> other headers which must be understood and processed by the =
receiver and
>>>>> that the JWS/JWE is invalid if those listed aren't understood. So =
a new
>>>>> type/profile of JWT that uses the "crit" header would produce JWTs =
that
>>>>> would be rejected even by existing applications of JWT validation =
(that
>>>>> actually implement "crit" properly anyway).
>>>>>=20
>>>>> The JWT BCP could suggest the use of "crit" in conjunction with a
>>>>> profile/application/type specific header. Or it could provide a =
bit more
>>>>> of
>>>>> a framework like defining a registering a new JOSE header "p" =
(strawman
>>>>> of p
>>>>> as a very short name for profile) and create a registry for its =
values.
>>>>> A
>>>>> JWT header using that approach might look like the following where =
the
>>>>> value
>>>>> 1 is registered as some cool new JWT profile/application. The =
consumer
>>>>> of
>>>>> such a JWT would have to understand and process the "p" header, =
which
>>>>> would
>>>>> mean checking that it had the value expected.
>>>>>=20
>>>>>     {
>>>>>      "alg":"ES256",
>>>>>      "crit":["p"],
>>>>>      "p":1
>>>>>     }
>>>>>=20
>>>>> A JOSE compliant JWT validator would reject such a JWT even for an =
OAuth
>>>>> access token or OIDC id_token because the "p" header isn't known =
or
>>>>> understood but is marked as critical.
>>>>>=20
>>>>> To me, that seems like an approach to preventing confusion that =
has more
>>>>> teeth than the "typ" header. Which is why I asked about it last =
week and
>>>>> am
>>>>> now bringing it to the list.
>>>>>=20
>>>>>=20
>>>>>=20
>>>>>=20
>>>>>=20
>>>>>=20
>>>>>=20
>>>>>=20
>>>>>=20
>>>>>=20
>>>>> CONFIDENTIALITY NOTICE: This email may contain confidential and
>>>>> privileged
>>>>> material for the sole use of the intended recipient(s). Any =
review, use,
>>>>> distribution or disclosure by others is strictly prohibited.  If =
you
>>>>> have
>>>>> received this communication in error, please notify the sender
>>>>> immediately
>>>>> by e-mail and delete the message and any file attachments from =
your
>>>>> computer. Thank you.
>>>>> _______________________________________________
>>>>> jose mailing list
>>>>> jose@ietf.org <mailto:jose@ietf.org>
>>>>> =
https://urldefense.proofpoint.com/v2/url?u=3Dhttps-3A__www.ietf.org_mailma=
n_listinfo_jose&d=3DDwICAg&c=3DRoP1YumCXCgaWHvlZYR8PQcxBKCX5YTpkKY057SbK10=
&r=3DJBm5biRrKugCH0FkITSeGJxPEivzjWwlNKe4C_lLIGk&m=3D02yWnzzFGNlefgVregxSn=
cXu0b9sbh5pTrtBfQsC52A&s=3DeJ8QZBwe5AO-RDl_E16U1q_KpobaeSRUP4Cp2W-_jJU&e=3D=
=20
>>>>>=20
>>>=20
>>>=20
>>>=20
>>> CONFIDENTIALITY NOTICE: This email may contain confidential and =
privileged
>>> material for the sole use of the intended recipient(s). Any review, =
use,
>>> distribution or disclosure by others is strictly prohibited.  If you =
have
>>> received this communication in error, please notify the sender =
immediately
>>> by e-mail and delete the message and any file attachments from your
>>> computer. Thank you.
>>=20
>> _______________________________________________
>> jose mailing list
>> jose@ietf.org <mailto:jose@ietf.org>
>> =
https://urldefense.proofpoint.com/v2/url?u=3Dhttps-3A__www.ietf.org_mailma=
n_listinfo_jose&d=3DDwICAg&c=3DRoP1YumCXCgaWHvlZYR8PQcxBKCX5YTpkKY057SbK10=
&r=3DJBm5biRrKugCH0FkITSeGJxPEivzjWwlNKe4C_lLIGk&m=3D02yWnzzFGNlefgVregxSn=
cXu0b9sbh5pTrtBfQsC52A&s=3DeJ8QZBwe5AO-RDl_E16U1q_KpobaeSRUP4Cp2W-_jJU&e=3D=
=20
>=20
> _______________________________________________
> OAuth mailing list
> OAuth@ietf.org
> https://www.ietf.org/mailman/listinfo/oauth


--Apple-Mail=_88FC2852-5BA7-481E-92F6-396B90D2D313
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html;
	charset=utf-8

<html><head><meta http-equiv=3D"Content-Type" content=3D"text/html =
charset=3Dutf-8"></head><body style=3D"word-wrap: break-word; =
-webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" =
class=3D"">Not that I am against the general desire for JWT not to be =
confused, but the attack surface for someone to take a sec event from =
one context and replay it as a id_token to login is very small and if =
the client is correctly configured would not work as it is now.<div =
class=3D""><br class=3D""></div><div class=3D"">The only way you could =
replay the sec event JWT is via the implicit flow. &nbsp; The other =
flows would require a malicious AS and at that point you have bigger =
problems with a compromised token endpoint.</div><div class=3D""><br =
class=3D""></div><div class=3D"">If you were to create a implicit =
response with the sec event token that has the correct issuer and aud, =
connect requires that nonce value from the request be present in the =
id_token. &nbsp; This would require that the attacker somehow get the AS =
to put not only the claim but the correct value from the request into =
the token.</div><div class=3D""><br class=3D""></div><div class=3D"">All =
in all I think that it is more likely (not 100% I admit) that a client =
will do that rather than checking the typ or a new crit JWT header =
parameter.</div><div class=3D""><br class=3D""></div><div class=3D"">I =
am all for a general solution for this but I think the issue with =
Connect is overstated sometimes.</div><div class=3D""><br =
class=3D""></div><div class=3D"">John B.</div><div class=3D"">&nbsp;<br =
class=3D""><div><blockquote type=3D"cite" class=3D""><div class=3D"">On =
Jul 27, 2017, at 5:19 PM, Phil Hunt &lt;<a =
href=3D"mailto:phil.hunt@oracle.com" =
class=3D"">phil.hunt@oracle.com</a>&gt; wrote:</div><br =
class=3D"Apple-interchange-newline"><div class=3D""><meta =
http-equiv=3D"Content-Type" content=3D"text/html charset=3Dutf-8" =
class=3D""><div style=3D"word-wrap: break-word; -webkit-nbsp-mode: =
space; -webkit-line-break: after-white-space;" class=3D"">We have the =
use case in SECEVENTS where a logout event (e.g. OIDF backchannel =
logout) is extremely close to an ID_TOKEN.&nbsp;<div class=3D""><br =
class=3D""></div><div class=3D"">Older relying parties who are do not =
yet support logout could be tricked into accepting a logout assertion as =
an ID_TOKEN since they are too similar, and &nbsp;because a valid =
ID_TOKEN parser is in theory allowed to ignore claims it does not =
understand (e.g. =E2=80=9Cevents=E2=80=9D) - leading to a possible =
erroneous acceptance of the logout event AS and ID_TOKEN.</div><div =
class=3D""><br class=3D""></div><div class=3D"">Because of this the =
issue of distinguishing classes or types of JWTs emerged.</div><div =
class=3D""><br class=3D""></div><div class=3D"">We discussed a number of =
differentiators like =E2=80=9Caud=E2=80=9D, =E2=80=9Ctyp=E2=80=9D, =
=E2=80=9Ccrit", etc that would help. &nbsp;But that really lead to the =
idea there there should be some best practices in the JWT BCP covering =
the issue(s).</div><div class=3D""><br class=3D""><div class=3D"">
<div style=3D"letter-spacing: normal; text-align: start; text-indent: =
0px; text-transform: none; white-space: normal; word-spacing: 0px; =
-webkit-text-stroke-width: 0px; word-wrap: break-word; =
-webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" =
class=3D""><div style=3D"letter-spacing: normal; text-align: start; =
text-indent: 0px; text-transform: none; white-space: normal; =
word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: =
break-word; -webkit-nbsp-mode: space; -webkit-line-break: =
after-white-space;" class=3D""><div style=3D"letter-spacing: normal; =
text-align: start; text-indent: 0px; text-transform: none; white-space: =
normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: =
break-word; -webkit-nbsp-mode: space; -webkit-line-break: =
after-white-space;" class=3D""><div style=3D"letter-spacing: normal; =
text-align: start; text-indent: 0px; text-transform: none; white-space: =
normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: =
break-word; -webkit-nbsp-mode: space; -webkit-line-break: =
after-white-space;" class=3D""><div style=3D"letter-spacing: normal; =
text-align: start; text-indent: 0px; text-transform: none; white-space: =
normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: =
break-word; -webkit-nbsp-mode: space; -webkit-line-break: =
after-white-space;" class=3D""><div style=3D"letter-spacing: normal; =
text-align: start; text-indent: 0px; text-transform: none; white-space: =
normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: =
break-word; -webkit-nbsp-mode: space; -webkit-line-break: =
after-white-space;" class=3D""><div style=3D"letter-spacing: normal; =
text-align: start; text-indent: 0px; text-transform: none; white-space: =
normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: =
break-word; -webkit-nbsp-mode: space; -webkit-line-break: =
after-white-space;" class=3D""><div style=3D"letter-spacing: normal; =
text-align: start; text-indent: 0px; text-transform: none; white-space: =
normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: =
break-word; -webkit-nbsp-mode: space; -webkit-line-break: =
after-white-space;" class=3D""><div style=3D"letter-spacing: normal; =
text-align: start; text-indent: 0px; text-transform: none; white-space: =
normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: =
break-word; -webkit-nbsp-mode: space; -webkit-line-break: =
after-white-space;" class=3D""><div style=3D"letter-spacing: normal; =
text-align: start; text-indent: 0px; text-transform: none; white-space: =
normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: =
break-word; -webkit-nbsp-mode: space; -webkit-line-break: =
after-white-space;" class=3D""><div style=3D"letter-spacing: normal; =
text-align: start; text-indent: 0px; text-transform: none; white-space: =
normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: =
break-word; -webkit-nbsp-mode: space; -webkit-line-break: =
after-white-space;" class=3D""><div class=3D""><span =
class=3D"Apple-style-span" style=3D"border-collapse: separate; =
line-height: normal; border-spacing: 0px;"><div class=3D"" =
style=3D"word-wrap: break-word; -webkit-nbsp-mode: space; =
-webkit-line-break: after-white-space;"><div class=3D""><div =
class=3D""><div class=3D"">Phil</div><div class=3D""><br =
class=3D""></div><div class=3D"">Oracle Corporation, Identity Cloud =
Services Architect &amp; Standards</div><div =
class=3D"">@independentid</div><div class=3D""><a =
href=3D"http://www.independentid.com/" =
class=3D"">www.independentid.com</a></div></div></div></div></span><a =
href=3D"mailto:phil.hunt@oracle.com" class=3D"" style=3D"orphans: 2; =
widows: =
2;">phil.hunt@oracle.com</a></div></div></div></div></div></div></div></di=
v></div></div></div></div>
</div>
<br class=3D""><div class=3D""><blockquote type=3D"cite" class=3D""><div =
class=3D"">On Jul 27, 2017, at 2:00 PM, Nathaniel McCallum &lt;<a =
href=3D"mailto:npmccallum@redhat.com" =
class=3D"">npmccallum@redhat.com</a>&gt; wrote:</div><br =
class=3D"Apple-interchange-newline"><div class=3D""><div class=3D"">Even =
after reading the whole section, I still don't understand the<br =
class=3D"">problem. Yes, a class of attack could exist where an =
attacker<br class=3D"">substitutes a valid JWT from one security context =
into another<br class=3D"">context. But isn't this resolved by audience =
validation?<br class=3D""><br class=3D"">On Thu, Jul 27, 2017 at 3:34 =
PM, Brian Campbell<br class=3D"">&lt;<a =
href=3D"mailto:bcampbell@pingidentity.com" =
class=3D"">bcampbell@pingidentity.com</a>&gt; wrote:<br =
class=3D""><blockquote type=3D"cite" class=3D"">The draft describes it =
in<br class=3D""><a =
href=3D"https://urldefense.proofpoint.com/v2/url?u=3Dhttps-3A__tools.ietf.=
org_html_draft-2Dsheffer-2Doauth-2Djwt-2Dbcp-2D01-23section-2D2.7&amp;d=3D=
DwICAg&amp;c=3DRoP1YumCXCgaWHvlZYR8PQcxBKCX5YTpkKY057SbK10&amp;r=3DJBm5biR=
rKugCH0FkITSeGJxPEivzjWwlNKe4C_lLIGk&amp;m=3D02yWnzzFGNlefgVregxSncXu0b9sb=
h5pTrtBfQsC52A&amp;s=3D9GmPCouCMXE4enC48gfq0l0yc7ZlIxvEBAnQCVja_kY&amp;e=3D=
" =
class=3D"">https://urldefense.proofpoint.com/v2/url?u=3Dhttps-3A__tools.ie=
tf.org_html_draft-2Dsheffer-2Doauth-2Djwt-2Dbcp-2D01-23section-2D2.7&amp;d=
=3DDwICAg&amp;c=3DRoP1YumCXCgaWHvlZYR8PQcxBKCX5YTpkKY057SbK10&amp;r=3DJBm5=
biRrKugCH0FkITSeGJxPEivzjWwlNKe4C_lLIGk&amp;m=3D02yWnzzFGNlefgVregxSncXu0b=
9sbh5pTrtBfQsC52A&amp;s=3D9GmPCouCMXE4enC48gfq0l0yc7ZlIxvEBAnQCVja_kY&amp;=
e=3D</a> <br class=3D""><br class=3D"">On Thu, Jul 27, 2017 at 1:30 PM, =
Nathaniel McCallum &lt;<a href=3D"mailto:npmccallum@redhat.com" =
class=3D"">npmccallum@redhat.com</a>&gt;<br class=3D"">wrote:<br =
class=3D""><blockquote type=3D"cite" class=3D""><br class=3D"">What =
class of attacks is this trying to prevent? I frankly don't see a<br =
class=3D"">problem with confusing different types of JWT. But I may just =
be<br class=3D"">ignorant.<br class=3D""><br class=3D"">On Thu, Jul 27, =
2017 at 2:49 PM, Brian Campbell<br class=3D"">&lt;<a =
href=3D"mailto:bcampbell@pingidentity.com" =
class=3D"">bcampbell@pingidentity.com</a>&gt; wrote:<br =
class=3D""><blockquote type=3D"cite" class=3D"">During the first WG =
meeting last week I asked if use of the JOSE "crit"<br =
class=3D"">(Critical) Header Parameter had been considered as a =
recommendation for<br class=3D"">preventing confusion of one kind of JWT =
for another. Time was running<br class=3D"">short<br class=3D"">in the =
meeting so there wasn't much discussion and it was requested that<br =
class=3D"">I<br class=3D"">take the question to the list. And so here on =
the list is that.<br class=3D""><br class=3D"">Section 3.9 of the JWT =
BCP draft now recommends explicit typing using<br class=3D"">the<br =
class=3D"">"typ" JWS/JWE header parameter but does concede that 'the use =
of<br class=3D"">explicit<br class=3D"">typing may not achieve =
disambiguation from existing kinds of JWTs, as<br class=3D"">the<br =
class=3D"">validation rules for existing kinds JWTs often do not use the =
"typ"<br class=3D"">header<br class=3D"">parameter value.' &nbsp;And the =
recommendations for how to use the Type<br class=3D"">Header<br =
class=3D"">Parameter in JWT strongly suggest that it's not currently =
being used for<br class=3D"">any<br class=3D"">validation.<br =
class=3D""><br class=3D"">Alternatively using the JWS/JWE "crit" =
(Critical) Header Parameter to<br class=3D"">signal<br class=3D"">the =
type/intent/profile/application of a JWT could achieve<br =
class=3D"">disambiguation<br class=3D"">even in validation of existing =
kinds of JWTs. The critical header lists<br class=3D"">other headers =
which must be understood and processed by the receiver and<br =
class=3D"">that the JWS/JWE is invalid if those listed aren't =
understood. So a new<br class=3D"">type/profile of JWT that uses the =
"crit" header would produce JWTs that<br class=3D"">would be rejected =
even by existing applications of JWT validation (that<br =
class=3D"">actually implement "crit" properly anyway).<br class=3D""><br =
class=3D"">The JWT BCP could suggest the use of "crit" in conjunction =
with a<br class=3D"">profile/application/type specific header. Or it =
could provide a bit more<br class=3D"">of<br class=3D"">a framework like =
defining a registering a new JOSE header "p" (strawman<br class=3D"">of =
p<br class=3D"">as a very short name for profile) and create a registry =
for its values.<br class=3D"">A<br class=3D"">JWT header using that =
approach might look like the following where the<br class=3D"">value<br =
class=3D"">1 is registered as some cool new JWT profile/application. The =
consumer<br class=3D"">of<br class=3D"">such a JWT would have to =
understand and process the "p" header, which<br class=3D"">would<br =
class=3D"">mean checking that it had the value expected.<br class=3D""><br=
 class=3D""> &nbsp;&nbsp;&nbsp;&nbsp;{<br class=3D""> =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"alg":"ES256",<br class=3D""> =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"crit":["p"],<br class=3D""> =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"p":1<br class=3D""> =
&nbsp;&nbsp;&nbsp;&nbsp;}<br class=3D""><br class=3D"">A JOSE compliant =
JWT validator would reject such a JWT even for an OAuth<br =
class=3D"">access token or OIDC id_token because the "p" header isn't =
known or<br class=3D"">understood but is marked as critical.<br =
class=3D""><br class=3D"">To me, that seems like an approach to =
preventing confusion that has more<br class=3D"">teeth than the "typ" =
header. Which is why I asked about it last week and<br class=3D"">am<br =
class=3D"">now bringing it to the list.<br class=3D""><br class=3D""><br =
class=3D""><br class=3D""><br class=3D""><br class=3D""><br class=3D""><br=
 class=3D""><br class=3D""><br class=3D""><br class=3D"">CONFIDENTIALITY =
NOTICE: This email may contain confidential and<br =
class=3D"">privileged<br class=3D"">material for the sole use of the =
intended recipient(s). Any review, use,<br class=3D"">distribution or =
disclosure by others is strictly prohibited. &nbsp;If you<br =
class=3D"">have<br class=3D"">received this communication in error, =
please notify the sender<br class=3D"">immediately<br class=3D"">by =
e-mail and delete the message and any file attachments from your<br =
class=3D"">computer. Thank you.<br =
class=3D"">_______________________________________________<br =
class=3D"">jose mailing list<br class=3D""><a =
href=3D"mailto:jose@ietf.org" class=3D"">jose@ietf.org</a><br =
class=3D""><a =
href=3D"https://urldefense.proofpoint.com/v2/url?u=3Dhttps-3A__www.ietf.or=
g_mailman_listinfo_jose&amp;d=3DDwICAg&amp;c=3DRoP1YumCXCgaWHvlZYR8PQcxBKC=
X5YTpkKY057SbK10&amp;r=3DJBm5biRrKugCH0FkITSeGJxPEivzjWwlNKe4C_lLIGk&amp;m=
=3D02yWnzzFGNlefgVregxSncXu0b9sbh5pTrtBfQsC52A&amp;s=3DeJ8QZBwe5AO-RDl_E16=
U1q_KpobaeSRUP4Cp2W-_jJU&amp;e=3D" =
class=3D"">https://urldefense.proofpoint.com/v2/url?u=3Dhttps-3A__www.ietf=
.org_mailman_listinfo_jose&amp;d=3DDwICAg&amp;c=3DRoP1YumCXCgaWHvlZYR8PQcx=
BKCX5YTpkKY057SbK10&amp;r=3DJBm5biRrKugCH0FkITSeGJxPEivzjWwlNKe4C_lLIGk&am=
p;m=3D02yWnzzFGNlefgVregxSncXu0b9sbh5pTrtBfQsC52A&amp;s=3DeJ8QZBwe5AO-RDl_=
E16U1q_KpobaeSRUP4Cp2W-_jJU&amp;e=3D</a> <br class=3D""><br =
class=3D""></blockquote></blockquote><br class=3D""><br class=3D""><br =
class=3D"">CONFIDENTIALITY NOTICE: This email may contain confidential =
and privileged<br class=3D"">material for the sole use of the intended =
recipient(s). Any review, use,<br class=3D"">distribution or disclosure =
by others is strictly prohibited. &nbsp;If you have<br class=3D"">received=
 this communication in error, please notify the sender immediately<br =
class=3D"">by e-mail and delete the message and any file attachments =
from your<br class=3D"">computer. Thank you.<br =
class=3D""></blockquote><br =
class=3D"">_______________________________________________<br =
class=3D"">jose mailing list<br class=3D""><a =
href=3D"mailto:jose@ietf.org" class=3D"">jose@ietf.org</a><br =
class=3D""><a =
href=3D"https://urldefense.proofpoint.com/v2/url?u=3Dhttps-3A__www.ietf.or=
g_mailman_listinfo_jose&amp;d=3DDwICAg&amp;c=3DRoP1YumCXCgaWHvlZYR8PQcxBKC=
X5YTpkKY057SbK10&amp;r=3DJBm5biRrKugCH0FkITSeGJxPEivzjWwlNKe4C_lLIGk&amp;m=
=3D02yWnzzFGNlefgVregxSncXu0b9sbh5pTrtBfQsC52A&amp;s=3DeJ8QZBwe5AO-RDl_E16=
U1q_KpobaeSRUP4Cp2W-_jJU&amp;e=3D" =
class=3D"">https://urldefense.proofpoint.com/v2/url?u=3Dhttps-3A__www.ietf=
.org_mailman_listinfo_jose&amp;d=3DDwICAg&amp;c=3DRoP1YumCXCgaWHvlZYR8PQcx=
BKCX5YTpkKY057SbK10&amp;r=3DJBm5biRrKugCH0FkITSeGJxPEivzjWwlNKe4C_lLIGk&am=
p;m=3D02yWnzzFGNlefgVregxSncXu0b9sbh5pTrtBfQsC52A&amp;s=3DeJ8QZBwe5AO-RDl_=
E16U1q_KpobaeSRUP4Cp2W-_jJU&amp;e=3D</a> <br =
class=3D""></div></div></blockquote></div><br =
class=3D""></div></div>_______________________________________________<br =
class=3D"">OAuth mailing list<br class=3D""><a =
href=3D"mailto:OAuth@ietf.org" class=3D"">OAuth@ietf.org</a><br =
class=3D"">https://www.ietf.org/mailman/listinfo/oauth<br =
class=3D""></div></blockquote></div><br class=3D""></div></body></html>=

--Apple-Mail=_88FC2852-5BA7-481E-92F6-396B90D2D313--

--f4030435c300b6252a05555368fd
Content-Type: application/pkcs7-signature; name="smime.p7s"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="smime.p7s"
Content-Description: S/MIME Cryptographic Signature

MIIRGwYJKoZIhvcNAQcCoIIRDDCCEQgCAQExDzANBglghkgBZQMEAgEFADALBgkqhkiG9w0BBwGg
gg4rMIIErzCCA5egAwIBAgIRAOAjyxUSg1OJrWFuelRnayEwDQYJKoZIhvcNAQELBQAwbzELMAkG
A1UEBhMCU0UxFDASBgNVBAoTC0FkZFRydXN0IEFCMSYwJAYDVQQLEx1BZGRUcnVzdCBFeHRlcm5h
bCBUVFAgTmV0d29yazEiMCAGA1UEAxMZQWRkVHJ1c3QgRXh0ZXJuYWwgQ0EgUm9vdDAeFw0xNDEy
MjIwMDAwMDBaFw0yMDA1MzAxMDQ4MzhaMIGbMQswCQYDVQQGEwJHQjEbMBkGA1UECBMSR3JlYXRl
ciBNYW5jaGVzdGVyMRAwDgYDVQQHEwdTYWxmb3JkMRowGAYDVQQKExFDT01PRE8gQ0EgTGltaXRl
ZDFBMD8GA1UEAxM4Q09NT0RPIFNIQS0yNTYgQ2xpZW50IEF1dGhlbnRpY2F0aW9uIGFuZCBT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ca48sUWxprz6fcp4kkLDgdq4dRb+XaQZzeuo83ZrmdyXABdDfcKrAe7
--f4030435c300b6252a05555368fd--


From nobody Thu Jul 27 14:41:06 2017
Return-Path: <nmccallu@redhat.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 E788D131E7B for <jose@ietfa.amsl.com>; Thu, 27 Jul 2017 14:40:55 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.199
X-Spam-Level: 
X-Spam-Status: No, score=-4.199 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HK_RANDOM_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-2.8, RCVD_IN_SORBS_SPAM=0.5, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=unavailable autolearn_force=no
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 KsHBTx6P-66K for <jose@ietfa.amsl.com>; Thu, 27 Jul 2017 14:40:42 -0700 (PDT)
Received: from mail-io0-f179.google.com (mail-io0-f179.google.com [209.85.223.179]) (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 B51A81321C9 for <jose@ietf.org>; Thu, 27 Jul 2017 14:40:34 -0700 (PDT)
Received: by mail-io0-f179.google.com with SMTP id m88so75261732iod.2 for <jose@ietf.org>; Thu, 27 Jul 2017 14:40:34 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=bTj0GreIjY2Z6CAFJXyQ4sMJxFw7xj2vJ6jiSeYE8pA=; b=gRpx1NJj6KNKp9+T9fp2Z5ui3GFc0ePfq+yrKpvyQVq0H/B4VheJE5iKLT48A7jacw QtFrMT/EVJleOqPjBl/mU8dCT4m96uL2z0svbC4sCHTrgB1IVkLtjt51MGOCF0l3e4Ir l10s8UAB0V8+USB7VqkdHatzBEaMaXSbChN8C3f3ZmwOIOBg/W5XJqlaMYdMbUg1wGGM 1pI1WweKPbPyzj6jqyvVgIwrS9LNK2GS5D4n/3tt6qntH0BI7vGZ8ILR7/TEqtdO2ITL OrIYPeAH+yXXYBx34JlCohlIDeWjptFNS22J7D9Fea0k92+UmnaeZ465sQs3pBGAlxWg EC3A==
X-Gm-Message-State: AIVw1104mR1esXde3sJIYQiafJiTgIpnIrY0g58nuyoVTlqbqdSNw4j3 FIpSHn7sz8GchDV4tbf8BwCNui+pA+Q0
X-Received: by 10.107.40.212 with SMTP id o203mr6559216ioo.181.1501191633862;  Thu, 27 Jul 2017 14:40:33 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.107.21.6 with HTTP; Thu, 27 Jul 2017 14:40:33 -0700 (PDT)
In-Reply-To: <91B882A0-48A0-4F08-8ADB-B675D9F1C08F@oracle.com>
References: <CA+k3eCRT_iuLHYrLxz+tf1MT9L9XG2jV0D0anC0h5w7A_ujEdQ@mail.gmail.com> <CAOASepOjYBYoKYEVvCLMzZgsdyGhr2LOB-dNqekxsKFm_gxixg@mail.gmail.com> <CA+k3eCS-Va2AvzRhWia_ETqSDYUMBOoi=sY3jg7TbJFhhuVnZA@mail.gmail.com> <CAOASepMaeS8WrCMb+WHV0FC2_w3f0KnY5XuDsuWJhAW2ayfryQ@mail.gmail.com> <91B882A0-48A0-4F08-8ADB-B675D9F1C08F@oracle.com>
From: Nathaniel McCallum <npmccallum@redhat.com>
Date: Thu, 27 Jul 2017 17:40:33 -0400
Message-ID: <CAOASepMVX_8rZY487bJjXDCraBS6eXu90D2_KMDgLp+L8CXkww@mail.gmail.com>
To: Phil Hunt <phil.hunt@oracle.com>
Cc: Brian Campbell <bcampbell@pingidentity.com>, oauth <oauth@ietf.org>,  "jose@ietf.org" <jose@ietf.org>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Archived-At: <https://mailarchive.ietf.org/arch/msg/jose/QXSQK6mTxSWEhjjgZk7LR0SIqi0>
Subject: Re: [jose] preventing confusion of one kind of JWT for another in JWT BCP
X-BeenThere: jose@ietf.org
X-Mailman-Version: 2.1.22
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: Thu, 27 Jul 2017 21:40:56 -0000

Right. And this is precisely what I find strange. We are attempting to
define the differentiation between state transitions without defining
the state transitions themselves.

I want to be clear that I think there is a real need here. But it
seems to me that this need is not well defined. So I'm not against it
in theory. I'm just against ambiguous standards.

On Thu, Jul 27, 2017 at 5:19 PM, Phil Hunt <phil.hunt@oracle.com> wrote:
> We have the use case in SECEVENTS where a logout event (e.g. OIDF
> backchannel logout) is extremely close to an ID_TOKEN.
>
> Older relying parties who are do not yet support logout could be tricked
> into accepting a logout assertion as an ID_TOKEN since they are too simil=
ar,
> and  because a valid ID_TOKEN parser is in theory allowed to ignore claim=
s
> it does not understand (e.g. =E2=80=9Cevents=E2=80=9D) - leading to a pos=
sible erroneous
> acceptance of the logout event AS and ID_TOKEN.
>
> Because of this the issue of distinguishing classes or types of JWTs
> emerged.
>
> We discussed a number of differentiators like =E2=80=9Caud=E2=80=9D, =E2=
=80=9Ctyp=E2=80=9D, =E2=80=9Ccrit", etc that
> would help.  But that really lead to the idea there there should be some
> best practices in the JWT BCP covering the issue(s).
>
> Phil
>
> Oracle Corporation, Identity Cloud Services Architect & Standards
> @independentid
> www.independentid.com
> phil.hunt@oracle.com
>
> On Jul 27, 2017, at 2:00 PM, Nathaniel McCallum <npmccallum@redhat.com>
> wrote:
>
> Even after reading the whole section, I still don't understand the
> problem. Yes, a class of attack could exist where an attacker
> substitutes a valid JWT from one security context into another
> context. But isn't this resolved by audience validation?
>
> On Thu, Jul 27, 2017 at 3:34 PM, Brian Campbell
> <bcampbell@pingidentity.com> wrote:
>
> The draft describes it in
> https://urldefense.proofpoint.com/v2/url?u=3Dhttps-3A__tools.ietf.org_htm=
l_draft-2Dsheffer-2Doauth-2Djwt-2Dbcp-2D01-23section-2D2.7&d=3DDwICAg&c=3DR=
oP1YumCXCgaWHvlZYR8PQcxBKCX5YTpkKY057SbK10&r=3DJBm5biRrKugCH0FkITSeGJxPEivz=
jWwlNKe4C_lLIGk&m=3D02yWnzzFGNlefgVregxSncXu0b9sbh5pTrtBfQsC52A&s=3D9GmPCou=
CMXE4enC48gfq0l0yc7ZlIxvEBAnQCVja_kY&e=3D
>
> On Thu, Jul 27, 2017 at 1:30 PM, Nathaniel McCallum <npmccallum@redhat.co=
m>
> wrote:
>
>
> What class of attacks is this trying to prevent? I frankly don't see a
> problem with confusing different types of JWT. But I may just be
> ignorant.
>
> On Thu, Jul 27, 2017 at 2:49 PM, Brian Campbell
> <bcampbell@pingidentity.com> wrote:
>
> During the first WG meeting last week I asked if use of the JOSE "crit"
> (Critical) Header Parameter had been considered as a recommendation for
> preventing confusion of one kind of JWT for another. Time was running
> short
> in the meeting so there wasn't much discussion and it was requested that
> I
> take the question to the list. And so here on the list is that.
>
> Section 3.9 of the JWT BCP draft now recommends explicit typing using
> the
> "typ" JWS/JWE header parameter but does concede that 'the use of
> explicit
> typing may not achieve disambiguation from existing kinds of JWTs, as
> the
> validation rules for existing kinds JWTs often do not use the "typ"
> header
> parameter value.'  And the recommendations for how to use the Type
> Header
> Parameter in JWT strongly suggest that it's not currently being used for
> any
> validation.
>
> Alternatively using the JWS/JWE "crit" (Critical) Header Parameter to
> signal
> the type/intent/profile/application of a JWT could achieve
> disambiguation
> even in validation of existing kinds of JWTs. The critical header lists
> other headers which must be understood and processed by the receiver and
> that the JWS/JWE is invalid if those listed aren't understood. So a new
> type/profile of JWT that uses the "crit" header would produce JWTs that
> would be rejected even by existing applications of JWT validation (that
> actually implement "crit" properly anyway).
>
> The JWT BCP could suggest the use of "crit" in conjunction with a
> profile/application/type specific header. Or it could provide a bit more
> of
> a framework like defining a registering a new JOSE header "p" (strawman
> of p
> as a very short name for profile) and create a registry for its values.
> A
> JWT header using that approach might look like the following where the
> value
> 1 is registered as some cool new JWT profile/application. The consumer
> of
> such a JWT would have to understand and process the "p" header, which
> would
> mean checking that it had the value expected.
>
>     {
>      "alg":"ES256",
>      "crit":["p"],
>      "p":1
>     }
>
> A JOSE compliant JWT validator would reject such a JWT even for an OAuth
> access token or OIDC id_token because the "p" header isn't known or
> understood but is marked as critical.
>
> To me, that seems like an approach to preventing confusion that has more
> teeth than the "typ" header. Which is why I asked about it last week and
> am
> now bringing it to the list.
>
>
>
>
>
>
>
>
>
>
> CONFIDENTIALITY NOTICE: This email may contain confidential and
> privileged
> material for the sole use of the intended recipient(s). Any review, use,
> distribution or disclosure by others is strictly prohibited.  If you
> have
> received this communication in error, please notify the sender
> immediately
> by e-mail and delete the message and any file attachments from your
> computer. Thank you.
> _______________________________________________
> jose mailing list
> jose@ietf.org
> https://urldefense.proofpoint.com/v2/url?u=3Dhttps-3A__www.ietf.org_mailm=
an_listinfo_jose&d=3DDwICAg&c=3DRoP1YumCXCgaWHvlZYR8PQcxBKCX5YTpkKY057SbK10=
&r=3DJBm5biRrKugCH0FkITSeGJxPEivzjWwlNKe4C_lLIGk&m=3D02yWnzzFGNlefgVregxSnc=
Xu0b9sbh5pTrtBfQsC52A&s=3DeJ8QZBwe5AO-RDl_E16U1q_KpobaeSRUP4Cp2W-_jJU&e=3D
>
>
>
>
> CONFIDENTIALITY NOTICE: This email may contain confidential and privilege=
d
> material for the sole use of the intended recipient(s). Any review, use,
> distribution or disclosure by others is strictly prohibited.  If you have
> received this communication in error, please notify the sender immediatel=
y
> by e-mail and delete the message and any file attachments from your
> computer. Thank you.
>
>
> _______________________________________________
> jose mailing list
> jose@ietf.org
> https://urldefense.proofpoint.com/v2/url?u=3Dhttps-3A__www.ietf.org_mailm=
an_listinfo_jose&d=3DDwICAg&c=3DRoP1YumCXCgaWHvlZYR8PQcxBKCX5YTpkKY057SbK10=
&r=3DJBm5biRrKugCH0FkITSeGJxPEivzjWwlNKe4C_lLIGk&m=3D02yWnzzFGNlefgVregxSnc=
Xu0b9sbh5pTrtBfQsC52A&s=3DeJ8QZBwe5AO-RDl_E16U1q_KpobaeSRUP4Cp2W-_jJU&e=3D
>
>
>
> _______________________________________________
> jose mailing list
> jose@ietf.org
> https://www.ietf.org/mailman/listinfo/jose
>


From nobody Thu Jul 27 15:00:01 2017
Return-Path: <bcampbell@pingidentity.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 557171321D7 for <jose@ietfa.amsl.com>; Thu, 27 Jul 2017 14:59:59 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.999
X-Spam-Level: 
X-Spam-Status: No, score=-1.999 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=pingidentity.com
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 ymfkNUdaLvm4 for <jose@ietfa.amsl.com>; Thu, 27 Jul 2017 14:59:56 -0700 (PDT)
Received: from mail-pf0-x233.google.com (mail-pf0-x233.google.com [IPv6:2607:f8b0:400e:c00::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 CFF4C1321D0 for <jose@ietf.org>; Thu, 27 Jul 2017 14:59:56 -0700 (PDT)
Received: by mail-pf0-x233.google.com with SMTP id e75so10087224pfj.2 for <jose@ietf.org>; Thu, 27 Jul 2017 14:59:56 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pingidentity.com; s=gmail; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=5+8ihVdfpE82C+K9989j7igeQWSH9Y49ZkzM6qwHd6E=; b=i0BcDjDjEIuJrzjv+Ynp0nK46UO66NdNzgV+IspqDxjrUJ72ut60mL1sUZOtbLD/K3 13FlVWDtxx/VILXYBVnwOVQwD5Y51dy4e3XJRnqdYEvpKLprPA9fxpFGQduQayAolXX3 MNOFLSrNNxMkUf6YHzuqovB7J8RiAWouu6ZmQ=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=5+8ihVdfpE82C+K9989j7igeQWSH9Y49ZkzM6qwHd6E=; b=qgU/ZLQKX+znD3fuMjtzyd9ohqTHNGriCthLCwMtG0vjIGvD4O/uycwbOOVp2EZmqF 9LcfRgZwRYoOAdANjIw5C1Uf7cZr382NglP1Ia15LK2pqwUZrzfIHVeJUBa7b3eUbIcD ++KsIU6jynJAl9HHAO9aJAFaxnVYG8SyI8xAjg8ITME0JBurXLEkDvqrCcZOCqTC3AVy sY0yLfGVahXT4XW/q6C8Lx2nkdF8hmTFNNMN7AIaKoTL1J4gnHkQb37WfrrjsJHsyXG3 BHrVWcTossHdyTPWr6/7sbIwgSq4jeYJqUhmFdrQO7wPwuKLBHYujREpNejz5zD4Vpk3 3CWg==
X-Gm-Message-State: AIVw111qPT9i2IARYeIoYvCm+k5h4HRxDOOeZUGKaLUhO2MtKD3d2dqw fOL7gjqvV5pcxChT1uf2XLplLvjk4LciNRsaIVPemnsu/YWt+p+HydVHDz8cUTbWVKvrXd6b3A4 pI1c=
X-Received: by 10.84.167.230 with SMTP id i35mr5817268plg.181.1501192796316; Thu, 27 Jul 2017 14:59:56 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.100.145.87 with HTTP; Thu, 27 Jul 2017 14:59:25 -0700 (PDT)
In-Reply-To: <CAD9ie-sM-FrVxZKrNLk91Nfr8kWzZgZ6_o=yLhyOYx=GLB34fw@mail.gmail.com>
References: <CA+k3eCRT_iuLHYrLxz+tf1MT9L9XG2jV0D0anC0h5w7A_ujEdQ@mail.gmail.com> <CAD9ie-sM-FrVxZKrNLk91Nfr8kWzZgZ6_o=yLhyOYx=GLB34fw@mail.gmail.com>
From: Brian Campbell <bcampbell@pingidentity.com>
Date: Thu, 27 Jul 2017 15:59:25 -0600
Message-ID: <CA+k3eCQz3eG8vNoueQTVnVjfMV0DfZGiK-iSrApmEMaGxkqz6w@mail.gmail.com>
To: Dick Hardt <dick.hardt@gmail.com>
Cc: oauth <oauth@ietf.org>, "jose@ietf.org" <jose@ietf.org>
Content-Type: multipart/alternative; boundary="94eb2c145cd65d468a055553af8b"
Archived-At: <https://mailarchive.ietf.org/arch/msg/jose/ZUfZcXs5Y7_faF778Wx4-GTS_qk>
Subject: Re: [jose] preventing confusion of one kind of JWT for another in JWT BCP
X-BeenThere: jose@ietf.org
X-Mailman-Version: 2.1.22
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: Thu, 27 Jul 2017 21:59:59 -0000

--94eb2c145cd65d468a055553af8b
Content-Type: text/plain; charset="UTF-8"

What other JWTs are there?

All JWTs use JWS and/or JWE. So a JWT is a JOSE JWT by definition. JWT
requires 'crit' processing by virtue of using JWS and JWE for signing and
encryption. The extent to which that processing is actually implemented is
a different and fair question but it's normative requirement per spec and
implementations that don't would be non-compliant.

The byte usage actually is pretty similar depending on the the values used
(admittedly because I chose very compact names/values).  Compare to
secevent, for example,

   "crit":["p"],"p":1
   "typ":"secevent+jwt"


On Thu, Jul 27, 2017 at 3:29 PM, Dick Hardt <dick.hardt@gmail.com> wrote:

> Brian: I did not think that 'crit' processing is required in JWT
> https://tools.ietf.org/html/rfc7519
>
> We have two goals:
>
> Preventing new JWT profiles from being confused with older JWTs, which
> 'typ' solves (as does your proposal of 'crit' and 'p', but requires more
> bytes)
>
> Preventing existing JWT implementations from being confused with new JWT
> profiles. 'crit' can solve that for JOSE JWTs, but not other JWTs.
>
>
>
> On Thu, Jul 27, 2017 at 7:49 PM, Brian Campbell <
> bcampbell@pingidentity.com> wrote:
>
>> During the first WG meeting last week
>> <https://datatracker.ietf.org/doc/minutes-99-oauth/> I asked if use of
>> the JOSE "crit" (Critical) Header Parameter had been considered as a
>> recommendation for preventing confusion of one kind of JWT for another.
>> Time was running short in the meeting so there wasn't much discussion and
>> it was requested that I take the question to the list. And so here on the
>> list is that.
>>
>> Section 3.9
>> <https://tools.ietf.org/html/draft-sheffer-oauth-jwt-bcp-01#section-3.9>
>> of the JWT BCP draft now recommends explicit typing using the "typ" JWS/JWE
>> header parameter but does concede that 'the use of explicit typing may not
>> achieve disambiguation from existing kinds of JWTs, as the validation rules
>> for existing kinds JWTs often do not use the "typ" header parameter
>> value.'  And the recommendations for how to use the Type Header
>> Parameter in JWT <https://tools.ietf.org/html/rfc7519#section-5.1>
>> strongly suggest that it's not currently being used for any validation.
>>
>> Alternatively using the JWS/JWE "crit" (Critical) Header Parameter
>> <https://tools.ietf.org/html/rfc7515#section-4.1.11> to signal the
>> type/intent/profile/application of a JWT could achieve disambiguation
>> even in validation of existing kinds of JWTs. The critical header lists
>> other headers which must be understood and processed by the receiver and
>> that the JWS/JWE is invalid if those listed aren't understood. So a new
>> type/profile of JWT that uses the "crit" header would produce JWTs that
>> would be rejected even by existing applications of JWT validation (that
>> actually implement "crit" properly anyway).
>>
>> The JWT BCP could suggest the use of "crit" in conjunction with a
>> profile/application/type specific header. Or it could provide a bit more of
>> a framework like defining a registering a new JOSE header "p" (strawman of
>> p as a very short name for profile) and create a registry for its values. A
>> JWT header using that approach might look like the following where the
>> value 1 is registered as some cool new JWT profile/application. The
>> consumer of such a JWT would have to understand and process the "p" header,
>> which would mean checking that it had the value expected.
>>
>>      {
>>       "alg":"ES256",
>>       "crit":["p"],
>>       "p":1
>>      }
>>
>> A JOSE compliant JWT validator would reject such a JWT even for an OAuth
>> access token or OIDC id_token because the "p" header isn't known or
>> understood but is marked as critical.
>>
>> To me, that seems like an approach to preventing confusion that has more
>> teeth than the "typ" header. Which is why I asked about it last week and am
>> now bringing it to the list.
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> *CONFIDENTIALITY NOTICE: This email may contain confidential and
>> privileged material for the sole use of the intended recipient(s). Any
>> review, use, distribution or disclosure by others is strictly prohibited.
>> If you have received this communication in error, please notify the sender
>> immediately by e-mail and delete the message and any file attachments from
>> your computer. Thank you.*
>> _______________________________________________
>> jose mailing list
>> jose@ietf.org
>> https://www.ietf.org/mailman/listinfo/jose
>>
>>
>
>
> --
> Subscribe to the HARDTWARE <http://hardtware.com/> mail list to learn
> about projects I am working on!
>

-- 
*CONFIDENTIALITY NOTICE: This email may contain confidential and privileged 
material for the sole use of the intended recipient(s). Any review, use, 
distribution or disclosure by others is strictly prohibited.  If you have 
received this communication in error, please notify the sender immediately 
by e-mail and delete the message and any file attachments from your 
computer. Thank you.*

--94eb2c145cd65d468a055553af8b
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div>What other JWTs are there?<br>=C2=A0<br>All JWTs use =
JWS and/or JWE. So a JWT is a JOSE JWT by definition. JWT requires  &#39;cr=
it&#39; processing by virtue of using JWS and JWE for signing and encryptio=
n. The extent to which that processing is actually implemented is a differe=
nt and fair question but it&#39;s normative requirement per spec and implem=
entations that don&#39;t would be non-compliant. <br><br></div>The byte usa=
ge actually is pretty similar depending on the the values used (admittedly =
because I chose very compact names/values).=C2=A0 Compare to secevent, for =
example, <br><div><div><br>=C2=A0=C2=A0 &quot;crit&quot;:[&quot;p&quot;],&q=
uot;p&quot;:1<br>=C2=A0=C2=A0 &quot;typ&quot;:&quot;secevent+jwt&quot; <br>=
<br>=C2=A0<br><div><div class=3D"gmail_extra"><div class=3D"gmail_quote">On=
 Thu, Jul 27, 2017 at 3:29 PM, Dick Hardt <span dir=3D"ltr">&lt;<a href=3D"=
mailto:dick.hardt@gmail.com" target=3D"_blank">dick.hardt@gmail.com</a>&gt;=
</span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px=
 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div di=
r=3D"ltr">Brian: I did not think that &#39;crit&#39; processing is required=
 in JWT=C2=A0<a href=3D"https://tools.ietf.org/html/rfc7519" target=3D"_bla=
nk">https://tools.ietf.org/<wbr>html/rfc7519</a><div><br></div><div>We have=
 two goals:=C2=A0</div><div><br></div><div>Preventing new JWT profiles from=
 being confused with older JWTs, which &#39;typ&#39; solves (as does your p=
roposal of &#39;crit&#39; and &#39;p&#39;, but requires more bytes)</div><d=
iv><br></div><div>Preventing existing JWT implementations from being confus=
ed with new JWT profiles. &#39;crit&#39; can solve that for JOSE JWTs, but =
not other JWTs.</div><div><br></div><div><br></div></div><div class=3D"gmai=
l_extra"><br><div class=3D"gmail_quote"><div><div class=3D"gmail-h5">On Thu=
, Jul 27, 2017 at 7:49 PM, Brian Campbell <span dir=3D"ltr">&lt;<a href=3D"=
mailto:bcampbell@pingidentity.com" target=3D"_blank">bcampbell@pingidentity=
.com</a>&gt;</span> wrote:<br></div></div><blockquote class=3D"gmail_quote"=
 style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);p=
adding-left:1ex"><div><div class=3D"gmail-h5"><div dir=3D"ltr"><div><div><d=
iv><div><div>During the <a href=3D"https://datatracker.ietf.org/doc/minutes=
-99-oauth/" target=3D"_blank">first WG meeting last week</a> I asked if use=
 of the JOSE &quot;crit&quot; (Critical) Header Parameter had been consider=
ed as a recommendation for preventing confusion of one kind of JWT for anot=
her. Time was running short in the meeting so there wasn&#39;t much discuss=
ion and it was requested that I take the question to the list. And so here =
on the list is that. <br><br></div><a href=3D"https://tools.ietf.org/html/d=
raft-sheffer-oauth-jwt-bcp-01#section-3.9" target=3D"_blank">Section 3.9</a=
> of the JWT BCP draft now recommends explicit typing using the &quot;typ&q=
uot; JWS/JWE header parameter but does concede that &#39;the use of explici=
t typing may not achieve disambiguation from existing kinds of JWTs, as the=
 validation rules for existing kinds JWTs often do not use the &quot;typ&qu=
ot; header parameter value.&#39;=C2=A0 And the recommendations for how to u=
se the <a href=3D"https://tools.ietf.org/html/rfc7519#section-5.1" target=
=3D"_blank">Type Header Parameter in JWT</a> strongly suggest that it&#39;s=
 not currently being used for any validation. <br><br></div>Alternatively u=
sing the JWS/JWE <a href=3D"https://tools.ietf.org/html/rfc7515#section-4.1=
.11" target=3D"_blank">&quot;crit&quot; (Critical) Header Parameter</a> to =
signal the type/intent/profile/applicatio<wbr>n of a JWT could achieve disa=
mbiguation even in validation of existing kinds of JWTs. The critical heade=
r lists other headers which must be understood and processed by the receive=
r and that the JWS/JWE is invalid if those listed aren&#39;t understood. So=
 a new type/profile of JWT that uses the &quot;crit&quot; header would prod=
uce JWTs that would be rejected even by existing applications of JWT valida=
tion (that actually implement &quot;crit&quot; properly anyway).<br><br></d=
iv>The JWT BCP could suggest the use of &quot;crit&quot; in conjunction wit=
h a profile/application/type specific header. Or it could provide a bit mor=
e of a framework like defining a registering a new JOSE header &quot;p&quot=
; (strawman of p as a very short name for profile) and create a registry fo=
r its values. A JWT header using that approach might look like the followin=
g where the value 1 is registered as some cool new JWT profile/application.=
 The consumer of such a JWT would have to understand and process the &quot;=
p&quot; header, which would mean checking that it had the value expected. <=
br>=C2=A0<br>=C2=A0=C2=A0=C2=A0=C2=A0 {<br>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 &=
quot;alg&quot;:&quot;ES256&quot;,<br>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 &quot;c=
rit&quot;:[&quot;p&quot;],<br>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 &quot;p&quot;:=
1<br>=C2=A0=C2=A0=C2=A0=C2=A0 }<br><br></div>A JOSE compliant JWT validator=
 would reject such a JWT even for an OAuth access token or OIDC id_token be=
cause the &quot;p&quot; header isn&#39;t known or understood but is marked =
as critical. <br><br></div>To me, that seems like an approach to preventing=
 confusion that has more teeth than the &quot;typ&quot; header. Which is wh=
y I asked about it last week and am now bringing it to the list. <br><div><=
div><br><br><div><div><div><div><br><br><div><br><br><br><br><br></div></di=
v></div></div></div></div></div></div>

<br>
</div></div><span class=3D"gmail-"><i style=3D"margin:0px;padding:0px;borde=
r-width:0px;border-style:none;border-color:currentcolor;outline:0px none;ve=
rtical-align:baseline;background:rgb(255,255,255) none repeat scroll 0% 0%;=
font-family:proxima-nova-zendesk,system-ui,-apple-system,system-ui,&quot;Se=
goe UI&quot;,Roboto,Oxygen-Sans,Ubuntu,Cantarell,&quot;Helvetica Neue&quot;=
,Arial,sans-serif;color:rgb(85,85,85)"><span style=3D"margin:0px;padding:0p=
x;border-width:0px;border-style:none;border-color:currentcolor;outline:0px =
none;vertical-align:baseline;background:transparent none repeat scroll 0% 0=
%;font-family:proxima-nova-zendesk,system-ui,-apple-system,BlinkMacSystemFo=
nt,&quot;Segoe UI&quot;,Roboto,Oxygen-Sans,Ubuntu,Cantarell,&quot;Helvetica=
 Neue&quot;,Arial,sans-serif;font-weight:600"><font size=3D"2">CONFIDENTIAL=
ITY NOTICE: This email may contain confidential and privileged material for=
 the sole use of the intended recipient(s). Any review, use, distribution o=
r disclosure by others is strictly prohibited.=C2=A0 If you have received t=
his communication in error, please notify the sender immediately by e-mail =
and delete the message and any file attachments from your computer. Thank y=
ou.</font></span></i><br>______________________________<wbr>_______________=
__<br>
jose mailing list<br>
<a href=3D"mailto:jose@ietf.org" target=3D"_blank">jose@ietf.org</a><br>
</span><a href=3D"https://www.ietf.org/mailman/listinfo/jose" rel=3D"norefe=
rrer" target=3D"_blank">https://www.ietf.org/mailman/l<wbr>istinfo/jose</a>=
<br>
<br></blockquote></div><span class=3D"gmail-"><br><br clear=3D"all"><div><b=
r></div>-- <br><div class=3D"gmail-m_1938848916206708995gmail_signature"><d=
iv dir=3D"ltr"><div><div dir=3D"ltr"><div dir=3D"ltr"><div>Subscribe to the=
 <a href=3D"http://hardtware.com/" target=3D"_blank">HARDTWARE</a> mail lis=
t to learn about projects I am working on!</div></div></div></div></div></d=
iv>
</span></div>
</blockquote></div><br></div></div></div></div></div>

<br>
<i style=3D"margin:0px;padding:0px;border:0px;outline:0px;vertical-align:ba=
seline;background:rgb(255,255,255);font-family:proxima-nova-zendesk,system-=
ui,-apple-system,system-ui,&quot;Segoe UI&quot;,Roboto,Oxygen-Sans,Ubuntu,C=
antarell,&quot;Helvetica Neue&quot;,Arial,sans-serif;color:rgb(85,85,85)"><=
span style=3D"margin:0px;padding:0px;border:0px;outline:0px;vertical-align:=
baseline;background:transparent;font-family:proxima-nova-zendesk,system-ui,=
-apple-system,BlinkMacSystemFont,&quot;Segoe UI&quot;,Roboto,Oxygen-Sans,Ub=
untu,Cantarell,&quot;Helvetica Neue&quot;,Arial,sans-serif;font-weight:600"=
><font size=3D"2">CONFIDENTIALITY NOTICE: This email may contain confidenti=
al and privileged material for the sole use of the intended recipient(s). A=
ny review, use, distribution or disclosure by others is strictly prohibited=
.=C2=A0 If you have received this communication in error, please notify the=
 sender immediately by e-mail and delete the message and any file attachmen=
ts from your computer. Thank you.</font></span></i>
--94eb2c145cd65d468a055553af8b--


From nobody Thu Jul 27 15:10:47 2017
Return-Path: <bcampbell@pingidentity.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 13CA5131E5E for <jose@ietfa.amsl.com>; Thu, 27 Jul 2017 15:10:40 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.999
X-Spam-Level: 
X-Spam-Status: No, score=-1.999 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=unavailable autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=pingidentity.com
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 ufk-y_maqj0x for <jose@ietfa.amsl.com>; Thu, 27 Jul 2017 15:10:35 -0700 (PDT)
Received: from mail-pg0-x232.google.com (mail-pg0-x232.google.com [IPv6:2607:f8b0:400e:c05::232]) (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 1F358131CF3 for <jose@ietf.org>; Thu, 27 Jul 2017 15:10:35 -0700 (PDT)
Received: by mail-pg0-x232.google.com with SMTP id v190so103143705pgv.2 for <jose@ietf.org>; Thu, 27 Jul 2017 15:10:35 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pingidentity.com; s=gmail; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=AcxLqZz/P4+/aAq9qy4XRTUmORo0OGhpqeDbgsW/s8E=; b=bjl8i45/6duFsOUg3VjzRI7evGq1ULwCNAlLgwll6oquNpBIJhPNsJsVLLAt0QbmQm Fx3ostUvswKcSgecVsFl846p/PfYTjDkd4+L+HcbtoWGUP6A38Nua+uIrJpFCDJ9GCie cCaeNab659lDmLJY1AflujGxSCHDnv0fjuG2c=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=AcxLqZz/P4+/aAq9qy4XRTUmORo0OGhpqeDbgsW/s8E=; b=fTxhr2FOaeywFejTEy5PUzo45KBnR0nIMWbbU8rLbQLDz/AFU58+Nnu1b2Jwy01pyN U+QoK4mJzAXlhljev+vmiqNIbSeu1LVUOnpCfuiF9MUtNSptfEknAa2IjZbI7LjB2Lzg U5FErDcupVO22EDmKgbOesQdvJVh4SHsdp07ZwAW1q1rcNOPt/5K97aNEa8Oo3Hw9o7f Igmy4wPewxBUPU2375FcF6qEYsTjWHUMxboHeNL4rT9Obs2JafLqbIg/gSC+b2i0mR0N 4OMpLVrfGr4+OLhWPX/FkQ7SdIZbmvCNk9zubT9MZ8GvsEsnnaBJDJjgyV3qpCXRdDpf A3jg==
X-Gm-Message-State: AIVw112F4tArM/PUECtvy3/4t2pRCurdFAIYOZtYIxN1+RRrBRniyhFX MQRhynKSznQHaDU7nKDBof1I7M/bGRJt3bYF8faFicC6QwvmLaBDeO4Dy9drBkhTCWOA4NQlQcD Ibiyfaw==
X-Received: by 10.99.117.68 with SMTP id f4mr5397586pgn.56.1501193434456; Thu, 27 Jul 2017 15:10:34 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.100.145.87 with HTTP; Thu, 27 Jul 2017 15:10:03 -0700 (PDT)
In-Reply-To: <7041D358-E4C8-4D8C-BD94-0D65C238B449@ve7jtb.com>
References: <CA+k3eCRT_iuLHYrLxz+tf1MT9L9XG2jV0D0anC0h5w7A_ujEdQ@mail.gmail.com> <CAOASepOjYBYoKYEVvCLMzZgsdyGhr2LOB-dNqekxsKFm_gxixg@mail.gmail.com> <CA+k3eCS-Va2AvzRhWia_ETqSDYUMBOoi=sY3jg7TbJFhhuVnZA@mail.gmail.com> <CAOASepMaeS8WrCMb+WHV0FC2_w3f0KnY5XuDsuWJhAW2ayfryQ@mail.gmail.com> <91B882A0-48A0-4F08-8ADB-B675D9F1C08F@oracle.com> <7041D358-E4C8-4D8C-BD94-0D65C238B449@ve7jtb.com>
From: Brian Campbell <bcampbell@pingidentity.com>
Date: Thu, 27 Jul 2017 16:10:03 -0600
Message-ID: <CA+k3eCSnj=3a9OiUSy=_5D4K-Er75FKxhcmPgzV6BhjcUaLERA@mail.gmail.com>
To: John Bradley <ve7jtb@ve7jtb.com>
Cc: Phil Hunt <phil.hunt@oracle.com>, Nathaniel McCallum <npmccallum@redhat.com>, oauth <oauth@ietf.org>,  "jose@ietf.org" <jose@ietf.org>
Content-Type: multipart/alternative; boundary="f403045cdcc4668e18055553d548"
Archived-At: <https://mailarchive.ietf.org/arch/msg/jose/HHrzdeVZwH2GwItsCDdaO3xU-GQ>
Subject: Re: [jose] [OAUTH-WG] preventing confusion of one kind of JWT for another in JWT BCP
X-BeenThere: jose@ietf.org
X-Mailman-Version: 2.1.22
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: Thu, 27 Jul 2017 22:10:40 -0000

--f403045cdcc4668e18055553d548
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

I wouldn't disagree that the issue with Connect is overstated sometimes.
And it's a non-issue with sec event due to the "nonce" claim (as you point
out) as well as the omission of the "exp" claim. Assuming correct
validation anyway.

The BCP draft suggests explicit typing to prevent Cross-JWT Confusion more
generally (not just sec events and id tokens). I was wondering if some use
of "crit" might accomplish the same thing but also cover the case of
existing JWT implementations being confused with new JWT profiles.

On Thu, Jul 27, 2017 at 3:40 PM, John Bradley <ve7jtb@ve7jtb.com> wrote:

> Not that I am against the general desire for JWT not to be confused, but
> the attack surface for someone to take a sec event from one context and
> replay it as a id_token to login is very small and if the client is
> correctly configured would not work as it is now.
>
> The only way you could replay the sec event JWT is via the implicit flow.
>   The other flows would require a malicious AS and at that point you have
> bigger problems with a compromised token endpoint.
>
> If you were to create a implicit response with the sec event token that
> has the correct issuer and aud, connect requires that nonce value from th=
e
> request be present in the id_token.   This would require that the attacke=
r
> somehow get the AS to put not only the claim but the correct value from t=
he
> request into the token.
>
> All in all I think that it is more likely (not 100% I admit) that a clien=
t
> will do that rather than checking the typ or a new crit JWT header
> parameter.
>
> I am all for a general solution for this but I think the issue with
> Connect is overstated sometimes.
>
> John B.
>
>
> On Jul 27, 2017, at 5:19 PM, Phil Hunt <phil.hunt@oracle.com> wrote:
>
> We have the use case in SECEVENTS where a logout event (e.g. OIDF
> backchannel logout) is extremely close to an ID_TOKEN.
>
> Older relying parties who are do not yet support logout could be tricked
> into accepting a logout assertion as an ID_TOKEN since they are too
> similar, and  because a valid ID_TOKEN parser is in theory allowed to
> ignore claims it does not understand (e.g. =E2=80=9Cevents=E2=80=9D) - le=
ading to a
> possible erroneous acceptance of the logout event AS and ID_TOKEN.
>
> Because of this the issue of distinguishing classes or types of JWTs
> emerged.
>
> We discussed a number of differentiators like =E2=80=9Caud=E2=80=9D, =E2=
=80=9Ctyp=E2=80=9D, =E2=80=9Ccrit", etc
> that would help.  But that really lead to the idea there there should be
> some best practices in the JWT BCP covering the issue(s).
>
> Phil
>
> Oracle Corporation, Identity Cloud Services Architect & Standards
> @independentid
> www.independentid.com
> phil.hunt@oracle.com
>
> On Jul 27, 2017, at 2:00 PM, Nathaniel McCallum <npmccallum@redhat.com>
> wrote:
>
> Even after reading the whole section, I still don't understand the
> problem. Yes, a class of attack could exist where an attacker
> substitutes a valid JWT from one security context into another
> context. But isn't this resolved by audience validation?
>
> On Thu, Jul 27, 2017 at 3:34 PM, Brian Campbell
> <bcampbell@pingidentity.com> wrote:
>
> The draft describes it in
> https://urldefense.proofpoint.com/v2/url?u=3Dhttps-3A__tools.
> ietf.org_html_draft-2Dsheffer-2Doauth-2Djwt-2Dbcp-2D01-
> 23section-2D2.7&d=3DDwICAg&c=3DRoP1YumCXCgaWHvlZYR8PQcxBKCX5YTpkKY057SbK1=
0&r=3D
> JBm5biRrKugCH0FkITSeGJxPEivzjWwlNKe4C_lLIGk&m=3D
> 02yWnzzFGNlefgVregxSncXu0b9sbh5pTrtBfQsC52A&s=3D
> 9GmPCouCMXE4enC48gfq0l0yc7ZlIxvEBAnQCVja_kY&e=3D
>
> On Thu, Jul 27, 2017 at 1:30 PM, Nathaniel McCallum <npmccallum@redhat.co=
m
> >
> wrote:
>
>
> What class of attacks is this trying to prevent? I frankly don't see a
> problem with confusing different types of JWT. But I may just be
> ignorant.
>
> On Thu, Jul 27, 2017 at 2:49 PM, Brian Campbell
> <bcampbell@pingidentity.com> wrote:
>
> During the first WG meeting last week I asked if use of the JOSE "crit"
> (Critical) Header Parameter had been considered as a recommendation for
> preventing confusion of one kind of JWT for another. Time was running
> short
> in the meeting so there wasn't much discussion and it was requested that
> I
> take the question to the list. And so here on the list is that.
>
> Section 3.9 of the JWT BCP draft now recommends explicit typing using
> the
> "typ" JWS/JWE header parameter but does concede that 'the use of
> explicit
> typing may not achieve disambiguation from existing kinds of JWTs, as
> the
> validation rules for existing kinds JWTs often do not use the "typ"
> header
> parameter value.'  And the recommendations for how to use the Type
> Header
> Parameter in JWT strongly suggest that it's not currently being used for
> any
> validation.
>
> Alternatively using the JWS/JWE "crit" (Critical) Header Parameter to
> signal
> the type/intent/profile/application of a JWT could achieve
> disambiguation
> even in validation of existing kinds of JWTs. The critical header lists
> other headers which must be understood and processed by the receiver and
> that the JWS/JWE is invalid if those listed aren't understood. So a new
> type/profile of JWT that uses the "crit" header would produce JWTs that
> would be rejected even by existing applications of JWT validation (that
> actually implement "crit" properly anyway).
>
> The JWT BCP could suggest the use of "crit" in conjunction with a
> profile/application/type specific header. Or it could provide a bit more
> of
> a framework like defining a registering a new JOSE header "p" (strawman
> of p
> as a very short name for profile) and create a registry for its values.
> A
> JWT header using that approach might look like the following where the
> value
> 1 is registered as some cool new JWT profile/application. The consumer
> of
> such a JWT would have to understand and process the "p" header, which
> would
> mean checking that it had the value expected.
>
>     {
>      "alg":"ES256",
>      "crit":["p"],
>      "p":1
>     }
>
> A JOSE compliant JWT validator would reject such a JWT even for an OAuth
> access token or OIDC id_token because the "p" header isn't known or
> understood but is marked as critical.
>
> To me, that seems like an approach to preventing confusion that has more
> teeth than the "typ" header. Which is why I asked about it last week and
> am
> now bringing it to the list.
>
>
>
>
>
>
>
>
>
>
> CONFIDENTIALITY NOTICE: This email may contain confidential and
> privileged
> material for the sole use of the intended recipient(s). Any review, use,
> distribution or disclosure by others is strictly prohibited.  If you
> have
> received this communication in error, please notify the sender
> immediately
> by e-mail and delete the message and any file attachments from your
> computer. Thank you.
> _______________________________________________
> jose mailing list
> jose@ietf.org
> https://urldefense.proofpoint.com/v2/url?u=3Dhttps-3A__www.
> ietf.org_mailman_listinfo_jose&d=3DDwICAg&c=3DRoP1YumCXCgaWHvlZYR8PQcxBKC=
X5Y
> TpkKY057SbK10&r=3DJBm5biRrKugCH0FkITSeGJxPEivzjWwlNKe4C_lLIGk&m=3D
> 02yWnzzFGNlefgVregxSncXu0b9sbh5pTrtBfQsC52A&s=3DeJ8QZBwe5AO-
> RDl_E16U1q_KpobaeSRUP4Cp2W-_jJU&e=3D
>
>
>
>
> CONFIDENTIALITY NOTICE: This email may contain confidential and privilege=
d
> material for the sole use of the intended recipient(s). Any review, use,
> distribution or disclosure by others is strictly prohibited.  If you have
> received this communication in error, please notify the sender immediatel=
y
> by e-mail and delete the message and any file attachments from your
> computer. Thank you.
>
>
> _______________________________________________
> jose mailing list
> jose@ietf.org
> https://urldefense.proofpoint.com/v2/url?u=3Dhttps-3A__www.
> ietf.org_mailman_listinfo_jose&d=3DDwICAg&c=3DRoP1YumCXCgaWHvlZYR8PQcxBKC=
X5Y
> TpkKY057SbK10&r=3DJBm5biRrKugCH0FkITSeGJxPEivzjWwlNKe4C_lLIGk&m=3D
> 02yWnzzFGNlefgVregxSncXu0b9sbh5pTrtBfQsC52A&s=3DeJ8QZBwe5AO-
> RDl_E16U1q_KpobaeSRUP4Cp2W-_jJU&e=3D
>
>
> _______________________________________________
> OAuth mailing list
> OAuth@ietf.org
> https://www.ietf.org/mailman/listinfo/oauth
>
>
>
> _______________________________________________
> OAuth mailing list
> OAuth@ietf.org
> https://www.ietf.org/mailman/listinfo/oauth
>
>

--=20
*CONFIDENTIALITY NOTICE: This email may contain confidential and privileged=
=20
material for the sole use of the intended recipient(s). Any review, use,=20
distribution or disclosure by others is strictly prohibited.  If you have=
=20
received this communication in error, please notify the sender immediately=
=20
by e-mail and delete the message and any file attachments from your=20
computer. Thank you.*

--f403045cdcc4668e18055553d548
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div>I wouldn&#39;t disagree that the  issue with Connect =
is overstated sometimes. And it&#39;s a non-issue with sec event due to the=
 &quot;nonce&quot; claim (as you point out) as well as the omission of the =
&quot;exp&quot; claim. Assuming correct validation anyway. <br><br></div>Th=
e BCP draft suggests explicit typing to prevent Cross-JWT Confusion more ge=
nerally (not just sec events and id tokens). I was wondering if some use of=
 &quot;crit&quot; might accomplish the same thing but also cover the case o=
f existing JWT implementations being confused with new JWT profiles. <br></=
div><div class=3D"gmail_extra"><br><div class=3D"gmail_quote">On Thu, Jul 2=
7, 2017 at 3:40 PM, John Bradley <span dir=3D"ltr">&lt;<a href=3D"mailto:ve=
7jtb@ve7jtb.com" target=3D"_blank">ve7jtb@ve7jtb.com</a>&gt;</span> wrote:<=
br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left=
:1px #ccc solid;padding-left:1ex"><div style=3D"word-wrap:break-word">Not t=
hat I am against the general desire for JWT not to be confused, but the att=
ack surface for someone to take a sec event from one context and replay it =
as a id_token to login is very small and if the client is correctly configu=
red would not work as it is now.<div><br></div><div>The only way you could =
replay the sec event JWT is via the implicit flow. =C2=A0 The other flows w=
ould require a malicious AS and at that point you have bigger problems with=
 a compromised token endpoint.</div><div><br></div><div>If you were to crea=
te a implicit response with the sec event token that has the correct issuer=
 and aud, connect requires that nonce value from the request be present in =
the id_token. =C2=A0 This would require that the attacker somehow get the A=
S to put not only the claim but the correct value from the request into the=
 token.</div><div><br></div><div>All in all I think that it is more likely =
(not 100% I admit) that a client will do that rather than checking the typ =
or a new crit JWT header parameter.</div><div><br></div><div>I am all for a=
 general solution for this but I think the issue with Connect is overstated=
 sometimes.</div><div><br></div><div>John B.</div><div>=C2=A0<br><div><bloc=
kquote type=3D"cite"><div><div class=3D"h5"><div>On Jul 27, 2017, at 5:19 P=
M, Phil Hunt &lt;<a href=3D"mailto:phil.hunt@oracle.com" target=3D"_blank">=
phil.hunt@oracle.com</a>&gt; wrote:</div><br class=3D"m_540525143237316654A=
pple-interchange-newline"></div></div><div><div><div class=3D"h5"><div styl=
e=3D"word-wrap:break-word">We have the use case in SECEVENTS where a logout=
 event (e.g. OIDF backchannel logout) is extremely close to an ID_TOKEN.=C2=
=A0<div><br></div><div>Older relying parties who are do not yet support log=
out could be tricked into accepting a logout assertion as an ID_TOKEN since=
 they are too similar, and =C2=A0because a valid ID_TOKEN parser is in theo=
ry allowed to ignore claims it does not understand (e.g. =E2=80=9Cevents=E2=
=80=9D) - leading to a possible erroneous acceptance of the logout event AS=
 and ID_TOKEN.</div><div><br></div><div>Because of this the issue of distin=
guishing classes or types of JWTs emerged.</div><div><br></div><div>We disc=
ussed a number of differentiators like =E2=80=9Caud=E2=80=9D, =E2=80=9Ctyp=
=E2=80=9D, =E2=80=9Ccrit&quot;, etc that would help.=C2=A0 But that really =
lead to the idea there there should be some best practices in the JWT BCP c=
overing the issue(s).</div><div><br><div>
<div style=3D"letter-spacing:normal;text-align:start;text-indent:0px;text-t=
ransform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><di=
v style=3D"letter-spacing:normal;text-align:start;text-indent:0px;text-tran=
sform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><div s=
tyle=3D"letter-spacing:normal;text-align:start;text-indent:0px;text-transfo=
rm:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><div styl=
e=3D"letter-spacing:normal;text-align:start;text-indent:0px;text-transform:=
none;white-space:normal;word-spacing:0px;word-wrap:break-word"><div style=
=3D"letter-spacing:normal;text-align:start;text-indent:0px;text-transform:n=
one;white-space:normal;word-spacing:0px;word-wrap:break-word"><div style=3D=
"letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none=
;white-space:normal;word-spacing:0px;word-wrap:break-word"><div style=3D"le=
tter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;wh=
ite-space:normal;word-spacing:0px;word-wrap:break-word"><div style=3D"lette=
r-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white=
-space:normal;word-spacing:0px;word-wrap:break-word"><div style=3D"letter-s=
pacing:normal;text-align:start;text-indent:0px;text-transform:none;white-sp=
ace:normal;word-spacing:0px;word-wrap:break-word"><div style=3D"letter-spac=
ing:normal;text-align:start;text-indent:0px;text-transform:none;white-space=
:normal;word-spacing:0px;word-wrap:break-word"><div style=3D"letter-spacing=
:normal;text-align:start;text-indent:0px;text-transform:none;white-space:no=
rmal;word-spacing:0px;word-wrap:break-word"><div><span class=3D"m_540525143=
237316654Apple-style-span" style=3D"border-collapse:separate;line-height:no=
rmal;border-spacing:0px"><div style=3D"word-wrap:break-word"><div><div><div=
>Phil</div><div><br></div><div>Oracle Corporation, Identity Cloud Services =
Architect &amp; Standards</div><div>@independentid</div><div><a href=3D"htt=
p://www.independentid.com/" target=3D"_blank">www.independentid.com</a></di=
v></div></div></div></span><a href=3D"mailto:phil.hunt@oracle.com" target=
=3D"_blank">phil.hunt@oracle.com</a></div></div></div></div></div></div></d=
iv></div></div></div></div></div>
</div>
<br><div><blockquote type=3D"cite"><div>On Jul 27, 2017, at 2:00 PM, Nathan=
iel McCallum &lt;<a href=3D"mailto:npmccallum@redhat.com" target=3D"_blank"=
>npmccallum@redhat.com</a>&gt; wrote:</div><br class=3D"m_54052514323731665=
4Apple-interchange-newline"><div><div>Even after reading the whole section,=
 I still don&#39;t understand the<br>problem. Yes, a class of attack could =
exist where an attacker<br>substitutes a valid JWT from one security contex=
t into another<br>context. But isn&#39;t this resolved by audience validati=
on?<br><br>On Thu, Jul 27, 2017 at 3:34 PM, Brian Campbell<br>&lt;<a href=
=3D"mailto:bcampbell@pingidentity.com" target=3D"_blank">bcampbell@pingiden=
tity.com</a>&gt; wrote:<br><blockquote type=3D"cite">The draft describes it=
 in<br><a href=3D"https://urldefense.proofpoint.com/v2/url?u=3Dhttps-3A__to=
ols.ietf.org_html_draft-2Dsheffer-2Doauth-2Djwt-2Dbcp-2D01-23section-2D2.7&=
amp;d=3DDwICAg&amp;c=3DRoP1YumCXCgaWHvlZYR8PQcxBKCX5YTpkKY057SbK10&amp;r=3D=
JBm5biRrKugCH0FkITSeGJxPEivzjWwlNKe4C_lLIGk&amp;m=3D02yWnzzFGNlefgVregxSncX=
u0b9sbh5pTrtBfQsC52A&amp;s=3D9GmPCouCMXE4enC48gfq0l0yc7ZlIxvEBAnQCVja_kY&am=
p;e=3D" target=3D"_blank">https://urldefense.proofpoint.<wbr>com/v2/url?u=
=3Dhttps-3A__tools.<wbr>ietf.org_html_draft-2Dsheffer-<wbr>2Doauth-2Djwt-2D=
bcp-2D01-<wbr>23section-2D2.7&amp;d=3DDwICAg&amp;c=3D<wbr>RoP1YumCXCgaWHvlZ=
YR8PQcxBKCX5Y<wbr>TpkKY057SbK10&amp;r=3D<wbr>JBm5biRrKugCH0FkITSeGJxPEivzjW=
<wbr>wlNKe4C_lLIGk&amp;m=3D<wbr>02yWnzzFGNlefgVregxSncXu0b9sbh<wbr>5pTrtBfQ=
sC52A&amp;s=3D<wbr>9GmPCouCMXE4enC48gfq0l0yc7ZlIx<wbr>vEBAnQCVja_kY&amp;e=
=3D</a> <br><br>On Thu, Jul 27, 2017 at 1:30 PM, Nathaniel McCallum &lt;<a =
href=3D"mailto:npmccallum@redhat.com" target=3D"_blank">npmccallum@redhat.c=
om</a>&gt;<br>wrote:<br><blockquote type=3D"cite"><br>What class of attacks=
 is this trying to prevent? I frankly don&#39;t see a<br>problem with confu=
sing different types of JWT. But I may just be<br>ignorant.<br><br>On Thu, =
Jul 27, 2017 at 2:49 PM, Brian Campbell<br>&lt;<a href=3D"mailto:bcampbell@=
pingidentity.com" target=3D"_blank">bcampbell@pingidentity.com</a>&gt; wrot=
e:<br><blockquote type=3D"cite">During the first WG meeting last week I ask=
ed if use of the JOSE &quot;crit&quot;<br>(Critical) Header Parameter had b=
een considered as a recommendation for<br>preventing confusion of one kind =
of JWT for another. Time was running<br>short<br>in the meeting so there wa=
sn&#39;t much discussion and it was requested that<br>I<br>take the questio=
n to the list. And so here on the list is that.<br><br>Section 3.9 of the J=
WT BCP draft now recommends explicit typing using<br>the<br>&quot;typ&quot;=
 JWS/JWE header parameter but does concede that &#39;the use of<br>explicit=
<br>typing may not achieve disambiguation from existing kinds of JWTs, as<b=
r>the<br>validation rules for existing kinds JWTs often do not use the &quo=
t;typ&quot;<br>header<br>parameter value.&#39; =C2=A0And the recommendation=
s for how to use the Type<br>Header<br>Parameter in JWT strongly suggest th=
at it&#39;s not currently being used for<br>any<br>validation.<br><br>Alter=
natively using the JWS/JWE &quot;crit&quot; (Critical) Header Parameter to<=
br>signal<br>the type/intent/profile/<wbr>application of a JWT could achiev=
e<br>disambiguation<br>even in validation of existing kinds of JWTs. The cr=
itical header lists<br>other headers which must be understood and processed=
 by the receiver and<br>that the JWS/JWE is invalid if those listed aren&#3=
9;t understood. So a new<br>type/profile of JWT that uses the &quot;crit&qu=
ot; header would produce JWTs that<br>would be rejected even by existing ap=
plications of JWT validation (that<br>actually implement &quot;crit&quot; p=
roperly anyway).<br><br>The JWT BCP could suggest the use of &quot;crit&quo=
t; in conjunction with a<br>profile/application/type specific header. Or it=
 could provide a bit more<br>of<br>a framework like defining a registering =
a new JOSE header &quot;p&quot; (strawman<br>of p<br>as a very short name f=
or profile) and create a registry for its values.<br>A<br>JWT header using =
that approach might look like the following where the<br>value<br>1 is regi=
stered as some cool new JWT profile/application. The consumer<br>of<br>such=
 a JWT would have to understand and process the &quot;p&quot; header, which=
<br>would<br>mean checking that it had the value expected.<br><br> =C2=A0=
=C2=A0=C2=A0=C2=A0{<br> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0&quot;alg&quot;:&quot=
;ES256&quot;,<br> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0&quot;crit&quot;:[&quot;p&q=
uot;],<br> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0&quot;p&quot;:1<br> =C2=A0=C2=A0=
=C2=A0=C2=A0}<br><br>A JOSE compliant JWT validator would reject such a JWT=
 even for an OAuth<br>access token or OIDC id_token because the &quot;p&quo=
t; header isn&#39;t known or<br>understood but is marked as critical.<br><b=
r>To me, that seems like an approach to preventing confusion that has more<=
br>teeth than the &quot;typ&quot; header. Which is why I asked about it las=
t week and<br>am<br>now bringing it to the list.<br><br><br><br><br><br><br=
><br><br><br><br>CONFIDENTIALITY NOTICE: This email may contain confidentia=
l and<br>privileged<br>material for the sole use of the intended recipient(=
s). Any review, use,<br>distribution or disclosure by others is strictly pr=
ohibited.=C2=A0 If you<br>have<br>received this communication in error, ple=
ase notify the sender<br>immediately<br>by e-mail and delete the message an=
d any file attachments from your<br>computer. Thank you.<br>_______________=
_______________<wbr>_________________<br>jose mailing list<br><a href=3D"ma=
ilto:jose@ietf.org" target=3D"_blank">jose@ietf.org</a><br><a href=3D"https=
://urldefense.proofpoint.com/v2/url?u=3Dhttps-3A__www.ietf.org_mailman_list=
info_jose&amp;d=3DDwICAg&amp;c=3DRoP1YumCXCgaWHvlZYR8PQcxBKCX5YTpkKY057SbK1=
0&amp;r=3DJBm5biRrKugCH0FkITSeGJxPEivzjWwlNKe4C_lLIGk&amp;m=3D02yWnzzFGNlef=
gVregxSncXu0b9sbh5pTrtBfQsC52A&amp;s=3DeJ8QZBwe5AO-RDl_E16U1q_KpobaeSRUP4Cp=
2W-_jJU&amp;e=3D" target=3D"_blank">https://urldefense.proofpoint.<wbr>com/=
v2/url?u=3Dhttps-3A__www.<wbr>ietf.org_mailman_listinfo_<wbr>jose&amp;d=3DD=
wICAg&amp;c=3D<wbr>RoP1YumCXCgaWHvlZYR8PQcxBKCX5Y<wbr>TpkKY057SbK10&amp;r=
=3D<wbr>JBm5biRrKugCH0FkITSeGJxPEivzjW<wbr>wlNKe4C_lLIGk&amp;m=3D<wbr>02yWn=
zzFGNlefgVregxSncXu0b9sbh<wbr>5pTrtBfQsC52A&amp;s=3DeJ8QZBwe5AO-<wbr>RDl_E1=
6U1q_KpobaeSRUP4Cp2W-_<wbr>jJU&amp;e=3D</a> <br><br></blockquote></blockquo=
te><br><br><br>CONFIDENTIALITY NOTICE: This email may contain confidential =
and privileged<br>material for the sole use of the intended recipient(s). A=
ny review, use,<br>distribution or disclosure by others is strictly prohibi=
ted.=C2=A0 If you have<br>received this communication in error, please noti=
fy the sender immediately<br>by e-mail and delete the message and any file =
attachments from your<br>computer. Thank you.<br></blockquote><br>_________=
_____________________<wbr>_________________<br>jose mailing list<br><a href=
=3D"mailto:jose@ietf.org" target=3D"_blank">jose@ietf.org</a><br><a href=3D=
"https://urldefense.proofpoint.com/v2/url?u=3Dhttps-3A__www.ietf.org_mailma=
n_listinfo_jose&amp;d=3DDwICAg&amp;c=3DRoP1YumCXCgaWHvlZYR8PQcxBKCX5YTpkKY0=
57SbK10&amp;r=3DJBm5biRrKugCH0FkITSeGJxPEivzjWwlNKe4C_lLIGk&amp;m=3D02yWnzz=
FGNlefgVregxSncXu0b9sbh5pTrtBfQsC52A&amp;s=3DeJ8QZBwe5AO-RDl_E16U1q_KpobaeS=
RUP4Cp2W-_jJU&amp;e=3D" target=3D"_blank">https://urldefense.proofpoint.<wb=
r>com/v2/url?u=3Dhttps-3A__www.<wbr>ietf.org_mailman_listinfo_<wbr>jose&amp=
;d=3DDwICAg&amp;c=3D<wbr>RoP1YumCXCgaWHvlZYR8PQcxBKCX5Y<wbr>TpkKY057SbK10&a=
mp;r=3D<wbr>JBm5biRrKugCH0FkITSeGJxPEivzjW<wbr>wlNKe4C_lLIGk&amp;m=3D<wbr>0=
2yWnzzFGNlefgVregxSncXu0b9sbh<wbr>5pTrtBfQsC52A&amp;s=3DeJ8QZBwe5AO-<wbr>RD=
l_E16U1q_KpobaeSRUP4Cp2W-_<wbr>jJU&amp;e=3D</a> <br></div></div></blockquot=
e></div><br></div></div></div></div><span class=3D"">______________________=
________<wbr>_________________<br>OAuth mailing list<br><a href=3D"mailto:O=
Auth@ietf.org" target=3D"_blank">OAuth@ietf.org</a><br><a href=3D"https://w=
ww.ietf.org/mailman/listinfo/oauth" target=3D"_blank">https://www.ietf.org/=
mailman/<wbr>listinfo/oauth</a><br></span></div></blockquote></div><br></di=
v></div><br>______________________________<wbr>_________________<br>
OAuth mailing list<br>
<a href=3D"mailto:OAuth@ietf.org">OAuth@ietf.org</a><br>
<a href=3D"https://www.ietf.org/mailman/listinfo/oauth" rel=3D"noreferrer" =
target=3D"_blank">https://www.ietf.org/mailman/<wbr>listinfo/oauth</a><br>
<br></blockquote></div><br></div>

<br>
<i style=3D"margin:0px;padding:0px;border:0px;outline:0px;vertical-align:ba=
seline;background:rgb(255,255,255);font-family:proxima-nova-zendesk,system-=
ui,-apple-system,system-ui,&quot;Segoe UI&quot;,Roboto,Oxygen-Sans,Ubuntu,C=
antarell,&quot;Helvetica Neue&quot;,Arial,sans-serif;color:rgb(85,85,85)"><=
span style=3D"margin:0px;padding:0px;border:0px;outline:0px;vertical-align:=
baseline;background:transparent;font-family:proxima-nova-zendesk,system-ui,=
-apple-system,BlinkMacSystemFont,&quot;Segoe UI&quot;,Roboto,Oxygen-Sans,Ub=
untu,Cantarell,&quot;Helvetica Neue&quot;,Arial,sans-serif;font-weight:600"=
><font size=3D"2">CONFIDENTIALITY NOTICE: This email may contain confidenti=
al and privileged material for the sole use of the intended recipient(s). A=
ny review, use, distribution or disclosure by others is strictly prohibited=
.=C2=A0 If you have received this communication in error, please notify the=
 sender immediately by e-mail and delete the message and any file attachmen=
ts from your computer. Thank you.</font></span></i>
--f403045cdcc4668e18055553d548--


From nobody Thu Jul 27 15:24:14 2017
Return-Path: <ve7jtb@ve7jtb.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 A0798131D14 for <jose@ietfa.amsl.com>; Thu, 27 Jul 2017 15:24:11 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.899
X-Spam-Level: 
X-Spam-Status: No, score=-1.899 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=ve7jtb-com.20150623.gappssmtp.com
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 LMc2JpDurVVv for <jose@ietfa.amsl.com>; Thu, 27 Jul 2017 15:24:07 -0700 (PDT)
Received: from mail-qt0-x235.google.com (mail-qt0-x235.google.com [IPv6:2607:f8b0:400d:c0d::235]) (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 142C5131D06 for <jose@ietf.org>; Thu, 27 Jul 2017 15:24:06 -0700 (PDT)
Received: by mail-qt0-x235.google.com with SMTP id a18so52439275qta.0 for <jose@ietf.org>; Thu, 27 Jul 2017 15:24:06 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ve7jtb-com.20150623.gappssmtp.com; s=20150623; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=bHQ/3n3xTxgMQdA/CLZGBllzXdCGxoU+Tj48yNjba4E=; b=0KN/RVDBVj9cLVQbqTNKzEf/9SZTD19TDapTPFen0XhUhC9x6pHCiIHLUCgSqVhRQB GaOCkYVbNk9y4dXyKXm7Is0dTjCMksIU9SE2ha2C6NU3I/wEwe7/74y4gc0qStPbX/7l wPBTVSirZQtxCR8PHLeyESWhR60qlqny1VChABkinceG5ae7RoUFf6hPjwanSbC79VWr e+ENuL+Nw5aHdibHFWVY2GLotWzWt+JEissQJfQ9I+qsSfwUqFUSCuQawH1aMuDHfIm+ bBAe52sGIK+TcinIyX78z2uo8qSn8YCjg9MR6CqJTDC+dZZOjh/8bNT5x330MQCuUTzX /goQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=bHQ/3n3xTxgMQdA/CLZGBllzXdCGxoU+Tj48yNjba4E=; b=hC+MZh6pYXqNvDrqcChThG/bVznUBv2+RfT5fOGt1Q1dFD0pmYGfKK+/yyNWRXGgwm LCRNF1KQA2ZQ+AvxYbzONx/nW1wdDsx04Feir7d+F7Ui6bfhO1mXgUOdLGYPgd28V+JM xGx2uDt/7y16q8MxYuOoXXt7hwA5lIU9z0h5ZTJ1iwTGqAbxWqeDvKJIER0dlju6stLy IDXeFvwF76ZW4v1vZBPO654EI47w25F+GfHhVl5Y0BlaFte7ltF1Yi2zsWw6u8eTg+db bdCyw9qGkdKgycHqY2YS3yKEQoqxSy35w/96+fJsUEX5eNLbpBRqhyTe4YfJOJG8urmS Ih1Q==
X-Gm-Message-State: AIVw1129UZAXd1urrmTaraUaB7HaKUYtxyuAsahlFOfhuCI2i5dF4qCp d6r9GAYHmiMr3zRM
X-Received: by 10.200.47.93 with SMTP id k29mr8230563qta.18.1501194245859; Thu, 27 Jul 2017 15:24:05 -0700 (PDT)
Received: from johns-mbp.lan ([191.115.36.222]) by smtp.gmail.com with ESMTPSA id j95sm5797721qte.4.2017.07.27.15.23.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 27 Jul 2017 15:24:05 -0700 (PDT)
From: John Bradley <ve7jtb@ve7jtb.com>
Message-Id: <81AD4E5B-BBC7-4E7A-8075-EB43BC3962F8@ve7jtb.com>
Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\))
Date: Thu, 27 Jul 2017 18:23:55 -0400
In-Reply-To: <CA+k3eCSnj=3a9OiUSy=_5D4K-Er75FKxhcmPgzV6BhjcUaLERA@mail.gmail.com>
Cc: Phil Hunt <phil.hunt@oracle.com>, Nathaniel McCallum <npmccallum@redhat.com>, oauth <oauth@ietf.org>, "jose@ietf.org" <jose@ietf.org>
To: Brian Campbell <bcampbell@pingidentity.com>
References: <CA+k3eCRT_iuLHYrLxz+tf1MT9L9XG2jV0D0anC0h5w7A_ujEdQ@mail.gmail.com> <CAOASepOjYBYoKYEVvCLMzZgsdyGhr2LOB-dNqekxsKFm_gxixg@mail.gmail.com> <CA+k3eCS-Va2AvzRhWia_ETqSDYUMBOoi=sY3jg7TbJFhhuVnZA@mail.gmail.com> <CAOASepMaeS8WrCMb+WHV0FC2_w3f0KnY5XuDsuWJhAW2ayfryQ@mail.gmail.com> <91B882A0-48A0-4F08-8ADB-B675D9F1C08F@oracle.com> <7041D358-E4C8-4D8C-BD94-0D65C238B449@ve7jtb.com> <CA+k3eCSnj=3a9OiUSy=_5D4K-Er75FKxhcmPgzV6BhjcUaLERA@mail.gmail.com>
X-Mailer: Apple Mail (2.3273)
Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha-256; boundary="001a11356e54ca28c00555540539"
Archived-At: <https://mailarchive.ietf.org/arch/msg/jose/9FtFbbFgTVqCq82Ou4o-qake9qI>
Subject: Re: [jose] [OAUTH-WG] preventing confusion of one kind of JWT for another in JWT BCP
X-BeenThere: jose@ietf.org
X-Mailman-Version: 2.1.22
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: Thu, 27 Jul 2017 22:24:12 -0000

--001a11356e54ca28c00555540539
Content-Type: multipart/alternative;
 boundary="Apple-Mail=_6C8C6C72-8D1C-4303-919C-CA9F66FEBFDB"


--Apple-Mail=_6C8C6C72-8D1C-4303-919C-CA9F66FEBFDB
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=utf-8

My only concern with a crit header is that it is potentially another =
layering violation.

It really should be the application and not JWS/JWE that determines if =
the content of the JWT is correct at a application layer.

To get your idea to work the application would need to push down to the =
JWT layer some value/s of p that it was willing to accept.   Without =
crit the application could just pass along typ or p to the application =
layer for matching.

I don=E2=80=99t hate the idea but it seems like it is likely to work =
against having generic JOSE libs separate from JWT. Perhaps that is the =
reality anyway.

How would you implement it?

John B.

> On Jul 27, 2017, at 6:10 PM, Brian Campbell =
<bcampbell@pingidentity.com> wrote:
>=20
> I wouldn't disagree that the issue with Connect is overstated =
sometimes. And it's a non-issue with sec event due to the "nonce" claim =
(as you point out) as well as the omission of the "exp" claim. Assuming =
correct validation anyway.=20
>=20
> The BCP draft suggests explicit typing to prevent Cross-JWT Confusion =
more generally (not just sec events and id tokens). I was wondering if =
some use of "crit" might accomplish the same thing but also cover the =
case of existing JWT implementations being confused with new JWT =
profiles.=20
>=20
> On Thu, Jul 27, 2017 at 3:40 PM, John Bradley <ve7jtb@ve7jtb.com =
<mailto:ve7jtb@ve7jtb.com>> wrote:
> Not that I am against the general desire for JWT not to be confused, =
but the attack surface for someone to take a sec event from one context =
and replay it as a id_token to login is very small and if the client is =
correctly configured would not work as it is now.
>=20
> The only way you could replay the sec event JWT is via the implicit =
flow.   The other flows would require a malicious AS and at that point =
you have bigger problems with a compromised token endpoint.
>=20
> If you were to create a implicit response with the sec event token =
that has the correct issuer and aud, connect requires that nonce value =
from the request be present in the id_token.   This would require that =
the attacker somehow get the AS to put not only the claim but the =
correct value from the request into the token.
>=20
> All in all I think that it is more likely (not 100% I admit) that a =
client will do that rather than checking the typ or a new crit JWT =
header parameter.
>=20
> I am all for a general solution for this but I think the issue with =
Connect is overstated sometimes.
>=20
> John B.
> =20
>> On Jul 27, 2017, at 5:19 PM, Phil Hunt <phil.hunt@oracle.com =
<mailto:phil.hunt@oracle.com>> wrote:
>>=20
>> We have the use case in SECEVENTS where a logout event (e.g. OIDF =
backchannel logout) is extremely close to an ID_TOKEN.=20
>>=20
>> Older relying parties who are do not yet support logout could be =
tricked into accepting a logout assertion as an ID_TOKEN since they are =
too similar, and  because a valid ID_TOKEN parser is in theory allowed =
to ignore claims it does not understand (e.g. =E2=80=9Cevents=E2=80=9D) =
- leading to a possible erroneous acceptance of the logout event AS and =
ID_TOKEN.
>>=20
>> Because of this the issue of distinguishing classes or types of JWTs =
emerged.
>>=20
>> We discussed a number of differentiators like =E2=80=9Caud=E2=80=9D, =
=E2=80=9Ctyp=E2=80=9D, =E2=80=9Ccrit", etc that would help.  But that =
really lead to the idea there there should be some best practices in the =
JWT BCP covering the issue(s).
>>=20
>> Phil
>>=20
>> Oracle Corporation, Identity Cloud Services Architect & Standards
>> @independentid
>> www.independentid.com =
<http://www.independentid.com/>phil.hunt@oracle.com =
<mailto:phil.hunt@oracle.com>
>>> On Jul 27, 2017, at 2:00 PM, Nathaniel McCallum =
<npmccallum@redhat.com <mailto:npmccallum@redhat.com>> wrote:
>>>=20
>>> Even after reading the whole section, I still don't understand the
>>> problem. Yes, a class of attack could exist where an attacker
>>> substitutes a valid JWT from one security context into another
>>> context. But isn't this resolved by audience validation?
>>>=20
>>> On Thu, Jul 27, 2017 at 3:34 PM, Brian Campbell
>>> <bcampbell@pingidentity.com <mailto:bcampbell@pingidentity.com>> =
wrote:
>>>> The draft describes it in
>>>> =
https://urldefense.proofpoint.com/v2/url?u=3Dhttps-3A__tools.ietf.org_html=
_draft-2Dsheffer-2Doauth-2Djwt-2Dbcp-2D01-23section-2D2.7&d=3DDwICAg&c=3DR=
oP1YumCXCgaWHvlZYR8PQcxBKCX5YTpkKY057SbK10&r=3DJBm5biRrKugCH0FkITSeGJxPEiv=
zjWwlNKe4C_lLIGk&m=3D02yWnzzFGNlefgVregxSncXu0b9sbh5pTrtBfQsC52A&s=3D9GmPC=
ouCMXE4enC48gfq0l0yc7ZlIxvEBAnQCVja_kY&e=3D =
<https://urldefense.proofpoint.com/v2/url?u=3Dhttps-3A__tools.ietf.org_htm=
l_draft-2Dsheffer-2Doauth-2Djwt-2Dbcp-2D01-23section-2D2.7&d=3DDwICAg&c=3D=
RoP1YumCXCgaWHvlZYR8PQcxBKCX5YTpkKY057SbK10&r=3DJBm5biRrKugCH0FkITSeGJxPEi=
vzjWwlNKe4C_lLIGk&m=3D02yWnzzFGNlefgVregxSncXu0b9sbh5pTrtBfQsC52A&s=3D9GmP=
CouCMXE4enC48gfq0l0yc7ZlIxvEBAnQCVja_kY&e=3D>=20
>>>>=20
>>>> On Thu, Jul 27, 2017 at 1:30 PM, Nathaniel McCallum =
<npmccallum@redhat.com <mailto:npmccallum@redhat.com>>
>>>> wrote:
>>>>>=20
>>>>> What class of attacks is this trying to prevent? I frankly don't =
see a
>>>>> problem with confusing different types of JWT. But I may just be
>>>>> ignorant.
>>>>>=20
>>>>> On Thu, Jul 27, 2017 at 2:49 PM, Brian Campbell
>>>>> <bcampbell@pingidentity.com <mailto:bcampbell@pingidentity.com>> =
wrote:
>>>>>> During the first WG meeting last week I asked if use of the JOSE =
"crit"
>>>>>> (Critical) Header Parameter had been considered as a =
recommendation for
>>>>>> preventing confusion of one kind of JWT for another. Time was =
running
>>>>>> short
>>>>>> in the meeting so there wasn't much discussion and it was =
requested that
>>>>>> I
>>>>>> take the question to the list. And so here on the list is that.
>>>>>>=20
>>>>>> Section 3.9 of the JWT BCP draft now recommends explicit typing =
using
>>>>>> the
>>>>>> "typ" JWS/JWE header parameter but does concede that 'the use of
>>>>>> explicit
>>>>>> typing may not achieve disambiguation from existing kinds of =
JWTs, as
>>>>>> the
>>>>>> validation rules for existing kinds JWTs often do not use the =
"typ"
>>>>>> header
>>>>>> parameter value.'  And the recommendations for how to use the =
Type
>>>>>> Header
>>>>>> Parameter in JWT strongly suggest that it's not currently being =
used for
>>>>>> any
>>>>>> validation.
>>>>>>=20
>>>>>> Alternatively using the JWS/JWE "crit" (Critical) Header =
Parameter to
>>>>>> signal
>>>>>> the type/intent/profile/application of a JWT could achieve
>>>>>> disambiguation
>>>>>> even in validation of existing kinds of JWTs. The critical header =
lists
>>>>>> other headers which must be understood and processed by the =
receiver and
>>>>>> that the JWS/JWE is invalid if those listed aren't understood. So =
a new
>>>>>> type/profile of JWT that uses the "crit" header would produce =
JWTs that
>>>>>> would be rejected even by existing applications of JWT validation =
(that
>>>>>> actually implement "crit" properly anyway).
>>>>>>=20
>>>>>> The JWT BCP could suggest the use of "crit" in conjunction with a
>>>>>> profile/application/type specific header. Or it could provide a =
bit more
>>>>>> of
>>>>>> a framework like defining a registering a new JOSE header "p" =
(strawman
>>>>>> of p
>>>>>> as a very short name for profile) and create a registry for its =
values.
>>>>>> A
>>>>>> JWT header using that approach might look like the following =
where the
>>>>>> value
>>>>>> 1 is registered as some cool new JWT profile/application. The =
consumer
>>>>>> of
>>>>>> such a JWT would have to understand and process the "p" header, =
which
>>>>>> would
>>>>>> mean checking that it had the value expected.
>>>>>>=20
>>>>>>     {
>>>>>>      "alg":"ES256",
>>>>>>      "crit":["p"],
>>>>>>      "p":1
>>>>>>     }
>>>>>>=20
>>>>>> A JOSE compliant JWT validator would reject such a JWT even for =
an OAuth
>>>>>> access token or OIDC id_token because the "p" header isn't known =
or
>>>>>> understood but is marked as critical.
>>>>>>=20
>>>>>> To me, that seems like an approach to preventing confusion that =
has more
>>>>>> teeth than the "typ" header. Which is why I asked about it last =
week and
>>>>>> am
>>>>>> now bringing it to the list.
>>>>>>=20
>>>>>>=20
>>>>>>=20
>>>>>>=20
>>>>>>=20
>>>>>>=20
>>>>>>=20
>>>>>>=20
>>>>>>=20
>>>>>>=20
>>>>>> CONFIDENTIALITY NOTICE: This email may contain confidential and
>>>>>> privileged
>>>>>> material for the sole use of the intended recipient(s). Any =
review, use,
>>>>>> distribution or disclosure by others is strictly prohibited.  If =
you
>>>>>> have
>>>>>> received this communication in error, please notify the sender
>>>>>> immediately
>>>>>> by e-mail and delete the message and any file attachments from =
your
>>>>>> computer. Thank you.
>>>>>> _______________________________________________
>>>>>> jose mailing list
>>>>>> jose@ietf.org <mailto:jose@ietf.org>
>>>>>> =
https://urldefense.proofpoint.com/v2/url?u=3Dhttps-3A__www.ietf.org_mailma=
n_listinfo_jose&d=3DDwICAg&c=3DRoP1YumCXCgaWHvlZYR8PQcxBKCX5YTpkKY057SbK10=
&r=3DJBm5biRrKugCH0FkITSeGJxPEivzjWwlNKe4C_lLIGk&m=3D02yWnzzFGNlefgVregxSn=
cXu0b9sbh5pTrtBfQsC52A&s=3DeJ8QZBwe5AO-RDl_E16U1q_KpobaeSRUP4Cp2W-_jJU&e=3D=
 =
<https://urldefense.proofpoint.com/v2/url?u=3Dhttps-3A__www.ietf.org_mailm=
an_listinfo_jose&d=3DDwICAg&c=3DRoP1YumCXCgaWHvlZYR8PQcxBKCX5YTpkKY057SbK1=
0&r=3DJBm5biRrKugCH0FkITSeGJxPEivzjWwlNKe4C_lLIGk&m=3D02yWnzzFGNlefgVregxS=
ncXu0b9sbh5pTrtBfQsC52A&s=3DeJ8QZBwe5AO-RDl_E16U1q_KpobaeSRUP4Cp2W-_jJU&e=3D=
>=20
>>>>>>=20
>>>>=20
>>>>=20
>>>>=20
>>>> CONFIDENTIALITY NOTICE: This email may contain confidential and =
privileged
>>>> material for the sole use of the intended recipient(s). Any review, =
use,
>>>> distribution or disclosure by others is strictly prohibited.  If =
you have
>>>> received this communication in error, please notify the sender =
immediately
>>>> by e-mail and delete the message and any file attachments from your
>>>> computer. Thank you.
>>>=20
>>> _______________________________________________
>>> jose mailing list
>>> jose@ietf.org <mailto:jose@ietf.org>
>>> =
https://urldefense.proofpoint.com/v2/url?u=3Dhttps-3A__www.ietf.org_mailma=
n_listinfo_jose&d=3DDwICAg&c=3DRoP1YumCXCgaWHvlZYR8PQcxBKCX5YTpkKY057SbK10=
&r=3DJBm5biRrKugCH0FkITSeGJxPEivzjWwlNKe4C_lLIGk&m=3D02yWnzzFGNlefgVregxSn=
cXu0b9sbh5pTrtBfQsC52A&s=3DeJ8QZBwe5AO-RDl_E16U1q_KpobaeSRUP4Cp2W-_jJU&e=3D=
 =
<https://urldefense.proofpoint.com/v2/url?u=3Dhttps-3A__www.ietf.org_mailm=
an_listinfo_jose&d=3DDwICAg&c=3DRoP1YumCXCgaWHvlZYR8PQcxBKCX5YTpkKY057SbK1=
0&r=3DJBm5biRrKugCH0FkITSeGJxPEivzjWwlNKe4C_lLIGk&m=3D02yWnzzFGNlefgVregxS=
ncXu0b9sbh5pTrtBfQsC52A&s=3DeJ8QZBwe5AO-RDl_E16U1q_KpobaeSRUP4Cp2W-_jJU&e=3D=
>=20
>>=20
>> _______________________________________________
>> OAuth mailing list
>> OAuth@ietf.org <mailto:OAuth@ietf.org>
>> https://www.ietf.org/mailman/listinfo/oauth =
<https://www.ietf.org/mailman/listinfo/oauth>
>=20
>=20
> _______________________________________________
> OAuth mailing list
> OAuth@ietf.org <mailto:OAuth@ietf.org>
> https://www.ietf.org/mailman/listinfo/oauth =
<https://www.ietf.org/mailman/listinfo/oauth>
>=20
>=20
>=20
> CONFIDENTIALITY NOTICE: This email may contain confidential and =
privileged material for the sole use of the intended recipient(s). Any =
review, use, distribution or disclosure by others is strictly =
prohibited.  If you have received this communication in error, please =
notify the sender immediately by e-mail and delete the message and any =
file attachments from your computer. Thank you.


--Apple-Mail=_6C8C6C72-8D1C-4303-919C-CA9F66FEBFDB
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html;
	charset=utf-8

<html><head><meta http-equiv=3D"Content-Type" content=3D"text/html =
charset=3Dutf-8"></head><body style=3D"word-wrap: break-word; =
-webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" =
class=3D"">My only concern with a crit header is that it is potentially =
another layering violation.<div class=3D""><br class=3D""></div><div =
class=3D"">It really should be the application and not JWS/JWE that =
determines if the content of the JWT is correct at a application =
layer.</div><div class=3D""><br class=3D""></div><div class=3D"">To get =
your idea to work the application would need to push down to the JWT =
layer some value/s of p that it was willing to accept. &nbsp; Without =
crit the application could just pass along typ or p to the application =
layer for matching.</div><div class=3D""><br class=3D""></div><div =
class=3D"">I don=E2=80=99t hate the idea but it seems like it is likely =
to work against having generic JOSE libs separate from JWT. Perhaps that =
is the reality anyway.</div><div class=3D""><br class=3D""></div><div =
class=3D"">How would you implement it?</div><div class=3D""><br =
class=3D""></div><div class=3D"">John B.</div><div class=3D""><br =
class=3D""><div><blockquote type=3D"cite" class=3D""><div class=3D"">On =
Jul 27, 2017, at 6:10 PM, Brian Campbell &lt;<a =
href=3D"mailto:bcampbell@pingidentity.com" =
class=3D"">bcampbell@pingidentity.com</a>&gt; wrote:</div><br =
class=3D"Apple-interchange-newline"><div class=3D""><div dir=3D"ltr" =
class=3D""><div class=3D"">I wouldn't disagree that the  issue with =
Connect is overstated sometimes. And it's a non-issue with sec event due =
to the "nonce" claim (as you point out) as well as the omission of the =
"exp" claim. Assuming correct validation anyway. <br class=3D""><br =
class=3D""></div>The BCP draft suggests explicit typing to prevent =
Cross-JWT Confusion more generally (not just sec events and id tokens). =
I was wondering if some use of "crit" might accomplish the same thing =
but also cover the case of existing JWT implementations being confused =
with new JWT profiles. <br class=3D""></div><div class=3D"gmail_extra"><br=
 class=3D""><div class=3D"gmail_quote">On Thu, Jul 27, 2017 at 3:40 PM, =
John Bradley <span dir=3D"ltr" class=3D"">&lt;<a =
href=3D"mailto:ve7jtb@ve7jtb.com" target=3D"_blank" =
class=3D"">ve7jtb@ve7jtb.com</a>&gt;</span> wrote:<br =
class=3D""><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 =
.8ex;border-left:1px #ccc solid;padding-left:1ex"><div =
style=3D"word-wrap:break-word" class=3D"">Not that I am against the =
general desire for JWT not to be confused, but the attack surface for =
someone to take a sec event from one context and replay it as a id_token =
to login is very small and if the client is correctly configured would =
not work as it is now.<div class=3D""><br class=3D""></div><div =
class=3D"">The only way you could replay the sec event JWT is via the =
implicit flow. &nbsp; The other flows would require a malicious AS and =
at that point you have bigger problems with a compromised token =
endpoint.</div><div class=3D""><br class=3D""></div><div class=3D"">If =
you were to create a implicit response with the sec event token that has =
the correct issuer and aud, connect requires that nonce value from the =
request be present in the id_token. &nbsp; This would require that the =
attacker somehow get the AS to put not only the claim but the correct =
value from the request into the token.</div><div class=3D""><br =
class=3D""></div><div class=3D"">All in all I think that it is more =
likely (not 100% I admit) that a client will do that rather than =
checking the typ or a new crit JWT header parameter.</div><div =
class=3D""><br class=3D""></div><div class=3D"">I am all for a general =
solution for this but I think the issue with Connect is overstated =
sometimes.</div><div class=3D""><br class=3D""></div><div class=3D"">John =
B.</div><div class=3D"">&nbsp;<br class=3D""><div class=3D""><blockquote =
type=3D"cite" class=3D""><div class=3D""><div class=3D"h5"><div =
class=3D"">On Jul 27, 2017, at 5:19 PM, Phil Hunt &lt;<a =
href=3D"mailto:phil.hunt@oracle.com" target=3D"_blank" =
class=3D"">phil.hunt@oracle.com</a>&gt; wrote:</div><br =
class=3D"m_540525143237316654Apple-interchange-newline"></div></div><div =
class=3D""><div class=3D""><div class=3D"h5"><div =
style=3D"word-wrap:break-word" class=3D"">We have the use case in =
SECEVENTS where a logout event (e.g. OIDF backchannel logout) is =
extremely close to an ID_TOKEN.&nbsp;<div class=3D""><br =
class=3D""></div><div class=3D"">Older relying parties who are do not =
yet support logout could be tricked into accepting a logout assertion as =
an ID_TOKEN since they are too similar, and &nbsp;because a valid =
ID_TOKEN parser is in theory allowed to ignore claims it does not =
understand (e.g. =E2=80=9Cevents=E2=80=9D) - leading to a possible =
erroneous acceptance of the logout event AS and ID_TOKEN.</div><div =
class=3D""><br class=3D""></div><div class=3D"">Because of this the =
issue of distinguishing classes or types of JWTs emerged.</div><div =
class=3D""><br class=3D""></div><div class=3D"">We discussed a number of =
differentiators like =E2=80=9Caud=E2=80=9D, =E2=80=9Ctyp=E2=80=9D, =
=E2=80=9Ccrit", etc that would help.&nbsp; But that really lead to the =
idea there there should be some best practices in the JWT BCP covering =
the issue(s).</div><div class=3D""><br class=3D""><div class=3D"">
<div =
style=3D"letter-spacing:normal;text-align:start;text-indent:0px;text-trans=
form:none;white-space:normal;word-spacing:0px;word-wrap:break-word" =
class=3D""><div =
style=3D"letter-spacing:normal;text-align:start;text-indent:0px;text-trans=
form:none;white-space:normal;word-spacing:0px;word-wrap:break-word" =
class=3D""><div =
style=3D"letter-spacing:normal;text-align:start;text-indent:0px;text-trans=
form:none;white-space:normal;word-spacing:0px;word-wrap:break-word" =
class=3D""><div =
style=3D"letter-spacing:normal;text-align:start;text-indent:0px;text-trans=
form:none;white-space:normal;word-spacing:0px;word-wrap:break-word" =
class=3D""><div =
style=3D"letter-spacing:normal;text-align:start;text-indent:0px;text-trans=
form:none;white-space:normal;word-spacing:0px;word-wrap:break-word" =
class=3D""><div =
style=3D"letter-spacing:normal;text-align:start;text-indent:0px;text-trans=
form:none;white-space:normal;word-spacing:0px;word-wrap:break-word" =
class=3D""><div =
style=3D"letter-spacing:normal;text-align:start;text-indent:0px;text-trans=
form:none;white-space:normal;word-spacing:0px;word-wrap:break-word" =
class=3D""><div =
style=3D"letter-spacing:normal;text-align:start;text-indent:0px;text-trans=
form:none;white-space:normal;word-spacing:0px;word-wrap:break-word" =
class=3D""><div =
style=3D"letter-spacing:normal;text-align:start;text-indent:0px;text-trans=
form:none;white-space:normal;word-spacing:0px;word-wrap:break-word" =
class=3D""><div =
style=3D"letter-spacing:normal;text-align:start;text-indent:0px;text-trans=
form:none;white-space:normal;word-spacing:0px;word-wrap:break-word" =
class=3D""><div =
style=3D"letter-spacing:normal;text-align:start;text-indent:0px;text-trans=
form:none;white-space:normal;word-spacing:0px;word-wrap:break-word" =
class=3D""><div class=3D""><span =
class=3D"m_540525143237316654Apple-style-span" =
style=3D"border-collapse:separate;line-height:normal;border-spacing:0px"><=
div style=3D"word-wrap:break-word" class=3D""><div class=3D""><div =
class=3D""><div class=3D"">Phil</div><div class=3D""><br =
class=3D""></div><div class=3D"">Oracle Corporation, Identity Cloud =
Services Architect &amp; Standards</div><div =
class=3D"">@independentid</div><div class=3D""><a =
href=3D"http://www.independentid.com/" target=3D"_blank" =
class=3D"">www.independentid.com</a></div></div></div></div></span><a =
href=3D"mailto:phil.hunt@oracle.com" target=3D"_blank" =
class=3D"">phil.hunt@oracle.com</a></div></div></div></div></div></div></d=
iv></div></div></div></div></div>
</div>
<br class=3D""><div class=3D""><blockquote type=3D"cite" class=3D""><div =
class=3D"">On Jul 27, 2017, at 2:00 PM, Nathaniel McCallum &lt;<a =
href=3D"mailto:npmccallum@redhat.com" target=3D"_blank" =
class=3D"">npmccallum@redhat.com</a>&gt; wrote:</div><br =
class=3D"m_540525143237316654Apple-interchange-newline"><div =
class=3D""><div class=3D"">Even after reading the whole section, I still =
don't understand the<br class=3D"">problem. Yes, a class of attack could =
exist where an attacker<br class=3D"">substitutes a valid JWT from one =
security context into another<br class=3D"">context. But isn't this =
resolved by audience validation?<br class=3D""><br class=3D"">On Thu, =
Jul 27, 2017 at 3:34 PM, Brian Campbell<br class=3D"">&lt;<a =
href=3D"mailto:bcampbell@pingidentity.com" target=3D"_blank" =
class=3D"">bcampbell@pingidentity.com</a>&gt; wrote:<br =
class=3D""><blockquote type=3D"cite" class=3D"">The draft describes it =
in<br class=3D""><a =
href=3D"https://urldefense.proofpoint.com/v2/url?u=3Dhttps-3A__tools.ietf.=
org_html_draft-2Dsheffer-2Doauth-2Djwt-2Dbcp-2D01-23section-2D2.7&amp;d=3D=
DwICAg&amp;c=3DRoP1YumCXCgaWHvlZYR8PQcxBKCX5YTpkKY057SbK10&amp;r=3DJBm5biR=
rKugCH0FkITSeGJxPEivzjWwlNKe4C_lLIGk&amp;m=3D02yWnzzFGNlefgVregxSncXu0b9sb=
h5pTrtBfQsC52A&amp;s=3D9GmPCouCMXE4enC48gfq0l0yc7ZlIxvEBAnQCVja_kY&amp;e=3D=
" target=3D"_blank" class=3D"">https://urldefense.proofpoint.<wbr =
class=3D"">com/v2/url?u=3Dhttps-3A__tools.<wbr =
class=3D"">ietf.org_html_draft-2Dsheffer-<wbr =
class=3D"">2Doauth-2Djwt-2Dbcp-2D01-<wbr =
class=3D"">23section-2D2.7&amp;d=3DDwICAg&amp;c=3D<wbr =
class=3D"">RoP1YumCXCgaWHvlZYR8PQcxBKCX5Y<wbr =
class=3D"">TpkKY057SbK10&amp;r=3D<wbr =
class=3D"">JBm5biRrKugCH0FkITSeGJxPEivzjW<wbr =
class=3D"">wlNKe4C_lLIGk&amp;m=3D<wbr =
class=3D"">02yWnzzFGNlefgVregxSncXu0b9sbh<wbr =
class=3D"">5pTrtBfQsC52A&amp;s=3D<wbr =
class=3D"">9GmPCouCMXE4enC48gfq0l0yc7ZlIx<wbr =
class=3D"">vEBAnQCVja_kY&amp;e=3D</a> <br class=3D""><br class=3D"">On =
Thu, Jul 27, 2017 at 1:30 PM, Nathaniel McCallum &lt;<a =
href=3D"mailto:npmccallum@redhat.com" target=3D"_blank" =
class=3D"">npmccallum@redhat.com</a>&gt;<br class=3D"">wrote:<br =
class=3D""><blockquote type=3D"cite" class=3D""><br class=3D"">What =
class of attacks is this trying to prevent? I frankly don't see a<br =
class=3D"">problem with confusing different types of JWT. But I may just =
be<br class=3D"">ignorant.<br class=3D""><br class=3D"">On Thu, Jul 27, =
2017 at 2:49 PM, Brian Campbell<br class=3D"">&lt;<a =
href=3D"mailto:bcampbell@pingidentity.com" target=3D"_blank" =
class=3D"">bcampbell@pingidentity.com</a>&gt; wrote:<br =
class=3D""><blockquote type=3D"cite" class=3D"">During the first WG =
meeting last week I asked if use of the JOSE "crit"<br =
class=3D"">(Critical) Header Parameter had been considered as a =
recommendation for<br class=3D"">preventing confusion of one kind of JWT =
for another. Time was running<br class=3D"">short<br class=3D"">in the =
meeting so there wasn't much discussion and it was requested that<br =
class=3D"">I<br class=3D"">take the question to the list. And so here on =
the list is that.<br class=3D""><br class=3D"">Section 3.9 of the JWT =
BCP draft now recommends explicit typing using<br class=3D"">the<br =
class=3D"">"typ" JWS/JWE header parameter but does concede that 'the use =
of<br class=3D"">explicit<br class=3D"">typing may not achieve =
disambiguation from existing kinds of JWTs, as<br class=3D"">the<br =
class=3D"">validation rules for existing kinds JWTs often do not use the =
"typ"<br class=3D"">header<br class=3D"">parameter value.' &nbsp;And the =
recommendations for how to use the Type<br class=3D"">Header<br =
class=3D"">Parameter in JWT strongly suggest that it's not currently =
being used for<br class=3D"">any<br class=3D"">validation.<br =
class=3D""><br class=3D"">Alternatively using the JWS/JWE "crit" =
(Critical) Header Parameter to<br class=3D"">signal<br class=3D"">the =
type/intent/profile/<wbr class=3D"">application of a JWT could =
achieve<br class=3D"">disambiguation<br class=3D"">even in validation of =
existing kinds of JWTs. The critical header lists<br class=3D"">other =
headers which must be understood and processed by the receiver and<br =
class=3D"">that the JWS/JWE is invalid if those listed aren't =
understood. So a new<br class=3D"">type/profile of JWT that uses the =
"crit" header would produce JWTs that<br class=3D"">would be rejected =
even by existing applications of JWT validation (that<br =
class=3D"">actually implement "crit" properly anyway).<br class=3D""><br =
class=3D"">The JWT BCP could suggest the use of "crit" in conjunction =
with a<br class=3D"">profile/application/type specific header. Or it =
could provide a bit more<br class=3D"">of<br class=3D"">a framework like =
defining a registering a new JOSE header "p" (strawman<br class=3D"">of =
p<br class=3D"">as a very short name for profile) and create a registry =
for its values.<br class=3D"">A<br class=3D"">JWT header using that =
approach might look like the following where the<br class=3D"">value<br =
class=3D"">1 is registered as some cool new JWT profile/application. The =
consumer<br class=3D"">of<br class=3D"">such a JWT would have to =
understand and process the "p" header, which<br class=3D"">would<br =
class=3D"">mean checking that it had the value expected.<br class=3D""><br=
 class=3D""> &nbsp;&nbsp;&nbsp;&nbsp;{<br class=3D""> =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"alg":"ES256",<br class=3D""> =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"crit":["p"],<br class=3D""> =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"p":1<br class=3D""> =
&nbsp;&nbsp;&nbsp;&nbsp;}<br class=3D""><br class=3D"">A JOSE compliant =
JWT validator would reject such a JWT even for an OAuth<br =
class=3D"">access token or OIDC id_token because the "p" header isn't =
known or<br class=3D"">understood but is marked as critical.<br =
class=3D""><br class=3D"">To me, that seems like an approach to =
preventing confusion that has more<br class=3D"">teeth than the "typ" =
header. Which is why I asked about it last week and<br class=3D"">am<br =
class=3D"">now bringing it to the list.<br class=3D""><br class=3D""><br =
class=3D""><br class=3D""><br class=3D""><br class=3D""><br class=3D""><br=
 class=3D""><br class=3D""><br class=3D""><br class=3D"">CONFIDENTIALITY =
NOTICE: This email may contain confidential and<br =
class=3D"">privileged<br class=3D"">material for the sole use of the =
intended recipient(s). Any review, use,<br class=3D"">distribution or =
disclosure by others is strictly prohibited.&nbsp; If you<br =
class=3D"">have<br class=3D"">received this communication in error, =
please notify the sender<br class=3D"">immediately<br class=3D"">by =
e-mail and delete the message and any file attachments from your<br =
class=3D"">computer. Thank you.<br =
class=3D"">______________________________<wbr =
class=3D"">_________________<br class=3D"">jose mailing list<br =
class=3D""><a href=3D"mailto:jose@ietf.org" target=3D"_blank" =
class=3D"">jose@ietf.org</a><br class=3D""><a =
href=3D"https://urldefense.proofpoint.com/v2/url?u=3Dhttps-3A__www.ietf.or=
g_mailman_listinfo_jose&amp;d=3DDwICAg&amp;c=3DRoP1YumCXCgaWHvlZYR8PQcxBKC=
X5YTpkKY057SbK10&amp;r=3DJBm5biRrKugCH0FkITSeGJxPEivzjWwlNKe4C_lLIGk&amp;m=
=3D02yWnzzFGNlefgVregxSncXu0b9sbh5pTrtBfQsC52A&amp;s=3DeJ8QZBwe5AO-RDl_E16=
U1q_KpobaeSRUP4Cp2W-_jJU&amp;e=3D" target=3D"_blank" =
class=3D"">https://urldefense.proofpoint.<wbr =
class=3D"">com/v2/url?u=3Dhttps-3A__www.<wbr =
class=3D"">ietf.org_mailman_listinfo_<wbr =
class=3D"">jose&amp;d=3DDwICAg&amp;c=3D<wbr =
class=3D"">RoP1YumCXCgaWHvlZYR8PQcxBKCX5Y<wbr =
class=3D"">TpkKY057SbK10&amp;r=3D<wbr =
class=3D"">JBm5biRrKugCH0FkITSeGJxPEivzjW<wbr =
class=3D"">wlNKe4C_lLIGk&amp;m=3D<wbr =
class=3D"">02yWnzzFGNlefgVregxSncXu0b9sbh<wbr =
class=3D"">5pTrtBfQsC52A&amp;s=3DeJ8QZBwe5AO-<wbr =
class=3D"">RDl_E16U1q_KpobaeSRUP4Cp2W-_<wbr class=3D"">jJU&amp;e=3D</a> =
<br class=3D""><br class=3D""></blockquote></blockquote><br class=3D""><br=
 class=3D""><br class=3D"">CONFIDENTIALITY NOTICE: This email may =
contain confidential and privileged<br class=3D"">material for the sole =
use of the intended recipient(s). Any review, use,<br =
class=3D"">distribution or disclosure by others is strictly =
prohibited.&nbsp; If you have<br class=3D"">received this communication =
in error, please notify the sender immediately<br class=3D"">by e-mail =
and delete the message and any file attachments from your<br =
class=3D"">computer. Thank you.<br class=3D""></blockquote><br =
class=3D"">______________________________<wbr =
class=3D"">_________________<br class=3D"">jose mailing list<br =
class=3D""><a href=3D"mailto:jose@ietf.org" target=3D"_blank" =
class=3D"">jose@ietf.org</a><br class=3D""><a =
href=3D"https://urldefense.proofpoint.com/v2/url?u=3Dhttps-3A__www.ietf.or=
g_mailman_listinfo_jose&amp;d=3DDwICAg&amp;c=3DRoP1YumCXCgaWHvlZYR8PQcxBKC=
X5YTpkKY057SbK10&amp;r=3DJBm5biRrKugCH0FkITSeGJxPEivzjWwlNKe4C_lLIGk&amp;m=
=3D02yWnzzFGNlefgVregxSncXu0b9sbh5pTrtBfQsC52A&amp;s=3DeJ8QZBwe5AO-RDl_E16=
U1q_KpobaeSRUP4Cp2W-_jJU&amp;e=3D" target=3D"_blank" =
class=3D"">https://urldefense.proofpoint.<wbr =
class=3D"">com/v2/url?u=3Dhttps-3A__www.<wbr =
class=3D"">ietf.org_mailman_listinfo_<wbr =
class=3D"">jose&amp;d=3DDwICAg&amp;c=3D<wbr =
class=3D"">RoP1YumCXCgaWHvlZYR8PQcxBKCX5Y<wbr =
class=3D"">TpkKY057SbK10&amp;r=3D<wbr =
class=3D"">JBm5biRrKugCH0FkITSeGJxPEivzjW<wbr =
class=3D"">wlNKe4C_lLIGk&amp;m=3D<wbr =
class=3D"">02yWnzzFGNlefgVregxSncXu0b9sbh<wbr =
class=3D"">5pTrtBfQsC52A&amp;s=3DeJ8QZBwe5AO-<wbr =
class=3D"">RDl_E16U1q_KpobaeSRUP4Cp2W-_<wbr class=3D"">jJU&amp;e=3D</a> =
<br class=3D""></div></div></blockquote></div><br =
class=3D""></div></div></div></div><span =
class=3D"">______________________________<wbr =
class=3D"">_________________<br class=3D"">OAuth mailing list<br =
class=3D""><a href=3D"mailto:OAuth@ietf.org" target=3D"_blank" =
class=3D"">OAuth@ietf.org</a><br class=3D""><a =
href=3D"https://www.ietf.org/mailman/listinfo/oauth" target=3D"_blank" =
class=3D"">https://www.ietf.org/mailman/<wbr =
class=3D"">listinfo/oauth</a><br =
class=3D""></span></div></blockquote></div><br class=3D""></div></div><br =
class=3D"">______________________________<wbr =
class=3D"">_________________<br class=3D"">
OAuth mailing list<br class=3D"">
<a href=3D"mailto:OAuth@ietf.org" class=3D"">OAuth@ietf.org</a><br =
class=3D"">
<a href=3D"https://www.ietf.org/mailman/listinfo/oauth" rel=3D"noreferrer"=
 target=3D"_blank" class=3D"">https://www.ietf.org/mailman/<wbr =
class=3D"">listinfo/oauth</a><br class=3D"">
<br class=3D""></blockquote></div><br class=3D""></div>

<br class=3D"">
<i =
style=3D"margin:0px;padding:0px;border:0px;outline:0px;vertical-align:base=
line;background:rgb(255,255,255);font-family:proxima-nova-zendesk,system-u=
i,-apple-system,system-ui,&quot;Segoe =
UI&quot;,Roboto,Oxygen-Sans,Ubuntu,Cantarell,&quot;Helvetica =
Neue&quot;,Arial,sans-serif;color:rgb(85,85,85)" class=3D""><span =
style=3D"margin:0px;padding:0px;border:0px;outline:0px;vertical-align:base=
line;background:transparent;font-family:proxima-nova-zendesk,system-ui,-ap=
ple-system,BlinkMacSystemFont,&quot;Segoe =
UI&quot;,Roboto,Oxygen-Sans,Ubuntu,Cantarell,&quot;Helvetica =
Neue&quot;,Arial,sans-serif;font-weight:600" class=3D""><font size=3D"2" =
class=3D"">CONFIDENTIALITY NOTICE: This email may contain confidential =
and privileged material for the sole use of the intended recipient(s). =
Any review, use, distribution or disclosure by others is strictly =
prohibited.&nbsp; If you have received this communication in error, =
please notify the sender immediately by e-mail and delete the message =
and any file attachments from your computer. Thank =
you.</font></span></i></div></blockquote></div><br =
class=3D""></div></body></html>=

--Apple-Mail=_6C8C6C72-8D1C-4303-919C-CA9F66FEBFDB--

--001a11356e54ca28c00555540539
Content-Type: application/pkcs7-signature; name="smime.p7s"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="smime.p7s"
Content-Description: S/MIME Cryptographic Signature

MIIRGwYJKoZIhvcNAQcCoIIRDDCCEQgCAQExDzANBglghkgBZQMEAgEFADALBgkqhkiG9w0BBwGg
gg4rMIIErzCCA5egAwIBAgIRAOAjyxUSg1OJrWFuelRnayEwDQYJKoZIhvcNAQELBQAwbzELMAkG
A1UEBhMCU0UxFDASBgNVBAoTC0FkZFRydXN0IEFCMSYwJAYDVQQLEx1BZGRUcnVzdCBFeHRlcm5h
bCBUVFAgTmV0d29yazEiMCAGA1UEAxMZQWRkVHJ1c3QgRXh0ZXJuYWwgQ0EgUm9vdDAeFw0xNDEy
MjIwMDAwMDBaFw0yMDA1MzAxMDQ4MzhaMIGbMQswCQYDVQQGEwJHQjEbMBkGA1UECBMSR3JlYXRl
ciBNYW5jaGVzdGVyMRAwDgYDVQQHEwdTYWxmb3JkMRowGAYDVQQKExFDT01PRE8gQ0EgTGltaXRl
ZDFBMD8GA1UEAxM4Q09NT0RPIFNIQS0yNTYgQ2xpZW50IEF1dGhlbnRpY2F0aW9uIGFuZCBTZWN1
cmUgRW1haWwgQ0EwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCJsQ3aelMZTnBSHbxW
pgYmt7hJ4JbnUavx8FoTSRWjtIwbYLx6UUKneYykIt8XYU6R1XYjChTTSgJ/th0JgG6lBD3ZursW
/qGHqS5DUkMWfK8yUMimT1rpCNjPkyWce4joMGTmpPhWgP0qJBQzF5msROVpi6NGBkvCM9TpQJ8G
sLGsk0C5tQiTOpwqU6MQ2z0gYTxVA47ZTnYlAiEp+qN8cXZP7uFfgen7VIDbw3s1UreE3iI9LDAt
MX9ZvVI3sDNpLUPr+tal8Zd3Z1GM2e4n67ylBzh2jKSpOP/fjPUDrEm+yvdzm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udGljYXRpb24gYW5kIFNlY3VyZSBFbWFpbCBDQQIRANkyzLVrlzXAdnG6mf1Y
FbowDQYJYIZIAWUDBAIBBQCggdQwLwYJKoZIhvcNAQkEMSIEIF83m8R13XOmBGOo6sruG+fqc4yK
pfdJWmVpQZ7bS1blMBgGCSqGSIb3DQEJAzELBgkqhkiG9w0BBwEwHAYJKoZIhvcNAQkFMQ8XDTE3
MDcyNzIyMjQwNlowaQYJKoZIhvcNAQkPMVwwWjALBglghkgBZQMEASowCwYJYIZIAWUDBAEWMAsG
CWCGSAFlAwQBAjAKBggqhkiG9w0DBzALBgkqhkiG9w0BAQowCwYJKoZIhvcNAQEHMAsGCWCGSAFl
AwQCATANBgkqhkiG9w0BAQEFAASCAQC10Ju56P9mVjQInaY5UU0xepweILOK4wYXBGHKY1/30MIs
kg5coT54EsawpVfqG/Y/1Bb45VgJAJ6K9ahkkZdaUWaV5vEb9U6dEb/phDrgcAqIVf4HEg1iMxfF
qAbV+BugMTs3ugVN7sNH3edqDeW6JB7gAfOAFTnp156zucFVOZgey6BJYduhHcRqzQniCJENr32B
SvYHOsrH7b6cuXq7kytbYjbOdifuH24ocaC/7wOfJIFTFYFNvnSyTeYV79TXWRS91+/LAwkUfdzo
qphnghFppirPr3t1PzjxSPc4vq1VrPPwwDI561JM46F1dFXgPcdtyM0sYTD6Xl6Nt/S/
--001a11356e54ca28c00555540539--


From nobody Thu Jul 27 15:57:08 2017
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 09D4A1321F6; Thu, 27 Jul 2017 15:56:58 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.999
X-Spam-Level: 
X-Spam-Status: No, score=-1.999 tagged_above=-999 required=5 tests=[AC_DIV_BONANZA=0.001, BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=augustcellars.com
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 5fCVa4EUm6Y3; Thu, 27 Jul 2017 15:56:53 -0700 (PDT)
Received: from mail4.augustcellars.com (augustcellars.com [50.45.239.150]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 4E1CA1321F3; Thu, 27 Jul 2017 15:56:53 -0700 (PDT)
Content-Type: multipart/alternative; boundary="----=_NextPart_000_022F_01D306F0.ED22B9B0"
Content-Language: en-us
DKIM-Signature: v=1; a=rsa-sha256; d=augustcellars.com; s=winery; c=simple/simple; t=1501196183; h=from:subject:to:date:message-id; bh=PhfY0UlwMtbO14uZbH5xY1zDC3lAf3oSHjYmbwGP5Uc=; b=EaVaYdrUZUjVo+38y8NHqO2pCpPT/1GI5oPWOonlS5+40zbyWTS9XpRSffJ2hfL4NBRhsLyBgaz 9i+UQOBt7Vz5i/PJwqV3gP1pZqGYAbNV22x59fdGAf7joYkeT+yJgO6BktEMjp4JKrJO7klZKCMEC op2r6cbJtiU3p4+NBJZ7dW6FGBQfHRx8qgvGQsIieWH4xwK0pARiGFF+5+NqueE06ZYoVgVV0Z/LO oqxgV31lDE/8HVC1AFENsLEdB5cULP0AYR84qn8jPIiFHCkZEmmrzCFZk4NllNtc4uQc3STVWkL+P 7whX31V8l1c6qIYSmRc6WodGvvWNpiIZv69g==
Received: from mail2.augustcellars.com (192.168.1.201) by mail4.augustcellars.com (192.168.1.153) with Microsoft SMTP Server (TLS) id 15.0.1263.5; Thu, 27 Jul 2017 15:56:22 -0700
Received: from Hebrews (24.21.96.37) by mail2.augustcellars.com (192.168.0.56) with Microsoft SMTP Server (TLS) id 15.0.1263.5; Thu, 27 Jul 2017 15:56:16 -0700
From: Jim Schaad <ietf@augustcellars.com>
To: 'John Bradley' <ve7jtb@ve7jtb.com>, 'Brian Campbell' <bcampbell@pingidentity.com>
CC: 'Nathaniel McCallum' <npmccallum@redhat.com>, 'oauth' <oauth@ietf.org>, <jose@ietf.org>, 'Phil Hunt' <phil.hunt@oracle.com>
References: <CA+k3eCRT_iuLHYrLxz+tf1MT9L9XG2jV0D0anC0h5w7A_ujEdQ@mail.gmail.com> <CAOASepOjYBYoKYEVvCLMzZgsdyGhr2LOB-dNqekxsKFm_gxixg@mail.gmail.com> <CA+k3eCS-Va2AvzRhWia_ETqSDYUMBOoi=sY3jg7TbJFhhuVnZA@mail.gmail.com> <CAOASepMaeS8WrCMb+WHV0FC2_w3f0KnY5XuDsuWJhAW2ayfryQ@mail.gmail.com> <91B882A0-48A0-4F08-8ADB-B675D9F1C08F@oracle.com> <7041D358-E4C8-4D8C-BD94-0D65C238B449@ve7jtb.com> <CA+k3eCSnj=3a9OiUSy=_5D4K-Er75FKxhcmPgzV6BhjcUaLERA@mail.gmail.com> <81AD4E5B-BBC7-4E7A-8075-EB43BC3962F8@ve7jtb.com>
In-Reply-To: <81AD4E5B-BBC7-4E7A-8075-EB43BC3962F8@ve7jtb.com>
Date: Thu, 27 Jul 2017 15:56:31 -0700
Message-ID: <022e01d3072b$997eab80$cc7c0280$@augustcellars.com>
MIME-Version: 1.0
X-Mailer: Microsoft Outlook 16.0
Thread-Index: AQKHH2VI+OeMwPc+ZUkxtnVaGSt4zgKKIEysAp0kgMUCgqvlGAE7vSrFAkDebrACu261lgGhbu7joIP805A=
X-Originating-IP: [24.21.96.37]
Archived-At: <https://mailarchive.ietf.org/arch/msg/jose/iVaQyElHQmuJdpQqQfiEghnpUJE>
Subject: Re: [jose] [OAUTH-WG] preventing confusion of one kind of JWT for another in JWT BCP
X-BeenThere: jose@ietf.org
X-Mailman-Version: 2.1.22
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: Thu, 27 Jul 2017 22:56:58 -0000

------=_NextPart_000_022F_01D306F0.ED22B9B0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable

One simple way to implement it would be to have an call which says =
=E2=80=9CI will deal with the following items if they exist=E2=80=9D.  =
This means that all the application needs to do is to say that it will =
process p and not what values are acceptable.

=20

Jim

=20

=20

From: jose [mailto:jose-bounces@ietf.org] On Behalf Of John Bradley
Sent: Thursday, July 27, 2017 3:24 PM
To: Brian Campbell <bcampbell@pingidentity.com>
Cc: Nathaniel McCallum <npmccallum@redhat.com>; oauth <oauth@ietf.org>; =
jose@ietf.org; Phil Hunt <phil.hunt@oracle.com>
Subject: Re: [jose] [OAUTH-WG] preventing confusion of one kind of JWT =
for another in JWT BCP

=20

My only concern with a crit header is that it is potentially another =
layering violation.

=20

It really should be the application and not JWS/JWE that determines if =
the content of the JWT is correct at a application layer.

=20

To get your idea to work the application would need to push down to the =
JWT layer some value/s of p that it was willing to accept.   Without =
crit the application could just pass along typ or p to the application =
layer for matching.

=20

I don=E2=80=99t hate the idea but it seems like it is likely to work =
against having generic JOSE libs separate from JWT. Perhaps that is the =
reality anyway.

=20

How would you implement it?

=20

John B.

=20

On Jul 27, 2017, at 6:10 PM, Brian Campbell <bcampbell@pingidentity.com =
<mailto:bcampbell@pingidentity.com> > wrote:

=20

I wouldn't disagree that the issue with Connect is overstated sometimes. =
And it's a non-issue with sec event due to the "nonce" claim (as you =
point out) as well as the omission of the "exp" claim. Assuming correct =
validation anyway.=20

The BCP draft suggests explicit typing to prevent Cross-JWT Confusion =
more generally (not just sec events and id tokens). I was wondering if =
some use of "crit" might accomplish the same thing but also cover the =
case of existing JWT implementations being confused with new JWT =
profiles.=20

=20

On Thu, Jul 27, 2017 at 3:40 PM, John Bradley <ve7jtb@ve7jtb.com =
<mailto:ve7jtb@ve7jtb.com> > wrote:

Not that I am against the general desire for JWT not to be confused, but =
the attack surface for someone to take a sec event from one context and =
replay it as a id_token to login is very small and if the client is =
correctly configured would not work as it is now.

=20

The only way you could replay the sec event JWT is via the implicit =
flow.   The other flows would require a malicious AS and at that point =
you have bigger problems with a compromised token endpoint.

=20

If you were to create a implicit response with the sec event token that =
has the correct issuer and aud, connect requires that nonce value from =
the request be present in the id_token.   This would require that the =
attacker somehow get the AS to put not only the claim but the correct =
value from the request into the token.

=20

All in all I think that it is more likely (not 100% I admit) that a =
client will do that rather than checking the typ or a new crit JWT =
header parameter.

=20

I am all for a general solution for this but I think the issue with =
Connect is overstated sometimes.

=20

John B.

=20

On Jul 27, 2017, at 5:19 PM, Phil Hunt <phil.hunt@oracle.com =
<mailto:phil.hunt@oracle.com> > wrote:

=20

We have the use case in SECEVENTS where a logout event (e.g. OIDF =
backchannel logout) is extremely close to an ID_TOKEN.=20

=20

Older relying parties who are do not yet support logout could be tricked =
into accepting a logout assertion as an ID_TOKEN since they are too =
similar, and  because a valid ID_TOKEN parser is in theory allowed to =
ignore claims it does not understand (e.g. =E2=80=9Cevents=E2=80=9D) - =
leading to a possible erroneous acceptance of the logout event AS and =
ID_TOKEN.

=20

Because of this the issue of distinguishing classes or types of JWTs =
emerged.

=20

We discussed a number of differentiators like =E2=80=9Caud=E2=80=9D, =
=E2=80=9Ctyp=E2=80=9D, =E2=80=9Ccrit", etc that would help.  But that =
really lead to the idea there there should be some best practices in the =
JWT BCP covering the issue(s).

=20

Phil

=20

Oracle Corporation, Identity Cloud Services Architect & Standards

@independentid

www.independentid.com <http://www.independentid.com/>=20

phil.hunt@oracle.com <mailto:phil.hunt@oracle.com>=20

=20

On Jul 27, 2017, at 2:00 PM, Nathaniel McCallum <npmccallum@redhat.com =
<mailto:npmccallum@redhat.com> > wrote:

=20

Even after reading the whole section, I still don't understand the
problem. Yes, a class of attack could exist where an attacker
substitutes a valid JWT from one security context into another
context. But isn't this resolved by audience validation?

On Thu, Jul 27, 2017 at 3:34 PM, Brian Campbell
<bcampbell@pingidentity.com <mailto:bcampbell@pingidentity.com> > wrote:



The draft describes it in
https://urldefense.proofpoint.com/v2/url?u=3Dhttps-3A__tools.ietf.org_htm=
l_draft-2Dsheffer-2Doauth-2Djwt-2Dbcp-2D01-23section-2D2.7 =
<https://urldefense.proofpoint.com/v2/url?u=3Dhttps-3A__tools.ietf.org_ht=
ml_draft-2Dsheffer-2Doauth-2Djwt-2Dbcp-2D01-23section-2D2.7&d=3DDwICAg&c=3D=
RoP1YumCXCgaWHvlZYR8PQcxBKCX5YTpkKY057SbK10&r=3DJBm5biRrKugCH0FkITSeGJxPE=
ivzjWwlNKe4C_lLIGk&m=3D02yWnzzFGNlefgVregxSncXu0b9sbh5pTrtBfQsC52A&s=3D9G=
mPCouCMXE4enC48gfq0l0yc7ZlIxvEBAnQCVja_kY&e=3D> =
&d=3DDwICAg&c=3DRoP1YumCXCgaWHvlZYR8PQcxBKCX5YTpkKY057SbK10&r=3DJBm5biRrK=
ugCH0FkITSeGJxPEivzjWwlNKe4C_lLIGk&m=3D02yWnzzFGNlefgVregxSncXu0b9sbh5pTr=
tBfQsC52A&s=3D9GmPCouCMXE4enC48gfq0l0yc7ZlIxvEBAnQCVja_kY&e=3D=20

On Thu, Jul 27, 2017 at 1:30 PM, Nathaniel McCallum =
<npmccallum@redhat.com <mailto:npmccallum@redhat.com> >
wrote:




What class of attacks is this trying to prevent? I frankly don't see a
problem with confusing different types of JWT. But I may just be
ignorant.

On Thu, Jul 27, 2017 at 2:49 PM, Brian Campbell
<bcampbell@pingidentity.com <mailto:bcampbell@pingidentity.com> > wrote:



During the first WG meeting last week I asked if use of the JOSE "crit"
(Critical) Header Parameter had been considered as a recommendation for
preventing confusion of one kind of JWT for another. Time was running
short
in the meeting so there wasn't much discussion and it was requested that
I
take the question to the list. And so here on the list is that.

Section 3.9 of the JWT BCP draft now recommends explicit typing using
the
"typ" JWS/JWE header parameter but does concede that 'the use of
explicit
typing may not achieve disambiguation from existing kinds of JWTs, as
the
validation rules for existing kinds JWTs often do not use the "typ"
header
parameter value.'  And the recommendations for how to use the Type
Header
Parameter in JWT strongly suggest that it's not currently being used for
any
validation.

Alternatively using the JWS/JWE "crit" (Critical) Header Parameter to
signal
the type/intent/profile/application of a JWT could achieve
disambiguation
even in validation of existing kinds of JWTs. The critical header lists
other headers which must be understood and processed by the receiver and
that the JWS/JWE is invalid if those listed aren't understood. So a new
type/profile of JWT that uses the "crit" header would produce JWTs that
would be rejected even by existing applications of JWT validation (that
actually implement "crit" properly anyway).

The JWT BCP could suggest the use of "crit" in conjunction with a
profile/application/type specific header. Or it could provide a bit more
of
a framework like defining a registering a new JOSE header "p" (strawman
of p
as a very short name for profile) and create a registry for its values.
A
JWT header using that approach might look like the following where the
value
1 is registered as some cool new JWT profile/application. The consumer
of
such a JWT would have to understand and process the "p" header, which
would
mean checking that it had the value expected.

    {
     "alg":"ES256",
     "crit":["p"],
     "p":1
    }

A JOSE compliant JWT validator would reject such a JWT even for an OAuth
access token or OIDC id_token because the "p" header isn't known or
understood but is marked as critical.

To me, that seems like an approach to preventing confusion that has more
teeth than the "typ" header. Which is why I asked about it last week and
am
now bringing it to the list.










CONFIDENTIALITY NOTICE: This email may contain confidential and
privileged
material for the sole use of the intended recipient(s). Any review, use,
distribution or disclosure by others is strictly prohibited.  If you
have
received this communication in error, please notify the sender
immediately
by e-mail and delete the message and any file attachments from your
computer. Thank you.
_______________________________________________
jose mailing list
jose@ietf.org <mailto:jose@ietf.org>=20
https://urldefense.proofpoint.com/v2/url?u=3Dhttps-3A__www.ietf.org_mailm=
an_listinfo_jose =
<https://urldefense.proofpoint.com/v2/url?u=3Dhttps-3A__www.ietf.org_mail=
man_listinfo_jose&d=3DDwICAg&c=3DRoP1YumCXCgaWHvlZYR8PQcxBKCX5YTpkKY057Sb=
K10&r=3DJBm5biRrKugCH0FkITSeGJxPEivzjWwlNKe4C_lLIGk&m=3D02yWnzzFGNlefgVre=
gxSncXu0b9sbh5pTrtBfQsC52A&s=3DeJ8QZBwe5AO-RDl_E16U1q_KpobaeSRUP4Cp2W-_jJ=
U&e=3D> =
&d=3DDwICAg&c=3DRoP1YumCXCgaWHvlZYR8PQcxBKCX5YTpkKY057SbK10&r=3DJBm5biRrK=
ugCH0FkITSeGJxPEivzjWwlNKe4C_lLIGk&m=3D02yWnzzFGNlefgVregxSncXu0b9sbh5pTr=
tBfQsC52A&s=3DeJ8QZBwe5AO-RDl_E16U1q_KpobaeSRUP4Cp2W-_jJU&e=3D=20




CONFIDENTIALITY NOTICE: This email may contain confidential and =
privileged
material for the sole use of the intended recipient(s). Any review, use,
distribution or disclosure by others is strictly prohibited.  If you =
have
received this communication in error, please notify the sender =
immediately
by e-mail and delete the message and any file attachments from your
computer. Thank you.


_______________________________________________
jose mailing list
jose@ietf.org <mailto:jose@ietf.org>=20
https://urldefense.proofpoint.com/v2/url?u=3Dhttps-3A__www.ietf.org_mailm=
an_listinfo_jose =
<https://urldefense.proofpoint.com/v2/url?u=3Dhttps-3A__www.ietf.org_mail=
man_listinfo_jose&d=3DDwICAg&c=3DRoP1YumCXCgaWHvlZYR8PQcxBKCX5YTpkKY057Sb=
K10&r=3DJBm5biRrKugCH0FkITSeGJxPEivzjWwlNKe4C_lLIGk&m=3D02yWnzzFGNlefgVre=
gxSncXu0b9sbh5pTrtBfQsC52A&s=3DeJ8QZBwe5AO-RDl_E16U1q_KpobaeSRUP4Cp2W-_jJ=
U&e=3D> =
&d=3DDwICAg&c=3DRoP1YumCXCgaWHvlZYR8PQcxBKCX5YTpkKY057SbK10&r=3DJBm5biRrK=
ugCH0FkITSeGJxPEivzjWwlNKe4C_lLIGk&m=3D02yWnzzFGNlefgVregxSncXu0b9sbh5pTr=
tBfQsC52A&s=3DeJ8QZBwe5AO-RDl_E16U1q_KpobaeSRUP4Cp2W-_jJU&e=3D=20

=20

_______________________________________________
OAuth mailing list
OAuth@ietf.org <mailto:OAuth@ietf.org>=20
https://www.ietf.org/mailman/listinfo/oauth

=20


_______________________________________________
OAuth mailing list
OAuth@ietf.org <mailto:OAuth@ietf.org>=20
https://www.ietf.org/mailman/listinfo/oauth

=20


CONFIDENTIALITY NOTICE: This email may contain confidential and =
privileged material for the sole use of the intended recipient(s). Any =
review, use, distribution or disclosure by others is strictly =
prohibited.  If you have received this communication in error, please =
notify the sender immediately by e-mail and delete the message and any =
file attachments from your computer. Thank you.

=20


------=_NextPart_000_022F_01D306F0.ED22B9B0
Content-Type: text/html; charset="utf-8"
Content-Transfer-Encoding: quoted-printable

<html xmlns:v=3D"urn:schemas-microsoft-com:vml" =
xmlns:o=3D"urn:schemas-microsoft-com:office:office" =
xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" =
xmlns=3D"http://www.w3.org/TR/REC-html40"><head><meta =
http-equiv=3DContent-Type content=3D"text/html; charset=3Dutf-8"><meta =
name=3DGenerator content=3D"Microsoft Word 15 (filtered =
medium)"><style><!--
/* Font Definitions */
@font-face
	{font-family:"Cambria Math";
	panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
	{font-family:Calibri;
	panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
	{font-family:"Segoe UI";
	panose-1:2 11 5 2 4 2 4 2 2 3;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0in;
	margin-bottom:.0001pt;
	font-size:11.0pt;
	font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
	{mso-style-priority:99;
	color:blue;
	text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
	{mso-style-priority:99;
	color:purple;
	text-decoration:underline;}
p.msonormal0, li.msonormal0, div.msonormal0
	{mso-style-name:msonormal;
	mso-margin-top-alt:auto;
	margin-right:0in;
	mso-margin-bottom-alt:auto;
	margin-left:0in;
	font-size:11.0pt;
	font-family:"Calibri",sans-serif;}
span.m540525143237316654apple-style-span
	{mso-style-name:m_540525143237316654apple-style-span;}
span.EmailStyle19
	{mso-style-type:personal-reply;
	font-family:"Calibri",sans-serif;
	color:windowtext;}
.MsoChpDefault
	{mso-style-type:export-only;
	font-size:10.0pt;}
@page WordSection1
	{size:8.5in 11.0in;
	margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
	{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext=3D"edit">
<o:idmap v:ext=3D"edit" data=3D"1" />
</o:shapelayout></xml><![endif]--></head><body lang=3DEN-US link=3Dblue =
vlink=3Dpurple><div class=3DWordSection1><p class=3DMsoNormal>One simple =
way to implement it would be to have an call which says =E2=80=9CI will =
deal with the following items if they exist=E2=80=9D.=C2=A0 This means =
that all the application needs to do is to say that it will process p =
and not what values are acceptable.<o:p></o:p></p><p =
class=3DMsoNormal><o:p>&nbsp;</o:p></p><p =
class=3DMsoNormal>Jim<o:p></o:p></p><p =
class=3DMsoNormal><o:p>&nbsp;</o:p></p><p =
class=3DMsoNormal><o:p>&nbsp;</o:p></p><div =
style=3D'border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in =
4.0pt'><div><div style=3D'border:none;border-top:solid #E1E1E1 =
1.0pt;padding:3.0pt 0in 0in 0in'><p class=3DMsoNormal><b>From:</b> jose =
[mailto:jose-bounces@ietf.org] <b>On Behalf Of </b>John =
Bradley<br><b>Sent:</b> Thursday, July 27, 2017 3:24 PM<br><b>To:</b> =
Brian Campbell &lt;bcampbell@pingidentity.com&gt;<br><b>Cc:</b> =
Nathaniel McCallum &lt;npmccallum@redhat.com&gt;; oauth =
&lt;oauth@ietf.org&gt;; jose@ietf.org; Phil Hunt =
&lt;phil.hunt@oracle.com&gt;<br><b>Subject:</b> Re: [jose] [OAUTH-WG] =
preventing confusion of one kind of JWT for another in JWT =
BCP<o:p></o:p></p></div></div><p =
class=3DMsoNormal><o:p>&nbsp;</o:p></p><p class=3DMsoNormal>My only =
concern with a crit header is that it is potentially another layering =
violation.<o:p></o:p></p><div><p =
class=3DMsoNormal><o:p>&nbsp;</o:p></p></div><div><p =
class=3DMsoNormal>It really should be the application and not JWS/JWE =
that determines if the content of the JWT is correct at a application =
layer.<o:p></o:p></p></div><div><p =
class=3DMsoNormal><o:p>&nbsp;</o:p></p></div><div><p =
class=3DMsoNormal>To get your idea to work the application would need to =
push down to the JWT layer some value/s of p that it was willing to =
accept. &nbsp; Without crit the application could just pass along typ or =
p to the application layer for matching.<o:p></o:p></p></div><div><p =
class=3DMsoNormal><o:p>&nbsp;</o:p></p></div><div><p class=3DMsoNormal>I =
don=E2=80=99t hate the idea but it seems like it is likely to work =
against having generic JOSE libs separate from JWT. Perhaps that is the =
reality anyway.<o:p></o:p></p></div><div><p =
class=3DMsoNormal><o:p>&nbsp;</o:p></p></div><div><p =
class=3DMsoNormal>How would you implement =
it?<o:p></o:p></p></div><div><p =
class=3DMsoNormal><o:p>&nbsp;</o:p></p></div><div><p =
class=3DMsoNormal>John B.<o:p></o:p></p></div><div><p =
class=3DMsoNormal><o:p>&nbsp;</o:p></p><div><blockquote =
style=3D'margin-top:5.0pt;margin-bottom:5.0pt'><div><p =
class=3DMsoNormal>On Jul 27, 2017, at 6:10 PM, Brian Campbell &lt;<a =
href=3D"mailto:bcampbell@pingidentity.com">bcampbell@pingidentity.com</a>=
&gt; wrote:<o:p></o:p></p></div><p =
class=3DMsoNormal><o:p>&nbsp;</o:p></p><div><div><div><p =
class=3DMsoNormal style=3D'margin-bottom:12.0pt'>I wouldn't disagree =
that the issue with Connect is overstated sometimes. And it's a =
non-issue with sec event due to the &quot;nonce&quot; claim (as you =
point out) as well as the omission of the &quot;exp&quot; claim. =
Assuming correct validation anyway. <o:p></o:p></p></div><p =
class=3DMsoNormal>The BCP draft suggests explicit typing to prevent =
Cross-JWT Confusion more generally (not just sec events and id tokens). =
I was wondering if some use of &quot;crit&quot; might accomplish the =
same thing but also cover the case of existing JWT implementations being =
confused with new JWT profiles. <o:p></o:p></p></div><div><p =
class=3DMsoNormal><o:p>&nbsp;</o:p></p><div><p class=3DMsoNormal>On Thu, =
Jul 27, 2017 at 3:40 PM, John Bradley &lt;<a =
href=3D"mailto:ve7jtb@ve7jtb.com" =
target=3D"_blank">ve7jtb@ve7jtb.com</a>&gt; =
wrote:<o:p></o:p></p><blockquote style=3D'border:none;border-left:solid =
#CCCCCC 1.0pt;padding:0in 0in 0in =
6.0pt;margin-left:4.8pt;margin-right:0in'><div><p class=3DMsoNormal>Not =
that I am against the general desire for JWT not to be confused, but the =
attack surface for someone to take a sec event from one context and =
replay it as a id_token to login is very small and if the client is =
correctly configured would not work as it is now.<o:p></o:p></p><div><p =
class=3DMsoNormal><o:p>&nbsp;</o:p></p></div><div><p =
class=3DMsoNormal>The only way you could replay the sec event JWT is via =
the implicit flow. &nbsp; The other flows would require a malicious AS =
and at that point you have bigger problems with a compromised token =
endpoint.<o:p></o:p></p></div><div><p =
class=3DMsoNormal><o:p>&nbsp;</o:p></p></div><div><p =
class=3DMsoNormal>If you were to create a implicit response with the sec =
event token that has the correct issuer and aud, connect requires that =
nonce value from the request be present in the id_token. &nbsp; This =
would require that the attacker somehow get the AS to put not only the =
claim but the correct value from the request into the =
token.<o:p></o:p></p></div><div><p =
class=3DMsoNormal><o:p>&nbsp;</o:p></p></div><div><p =
class=3DMsoNormal>All in all I think that it is more likely (not 100% I =
admit) that a client will do that rather than checking the typ or a new =
crit JWT header parameter.<o:p></o:p></p></div><div><p =
class=3DMsoNormal><o:p>&nbsp;</o:p></p></div><div><p class=3DMsoNormal>I =
am all for a general solution for this but I think the issue with =
Connect is overstated sometimes.<o:p></o:p></p></div><div><p =
class=3DMsoNormal><o:p>&nbsp;</o:p></p></div><div><p =
class=3DMsoNormal>John B.<o:p></o:p></p></div><div><p =
class=3DMsoNormal>&nbsp;<o:p></o:p></p><div><blockquote =
style=3D'margin-top:5.0pt;margin-bottom:5.0pt'><div><div><div><p =
class=3DMsoNormal>On Jul 27, 2017, at 5:19 PM, Phil Hunt &lt;<a =
href=3D"mailto:phil.hunt@oracle.com" =
target=3D"_blank">phil.hunt@oracle.com</a>&gt; =
wrote:<o:p></o:p></p></div><p =
class=3DMsoNormal><o:p>&nbsp;</o:p></p></div></div><div><div><div><div><p=
 class=3DMsoNormal>We have the use case in SECEVENTS where a logout =
event (e.g. OIDF backchannel logout) is extremely close to an =
ID_TOKEN.&nbsp;<o:p></o:p></p><div><p =
class=3DMsoNormal><o:p>&nbsp;</o:p></p></div><div><p =
class=3DMsoNormal>Older relying parties who are do not yet support =
logout could be tricked into accepting a logout assertion as an ID_TOKEN =
since they are too similar, and &nbsp;because a valid ID_TOKEN parser is =
in theory allowed to ignore claims it does not understand (e.g. =
=E2=80=9Cevents=E2=80=9D) - leading to a possible erroneous acceptance =
of the logout event AS and ID_TOKEN.<o:p></o:p></p></div><div><p =
class=3DMsoNormal><o:p>&nbsp;</o:p></p></div><div><p =
class=3DMsoNormal>Because of this the issue of distinguishing classes or =
types of JWTs emerged.<o:p></o:p></p></div><div><p =
class=3DMsoNormal><o:p>&nbsp;</o:p></p></div><div><p =
class=3DMsoNormal>We discussed a number of differentiators like =
=E2=80=9Caud=E2=80=9D, =E2=80=9Ctyp=E2=80=9D, =E2=80=9Ccrit&quot;, etc =
that would help.&nbsp; But that really lead to the idea there there =
should be some best practices in the JWT BCP covering the =
issue(s).<o:p></o:p></p></div><div><p =
class=3DMsoNormal><o:p>&nbsp;</o:p></p><div><div><div><div><div><div><div=
><div><div><div><div><div><div><div><div><div><div><p =
class=3DMsoNormal>Phil<o:p></o:p></p></div><div><p =
class=3DMsoNormal><o:p>&nbsp;</o:p></p></div><div><p =
class=3DMsoNormal>Oracle Corporation, Identity Cloud Services Architect =
&amp; Standards<o:p></o:p></p></div><div><p =
class=3DMsoNormal>@independentid<o:p></o:p></p></div><div><p =
class=3DMsoNormal><a href=3D"http://www.independentid.com/" =
target=3D"_blank">www.independentid.com</a><o:p></o:p></p></div></div></d=
iv></div><p class=3DMsoNormal><a href=3D"mailto:phil.hunt@oracle.com" =
target=3D"_blank">phil.hunt@oracle.com</a><o:p></o:p></p></div></div></di=
v></div></div></div></div></div></div></div></div></div></div><p =
class=3DMsoNormal><o:p>&nbsp;</o:p></p><div><blockquote =
style=3D'margin-top:5.0pt;margin-bottom:5.0pt'><div><p =
class=3DMsoNormal>On Jul 27, 2017, at 2:00 PM, Nathaniel McCallum &lt;<a =
href=3D"mailto:npmccallum@redhat.com" =
target=3D"_blank">npmccallum@redhat.com</a>&gt; =
wrote:<o:p></o:p></p></div><p =
class=3DMsoNormal><o:p>&nbsp;</o:p></p><div><div><p =
class=3DMsoNormal>Even after reading the whole section, I still don't =
understand the<br>problem. Yes, a class of attack could exist where an =
attacker<br>substitutes a valid JWT from one security context into =
another<br>context. But isn't this resolved by audience =
validation?<br><br>On Thu, Jul 27, 2017 at 3:34 PM, Brian =
Campbell<br>&lt;<a href=3D"mailto:bcampbell@pingidentity.com" =
target=3D"_blank">bcampbell@pingidentity.com</a>&gt; =
wrote:<br><br><o:p></o:p></p><blockquote =
style=3D'margin-top:5.0pt;margin-bottom:5.0pt'><p class=3DMsoNormal>The =
draft describes it in<br><a =
href=3D"https://urldefense.proofpoint.com/v2/url?u=3Dhttps-3A__tools.ietf=
.org_html_draft-2Dsheffer-2Doauth-2Djwt-2Dbcp-2D01-23section-2D2.7&amp;d=3D=
DwICAg&amp;c=3DRoP1YumCXCgaWHvlZYR8PQcxBKCX5YTpkKY057SbK10&amp;r=3DJBm5bi=
RrKugCH0FkITSeGJxPEivzjWwlNKe4C_lLIGk&amp;m=3D02yWnzzFGNlefgVregxSncXu0b9=
sbh5pTrtBfQsC52A&amp;s=3D9GmPCouCMXE4enC48gfq0l0yc7ZlIxvEBAnQCVja_kY&amp;=
e=3D" =
target=3D"_blank">https://urldefense.proofpoint.com/v2/url?u=3Dhttps-3A__=
tools.ietf.org_html_draft-2Dsheffer-2Doauth-2Djwt-2Dbcp-2D01-23section-2D=
2.7&amp;d=3DDwICAg&amp;c=3DRoP1YumCXCgaWHvlZYR8PQcxBKCX5YTpkKY057SbK10&am=
p;r=3DJBm5biRrKugCH0FkITSeGJxPEivzjWwlNKe4C_lLIGk&amp;m=3D02yWnzzFGNlefgV=
regxSncXu0b9sbh5pTrtBfQsC52A&amp;s=3D9GmPCouCMXE4enC48gfq0l0yc7ZlIxvEBAnQ=
CVja_kY&amp;e=3D</a> <br><br>On Thu, Jul 27, 2017 at 1:30 PM, Nathaniel =
McCallum &lt;<a href=3D"mailto:npmccallum@redhat.com" =
target=3D"_blank">npmccallum@redhat.com</a>&gt;<br>wrote:<br><br><o:p></o=
:p></p><blockquote style=3D'margin-top:5.0pt;margin-bottom:5.0pt'><p =
class=3DMsoNormal><br>What class of attacks is this trying to prevent? I =
frankly don't see a<br>problem with confusing different types of JWT. =
But I may just be<br>ignorant.<br><br>On Thu, Jul 27, 2017 at 2:49 PM, =
Brian Campbell<br>&lt;<a href=3D"mailto:bcampbell@pingidentity.com" =
target=3D"_blank">bcampbell@pingidentity.com</a>&gt; =
wrote:<br><br><o:p></o:p></p><blockquote =
style=3D'margin-top:5.0pt;margin-bottom:5.0pt'><p class=3DMsoNormal =
style=3D'margin-bottom:12.0pt'>During the first WG meeting last week I =
asked if use of the JOSE &quot;crit&quot;<br>(Critical) Header Parameter =
had been considered as a recommendation for<br>preventing confusion of =
one kind of JWT for another. Time was running<br>short<br>in the meeting =
so there wasn't much discussion and it was requested that<br>I<br>take =
the question to the list. And so here on the list is =
that.<br><br>Section 3.9 of the JWT BCP draft now recommends explicit =
typing using<br>the<br>&quot;typ&quot; JWS/JWE header parameter but does =
concede that 'the use of<br>explicit<br>typing may not achieve =
disambiguation from existing kinds of JWTs, as<br>the<br>validation =
rules for existing kinds JWTs often do not use the =
&quot;typ&quot;<br>header<br>parameter value.' &nbsp;And the =
recommendations for how to use the Type<br>Header<br>Parameter in JWT =
strongly suggest that it's not currently being used =
for<br>any<br>validation.<br><br>Alternatively using the JWS/JWE =
&quot;crit&quot; (Critical) Header Parameter to<br>signal<br>the =
type/intent/profile/application of a JWT could =
achieve<br>disambiguation<br>even in validation of existing kinds of =
JWTs. The critical header lists<br>other headers which must be =
understood and processed by the receiver and<br>that the JWS/JWE is =
invalid if those listed aren't understood. So a new<br>type/profile of =
JWT that uses the &quot;crit&quot; header would produce JWTs =
that<br>would be rejected even by existing applications of JWT =
validation (that<br>actually implement &quot;crit&quot; properly =
anyway).<br><br>The JWT BCP could suggest the use of &quot;crit&quot; in =
conjunction with a<br>profile/application/type specific header. Or it =
could provide a bit more<br>of<br>a framework like defining a =
registering a new JOSE header &quot;p&quot; (strawman<br>of p<br>as a =
very short name for profile) and create a registry for its =
values.<br>A<br>JWT header using that approach might look like the =
following where the<br>value<br>1 is registered as some cool new JWT =
profile/application. The consumer<br>of<br>such a JWT would have to =
understand and process the &quot;p&quot; header, which<br>would<br>mean =
checking that it had the value =
expected.<br><br>&nbsp;&nbsp;&nbsp;&nbsp;{<br>&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&quot;alg&quot;:&quot;ES256&quot;,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&q=
uot;crit&quot;:[&quot;p&quot;],<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;p&=
quot;:1<br>&nbsp;&nbsp;&nbsp;&nbsp;}<br><br>A JOSE compliant JWT =
validator would reject such a JWT even for an OAuth<br>access token or =
OIDC id_token because the &quot;p&quot; header isn't known =
or<br>understood but is marked as critical.<br><br>To me, that seems =
like an approach to preventing confusion that has more<br>teeth than the =
&quot;typ&quot; header. Which is why I asked about it last week =
and<br>am<br>now bringing it to the =
list.<br><br><br><br><br><br><br><br><br><br><br>CONFIDENTIALITY NOTICE: =
This email may contain confidential and<br>privileged<br>material for =
the sole use of the intended recipient(s). Any review, =
use,<br>distribution or disclosure by others is strictly =
prohibited.&nbsp; If you<br>have<br>received this communication in =
error, please notify the sender<br>immediately<br>by e-mail and delete =
the message and any file attachments from your<br>computer. Thank =
you.<br>_______________________________________________<br>jose mailing =
list<br><a href=3D"mailto:jose@ietf.org" =
target=3D"_blank">jose@ietf.org</a><br><a =
href=3D"https://urldefense.proofpoint.com/v2/url?u=3Dhttps-3A__www.ietf.o=
rg_mailman_listinfo_jose&amp;d=3DDwICAg&amp;c=3DRoP1YumCXCgaWHvlZYR8PQcxB=
KCX5YTpkKY057SbK10&amp;r=3DJBm5biRrKugCH0FkITSeGJxPEivzjWwlNKe4C_lLIGk&am=
p;m=3D02yWnzzFGNlefgVregxSncXu0b9sbh5pTrtBfQsC52A&amp;s=3DeJ8QZBwe5AO-RDl=
_E16U1q_KpobaeSRUP4Cp2W-_jJU&amp;e=3D" =
target=3D"_blank">https://urldefense.proofpoint.com/v2/url?u=3Dhttps-3A__=
www.ietf.org_mailman_listinfo_jose&amp;d=3DDwICAg&amp;c=3DRoP1YumCXCgaWHv=
lZYR8PQcxBKCX5YTpkKY057SbK10&amp;r=3DJBm5biRrKugCH0FkITSeGJxPEivzjWwlNKe4=
C_lLIGk&amp;m=3D02yWnzzFGNlefgVregxSncXu0b9sbh5pTrtBfQsC52A&amp;s=3DeJ8QZ=
Bwe5AO-RDl_E16U1q_KpobaeSRUP4Cp2W-_jJU&amp;e=3D</a> =
<o:p></o:p></p></blockquote></blockquote><p =
class=3DMsoNormal><br><br><br>CONFIDENTIALITY NOTICE: This email may =
contain confidential and privileged<br>material for the sole use of the =
intended recipient(s). Any review, use,<br>distribution or disclosure by =
others is strictly prohibited.&nbsp; If you have<br>received this =
communication in error, please notify the sender immediately<br>by =
e-mail and delete the message and any file attachments from =
your<br>computer. Thank you.<o:p></o:p></p></blockquote><p =
class=3DMsoNormal><br>_______________________________________________<br>=
jose mailing list<br><a href=3D"mailto:jose@ietf.org" =
target=3D"_blank">jose@ietf.org</a><br><a =
href=3D"https://urldefense.proofpoint.com/v2/url?u=3Dhttps-3A__www.ietf.o=
rg_mailman_listinfo_jose&amp;d=3DDwICAg&amp;c=3DRoP1YumCXCgaWHvlZYR8PQcxB=
KCX5YTpkKY057SbK10&amp;r=3DJBm5biRrKugCH0FkITSeGJxPEivzjWwlNKe4C_lLIGk&am=
p;m=3D02yWnzzFGNlefgVregxSncXu0b9sbh5pTrtBfQsC52A&amp;s=3DeJ8QZBwe5AO-RDl=
_E16U1q_KpobaeSRUP4Cp2W-_jJU&amp;e=3D" =
target=3D"_blank">https://urldefense.proofpoint.com/v2/url?u=3Dhttps-3A__=
www.ietf.org_mailman_listinfo_jose&amp;d=3DDwICAg&amp;c=3DRoP1YumCXCgaWHv=
lZYR8PQcxBKCX5YTpkKY057SbK10&amp;r=3DJBm5biRrKugCH0FkITSeGJxPEivzjWwlNKe4=
C_lLIGk&amp;m=3D02yWnzzFGNlefgVregxSncXu0b9sbh5pTrtBfQsC52A&amp;s=3DeJ8QZ=
Bwe5AO-RDl_E16U1q_KpobaeSRUP4Cp2W-_jJU&amp;e=3D</a> =
<o:p></o:p></p></div></div></blockquote></div><p =
class=3DMsoNormal><o:p>&nbsp;</o:p></p></div></div></div></div><p =
class=3DMsoNormal>_______________________________________________<br>OAut=
h mailing list<br><a href=3D"mailto:OAuth@ietf.org" =
target=3D"_blank">OAuth@ietf.org</a><br><a =
href=3D"https://www.ietf.org/mailman/listinfo/oauth" =
target=3D"_blank">https://www.ietf.org/mailman/listinfo/oauth</a><o:p></o=
:p></p></div></blockquote></div><p =
class=3DMsoNormal><o:p>&nbsp;</o:p></p></div></div><p class=3DMsoNormal =
style=3D'margin-bottom:12.0pt'><br>______________________________________=
_________<br>OAuth mailing list<br><a =
href=3D"mailto:OAuth@ietf.org">OAuth@ietf.org</a><br><a =
href=3D"https://www.ietf.org/mailman/listinfo/oauth" =
target=3D"_blank">https://www.ietf.org/mailman/listinfo/oauth</a><o:p></o=
:p></p></blockquote></div><p =
class=3DMsoNormal><o:p>&nbsp;</o:p></p></div><p =
class=3DMsoNormal><br><b><i><span =
style=3D'font-size:10.0pt;font-family:"Segoe =
UI",sans-serif;color:#555555;border:none windowtext =
1.0pt;padding:0in'>CONFIDENTIALITY NOTICE: This email may contain =
confidential and privileged material for the sole use of the intended =
recipient(s). Any review, use, distribution or disclosure by others is =
strictly prohibited.&nbsp; If you have received this communication in =
error, please notify the sender immediately by e-mail and delete the =
message and any file attachments from your computer. Thank =
you.</span></i></b><o:p></o:p></p></div></blockquote></div><p =
class=3DMsoNormal><o:p>&nbsp;</o:p></p></div></div></div></body></html>
------=_NextPart_000_022F_01D306F0.ED22B9B0--


From nobody Fri Jul 28 05:23:19 2017
Return-Path: <bcampbell@pingidentity.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 03580131FE1 for <jose@ietfa.amsl.com>; Fri, 28 Jul 2017 05:23:18 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.999
X-Spam-Level: 
X-Spam-Status: No, score=-1.999 tagged_above=-999 required=5 tests=[AC_DIV_BONANZA=0.001, BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001] autolearn=unavailable autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=pingidentity.com
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 fUKNPgcfoFpt for <jose@ietfa.amsl.com>; Fri, 28 Jul 2017 05:23:13 -0700 (PDT)
Received: from mail-pf0-x22e.google.com (mail-pf0-x22e.google.com [IPv6:2607:f8b0:400e:c00::22e]) (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 743D0131945 for <jose@ietf.org>; Fri, 28 Jul 2017 05:23:13 -0700 (PDT)
Received: by mail-pf0-x22e.google.com with SMTP id z129so55986612pfb.3 for <jose@ietf.org>; Fri, 28 Jul 2017 05:23:13 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pingidentity.com; s=gmail; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=1VHFSh1xJRM1p8np8Su+U7MoO8GhVpMrH5tkhPSx9iM=; b=G1KiyyPyCuhZ2g1dKc83ML+AOonyit3aw8Z19fReLuAZ2UE5BMw9gqf1s5ITczaQb0 yxOSjO58GJO3hAPRNBjkxXgksfWAmDJHmXyZYbt1CyenqmlUvDfkw8a9RkPXWqmIIuZk S9rPwXL+Mt7YgkdpRs+N3m11JeMp8XukA7sCA=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=1VHFSh1xJRM1p8np8Su+U7MoO8GhVpMrH5tkhPSx9iM=; b=MgqQyNTOcKEtqBKCya/hGBkinUyTg0GTs46cYqrRlHzMhglLi/VqJb3Z3fw11+tlSs 6XeBVyEKeu4wq3mtnfmyvNd99i2AgKFePoNsdjA24WF/Y2KERqrFGKfcZ2Z+r1MqYF5u 7N9aO6jUkggQRBk+xSLfcO9i9Pp+s63+nDW5vr2A3oZ+NxJlxA2w4jr/RO3e1fhaTxU8 /RyY8qkUXz0FklP8nxro7sp6cit2Ga5q919YWr5GxFk9BYa7DuxyDWOptgsnn3WDcfWD GKKEVFFCIlJ+qRtZ8hRJPOn1IyXLUkqUPOzpgw/Le8Mh9pqlpoGqJAX5IEc9hCTEZ2ec r/7w==
X-Gm-Message-State: AIVw111GAH+8IQ/lZnUKBRs/rC/ej7f7/72GIQUBafM2rI0R46fp/6Oh HxSjrcRGxhJ5N8yU545wvhGS7Ahp4527VPxR+ZCZnnTLCGboytj6EeemATcsNWhZv15hFqsQ2OJ tswI=
X-Received: by 10.84.236.4 with SMTP id q4mr7667987plk.423.1501244592887; Fri, 28 Jul 2017 05:23:12 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.100.145.87 with HTTP; Fri, 28 Jul 2017 05:22:42 -0700 (PDT)
In-Reply-To: <022e01d3072b$997eab80$cc7c0280$@augustcellars.com>
References: <CA+k3eCRT_iuLHYrLxz+tf1MT9L9XG2jV0D0anC0h5w7A_ujEdQ@mail.gmail.com> <CAOASepOjYBYoKYEVvCLMzZgsdyGhr2LOB-dNqekxsKFm_gxixg@mail.gmail.com> <CA+k3eCS-Va2AvzRhWia_ETqSDYUMBOoi=sY3jg7TbJFhhuVnZA@mail.gmail.com> <CAOASepMaeS8WrCMb+WHV0FC2_w3f0KnY5XuDsuWJhAW2ayfryQ@mail.gmail.com> <91B882A0-48A0-4F08-8ADB-B675D9F1C08F@oracle.com> <7041D358-E4C8-4D8C-BD94-0D65C238B449@ve7jtb.com> <CA+k3eCSnj=3a9OiUSy=_5D4K-Er75FKxhcmPgzV6BhjcUaLERA@mail.gmail.com> <81AD4E5B-BBC7-4E7A-8075-EB43BC3962F8@ve7jtb.com> <022e01d3072b$997eab80$cc7c0280$@augustcellars.com>
From: Brian Campbell <bcampbell@pingidentity.com>
Date: Fri, 28 Jul 2017 06:22:42 -0600
Message-ID: <CA+k3eCSvo-N1n7hnha9zTBcwY813pjc_+ifckM_7HGJnifh6bg@mail.gmail.com>
To: Jim Schaad <ietf@augustcellars.com>
Cc: John Bradley <ve7jtb@ve7jtb.com>, Nathaniel McCallum <npmccallum@redhat.com>, oauth <oauth@ietf.org>,  "jose@ietf.org" <jose@ietf.org>, Phil Hunt <phil.hunt@oracle.com>
Content-Type: multipart/alternative; boundary="f403045fe2d4ae3b3605555fbe89"
Archived-At: <https://mailarchive.ietf.org/arch/msg/jose/aXsBwoHd39UKhTtynecvc9fJkho>
Subject: Re: [jose] [OAUTH-WG] preventing confusion of one kind of JWT for another in JWT BCP
X-BeenThere: jose@ietf.org
X-Mailman-Version: 2.1.22
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: Fri, 28 Jul 2017 12:23:19 -0000

--f403045fe2d4ae3b3605555fbe89
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

Yeah, I've implemented it in pretty much in the way Jim describes.

In my implementation of JWT validation the application sets things up by
pushing down all the info needed for validation (things like expected
audience & issuer, keys, allowed algorithms, etc.). So I'm probably biased
by that but also telling it that 'p' is okay as a critical header doesn't
feel like any more of a layering violation than anything else.

This example
<https://bitbucket.org/b_c/jose4j/wiki/JWT%20Examples#markdown-header-produ=
cing-and-consuming-a-signed-jwt>
shows how to use the library for regular JWT validation. This method
<http://static.javadoc.io/org.bitbucket.b_c/jose4j/0.5.6/org/jose4j/jwt/con=
sumer/JwtConsumerBuilder.html#setJwsCustomizer%28org.jose4j.jwt.consumer.Jw=
sCustomizer%29>
would be used to tell the JWT validator/consumer that the 'p' as a critical
header should be accepted. And then the JWT validator/consumer could be
told what value of 'p' is acceptable or required by adding a validator for
it
<http://static.javadoc.io/org.bitbucket.b_c/jose4j/0.5.6/org/jose4j/jwt/con=
sumer/JwtConsumerBuilder.html#registerValidator(org.jose4j.jwt.consumer.Val=
idator)>
or the application code could just look at the headers after and check it
that way. That's how it could be done now with the existing general API. If
the BCP was to formalize something, I'd probably enhance the API with
something specific for it to make it even easier.




On Thu, Jul 27, 2017 at 4:56 PM, Jim Schaad <ietf@augustcellars.com> wrote:

> One simple way to implement it would be to have an call which says =E2=80=
=9CI will
> deal with the following items if they exist=E2=80=9D.  This means that al=
l the
> application needs to do is to say that it will process p and not what
> values are acceptable.
>
>
>
> Jim
>
>
>
>
>
> *From:* jose [mailto:jose-bounces@ietf.org] *On Behalf Of *John Bradley
> *Sent:* Thursday, July 27, 2017 3:24 PM
> *To:* Brian Campbell <bcampbell@pingidentity.com>
> *Cc:* Nathaniel McCallum <npmccallum@redhat.com>; oauth <oauth@ietf.org>;
> jose@ietf.org; Phil Hunt <phil.hunt@oracle.com>
> *Subject:* Re: [jose] [OAUTH-WG] preventing confusion of one kind of JWT
> for another in JWT BCP
>
>
>
> My only concern with a crit header is that it is potentially another
> layering violation.
>
>
>
> It really should be the application and not JWS/JWE that determines if th=
e
> content of the JWT is correct at a application layer.
>
>
>
> To get your idea to work the application would need to push down to the
> JWT layer some value/s of p that it was willing to accept.   Without crit
> the application could just pass along typ or p to the application layer f=
or
> matching.
>
>
>
> I don=E2=80=99t hate the idea but it seems like it is likely to work agai=
nst
> having generic JOSE libs separate from JWT. Perhaps that is the reality
> anyway.
>
>
>
> How would you implement it?
>
>
>
> John B.
>
>
>
> On Jul 27, 2017, at 6:10 PM, Brian Campbell <bcampbell@pingidentity.com>
> wrote:
>
>
>
> I wouldn't disagree that the issue with Connect is overstated sometimes.
> And it's a non-issue with sec event due to the "nonce" claim (as you poin=
t
> out) as well as the omission of the "exp" claim. Assuming correct
> validation anyway.
>
> The BCP draft suggests explicit typing to prevent Cross-JWT Confusion mor=
e
> generally (not just sec events and id tokens). I was wondering if some us=
e
> of "crit" might accomplish the same thing but also cover the case of
> existing JWT implementations being confused with new JWT profiles.
>
>
>
> On Thu, Jul 27, 2017 at 3:40 PM, John Bradley <ve7jtb@ve7jtb.com> wrote:
>
> Not that I am against the general desire for JWT not to be confused, but
> the attack surface for someone to take a sec event from one context and
> replay it as a id_token to login is very small and if the client is
> correctly configured would not work as it is now.
>
>
>
> The only way you could replay the sec event JWT is via the implicit flow.
>   The other flows would require a malicious AS and at that point you have
> bigger problems with a compromised token endpoint.
>
>
>
> If you were to create a implicit response with the sec event token that
> has the correct issuer and aud, connect requires that nonce value from th=
e
> request be present in the id_token.   This would require that the attacke=
r
> somehow get the AS to put not only the claim but the correct value from t=
he
> request into the token.
>
>
>
> All in all I think that it is more likely (not 100% I admit) that a clien=
t
> will do that rather than checking the typ or a new crit JWT header
> parameter.
>
>
>
> I am all for a general solution for this but I think the issue with
> Connect is overstated sometimes.
>
>
>
> John B.
>
>
>
> On Jul 27, 2017, at 5:19 PM, Phil Hunt <phil.hunt@oracle.com> wrote:
>
>
>
> We have the use case in SECEVENTS where a logout event (e.g. OIDF
> backchannel logout) is extremely close to an ID_TOKEN.
>
>
>
> Older relying parties who are do not yet support logout could be tricked
> into accepting a logout assertion as an ID_TOKEN since they are too
> similar, and  because a valid ID_TOKEN parser is in theory allowed to
> ignore claims it does not understand (e.g. =E2=80=9Cevents=E2=80=9D) - le=
ading to a
> possible erroneous acceptance of the logout event AS and ID_TOKEN.
>
>
>
> Because of this the issue of distinguishing classes or types of JWTs
> emerged.
>
>
>
> We discussed a number of differentiators like =E2=80=9Caud=E2=80=9D, =E2=
=80=9Ctyp=E2=80=9D, =E2=80=9Ccrit", etc
> that would help.  But that really lead to the idea there there should be
> some best practices in the JWT BCP covering the issue(s).
>
>
>
> Phil
>
>
>
> Oracle Corporation, Identity Cloud Services Architect & Standards
>
> @independentid
>
> www.independentid.com
>
> phil.hunt@oracle.com
>
>
>
> On Jul 27, 2017, at 2:00 PM, Nathaniel McCallum <npmccallum@redhat.com>
> wrote:
>
>
>
> Even after reading the whole section, I still don't understand the
> problem. Yes, a class of attack could exist where an attacker
> substitutes a valid JWT from one security context into another
> context. But isn't this resolved by audience validation?
>
> On Thu, Jul 27, 2017 at 3:34 PM, Brian Campbell
> <bcampbell@pingidentity.com> wrote:
>
> The draft describes it in
> https://urldefense.proofpoint.com/v2/url?u=3Dhttps-3A__tools.
> ietf.org_html_draft-2Dsheffer-2Doauth-2Djwt-2Dbcp-2D01-
> 23section-2D2.7&d=3DDwICAg&c=3DRoP1YumCXCgaWHvlZYR8PQcxBKCX5YTpkKY057SbK1=
0&r=3D
> JBm5biRrKugCH0FkITSeGJxPEivzjWwlNKe4C_lLIGk&m=3D
> 02yWnzzFGNlefgVregxSncXu0b9sbh5pTrtBfQsC52A&s=3D
> 9GmPCouCMXE4enC48gfq0l0yc7ZlIxvEBAnQCVja_kY&e=3D
>
> On Thu, Jul 27, 2017 at 1:30 PM, Nathaniel McCallum <npmccallum@redhat.co=
m
> >
> wrote:
>
>
> What class of attacks is this trying to prevent? I frankly don't see a
> problem with confusing different types of JWT. But I may just be
> ignorant.
>
> On Thu, Jul 27, 2017 at 2:49 PM, Brian Campbell
> <bcampbell@pingidentity.com> wrote:
>
> During the first WG meeting last week I asked if use of the JOSE "crit"
> (Critical) Header Parameter had been considered as a recommendation for
> preventing confusion of one kind of JWT for another. Time was running
> short
> in the meeting so there wasn't much discussion and it was requested that
> I
> take the question to the list. And so here on the list is that.
>
> Section 3.9 of the JWT BCP draft now recommends explicit typing using
> the
> "typ" JWS/JWE header parameter but does concede that 'the use of
> explicit
> typing may not achieve disambiguation from existing kinds of JWTs, as
> the
> validation rules for existing kinds JWTs often do not use the "typ"
> header
> parameter value.'  And the recommendations for how to use the Type
> Header
> Parameter in JWT strongly suggest that it's not currently being used for
> any
> validation.
>
> Alternatively using the JWS/JWE "crit" (Critical) Header Parameter to
> signal
> the type/intent/profile/application of a JWT could achieve
> disambiguation
> even in validation of existing kinds of JWTs. The critical header lists
> other headers which must be understood and processed by the receiver and
> that the JWS/JWE is invalid if those listed aren't understood. So a new
> type/profile of JWT that uses the "crit" header would produce JWTs that
> would be rejected even by existing applications of JWT validation (that
> actually implement "crit" properly anyway).
>
> The JWT BCP could suggest the use of "crit" in conjunction with a
> profile/application/type specific header. Or it could provide a bit more
> of
> a framework like defining a registering a new JOSE header "p" (strawman
> of p
> as a very short name for profile) and create a registry for its values.
> A
> JWT header using that approach might look like the following where the
> value
> 1 is registered as some cool new JWT profile/application. The consumer
> of
> such a JWT would have to understand and process the "p" header, which
> would
> mean checking that it had the value expected.
>
>     {
>      "alg":"ES256",
>      "crit":["p"],
>      "p":1
>     }
>
> A JOSE compliant JWT validator would reject such a JWT even for an OAuth
> access token or OIDC id_token because the "p" header isn't known or
> understood but is marked as critical.
>
> To me, that seems like an approach to preventing confusion that has more
> teeth than the "typ" header. Which is why I asked about it last week and
> am
> now bringing it to the list.
>
>
>
>
>
>
>
>
>
>
> CONFIDENTIALITY NOTICE: This email may contain confidential and
> privileged
> material for the sole use of the intended recipient(s). Any review, use,
> distribution or disclosure by others is strictly prohibited.  If you
> have
> received this communication in error, please notify the sender
> immediately
> by e-mail and delete the message and any file attachments from your
> computer. Thank you.
> _______________________________________________
> jose mailing list
> jose@ietf.org
> https://urldefense.proofpoint.com/v2/url?u=3Dhttps-3A__www.
> ietf.org_mailman_listinfo_jose&d=3DDwICAg&c=3DRoP1YumCXCgaWHvlZYR8PQcxBKC=
X5Y
> TpkKY057SbK10&r=3DJBm5biRrKugCH0FkITSeGJxPEivzjWwlNKe4C_lLIGk&m=3D
> 02yWnzzFGNlefgVregxSncXu0b9sbh5pTrtBfQsC52A&s=3DeJ8QZBwe5AO-
> RDl_E16U1q_KpobaeSRUP4Cp2W-_jJU&e=3D
>
>
>
>
> CONFIDENTIALITY NOTICE: This email may contain confidential and privilege=
d
> material for the sole use of the intended recipient(s). Any review, use,
> distribution or disclosure by others is strictly prohibited.  If you have
> received this communication in error, please notify the sender immediatel=
y
> by e-mail and delete the message and any file attachments from your
> computer. Thank you.
>
>
> _______________________________________________
> jose mailing list
> jose@ietf.org
> https://urldefense.proofpoint.com/v2/url?u=3Dhttps-3A__www.
> ietf.org_mailman_listinfo_jose&d=3DDwICAg&c=3DRoP1YumCXCgaWHvlZYR8PQcxBKC=
X5Y
> TpkKY057SbK10&r=3DJBm5biRrKugCH0FkITSeGJxPEivzjWwlNKe4C_lLIGk&m=3D
> 02yWnzzFGNlefgVregxSncXu0b9sbh5pTrtBfQsC52A&s=3DeJ8QZBwe5AO-
> RDl_E16U1q_KpobaeSRUP4Cp2W-_jJU&e=3D
>
>
>
> _______________________________________________
> OAuth mailing list
> OAuth@ietf.org
> https://www.ietf.org/mailman/listinfo/oauth
>
>
>
>
> _______________________________________________
> OAuth mailing list
> OAuth@ietf.org
> https://www.ietf.org/mailman/listinfo/oauth
>
>
>
>
> *CONFIDENTIALITY NOTICE: This email may contain confidential and
> privileged material for the sole use of the intended recipient(s). Any
> review, use, distribution or disclosure by others is strictly prohibited.
> If you have received this communication in error, please notify the sende=
r
> immediately by e-mail and delete the message and any file attachments fro=
m
> your computer. Thank you.*
>
>
>

--=20
*CONFIDENTIALITY NOTICE: This email may contain confidential and privileged=
=20
material for the sole use of the intended recipient(s). Any review, use,=20
distribution or disclosure by others is strictly prohibited.  If you have=
=20
received this communication in error, please notify the sender immediately=
=20
by e-mail and delete the message and any file attachments from your=20
computer. Thank you.*

--f403045fe2d4ae3b3605555fbe89
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div>Yeah, I&#39;ve implemented it in pretty much in the w=
ay Jim describes.=C2=A0 <br><br></div><div>In my implementation of JWT vali=
dation the application sets things up by pushing down all the info needed f=
or validation (things like expected audience &amp; issuer, keys, allowed al=
gorithms, etc.). So I&#39;m probably biased by that but also telling it tha=
t &#39;p&#39; is okay as a critical header doesn&#39;t feel like any more o=
f a layering violation than anything else. <br><br><a href=3D"https://bitbu=
cket.org/b_c/jose4j/wiki/JWT%20Examples#markdown-header-producing-and-consu=
ming-a-signed-jwt">This example</a> shows how to use the library for regula=
r JWT validation. <a href=3D"http://static.javadoc.io/org.bitbucket.b_c/jos=
e4j/0.5.6/org/jose4j/jwt/consumer/JwtConsumerBuilder.html#setJwsCustomizer%=
28org.jose4j.jwt.consumer.JwsCustomizer%29">This method</a> would be used t=
o tell the JWT validator/consumer that the &#39;p&#39; as a critical header=
 should be accepted. And then the JWT validator/consumer could be told what=
 value of &#39;p&#39; is acceptable or required by adding <a href=3D"http:/=
/static.javadoc.io/org.bitbucket.b_c/jose4j/0.5.6/org/jose4j/jwt/consumer/J=
wtConsumerBuilder.html#registerValidator(org.jose4j.jwt.consumer.Validator)=
">a validator for it</a> or the application code could just look at the hea=
ders after and check it that way. That&#39;s how it could be done now with =
the existing general API. If the BCP was to formalize something, I&#39;d pr=
obably enhance the API with something specific for it to make it even easie=
r. <br></div><div><br></div><div><br><br></div></div><div class=3D"gmail_ex=
tra"><br><div class=3D"gmail_quote">On Thu, Jul 27, 2017 at 4:56 PM, Jim Sc=
haad <span dir=3D"ltr">&lt;<a href=3D"mailto:ietf@augustcellars.com" target=
=3D"_blank">ietf@augustcellars.com</a>&gt;</span> wrote:<br><blockquote cla=
ss=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;pa=
dding-left:1ex"><div link=3D"blue" vlink=3D"purple" lang=3D"EN-US"><div cla=
ss=3D"m_-4492531785675793551WordSection1"><p class=3D"MsoNormal">One simple=
 way to implement it would be to have an call which says =E2=80=9CI will de=
al with the following items if they exist=E2=80=9D.=C2=A0 This means that a=
ll the application needs to do is to say that it will process p and not wha=
t values are acceptable.<u></u><u></u></p><p class=3D"MsoNormal"><u></u>=C2=
=A0<u></u></p><p class=3D"MsoNormal">Jim<u></u><u></u></p><p class=3D"MsoNo=
rmal"><u></u>=C2=A0<u></u></p><p class=3D"MsoNormal"><u></u>=C2=A0<u></u></=
p><div style=3D"border:none;border-left:solid blue 1.5pt;padding:0in 0in 0i=
n 4.0pt"><div><div style=3D"border:none;border-top:solid #e1e1e1 1.0pt;padd=
ing:3.0pt 0in 0in 0in"><p class=3D"MsoNormal"><b>From:</b> jose [mailto:<a =
href=3D"mailto:jose-bounces@ietf.org" target=3D"_blank">jose-bounces@ietf.o=
rg</a>] <b>On Behalf Of </b>John Bradley<br><b>Sent:</b> Thursday, July 27,=
 2017 3:24 PM<br><b>To:</b> Brian Campbell &lt;<a href=3D"mailto:bcampbell@=
pingidentity.com" target=3D"_blank">bcampbell@pingidentity.com</a>&gt;<br><=
b>Cc:</b> Nathaniel McCallum &lt;<a href=3D"mailto:npmccallum@redhat.com" t=
arget=3D"_blank">npmccallum@redhat.com</a>&gt;; oauth &lt;<a href=3D"mailto=
:oauth@ietf.org" target=3D"_blank">oauth@ietf.org</a>&gt;; <a href=3D"mailt=
o:jose@ietf.org" target=3D"_blank">jose@ietf.org</a>; Phil Hunt &lt;<a href=
=3D"mailto:phil.hunt@oracle.com" target=3D"_blank">phil.hunt@oracle.com</a>=
&gt;<br><b>Subject:</b> Re: [jose] [OAUTH-WG] preventing confusion of one k=
ind of JWT for another in JWT BCP<u></u><u></u></p></div></div><div><div cl=
ass=3D"h5"><p class=3D"MsoNormal"><u></u>=C2=A0<u></u></p><p class=3D"MsoNo=
rmal">My only concern with a crit header is that it is potentially another =
layering violation.<u></u><u></u></p><div><p class=3D"MsoNormal"><u></u>=C2=
=A0<u></u></p></div><div><p class=3D"MsoNormal">It really should be the app=
lication and not JWS/JWE that determines if the content of the JWT is corre=
ct at a application layer.<u></u><u></u></p></div><div><p class=3D"MsoNorma=
l"><u></u>=C2=A0<u></u></p></div><div><p class=3D"MsoNormal">To get your id=
ea to work the application would need to push down to the JWT layer some va=
lue/s of p that it was willing to accept. =C2=A0 Without crit the applicati=
on could just pass along typ or p to the application layer for matching.<u>=
</u><u></u></p></div><div><p class=3D"MsoNormal"><u></u>=C2=A0<u></u></p></=
div><div><p class=3D"MsoNormal">I don=E2=80=99t hate the idea but it seems =
like it is likely to work against having generic JOSE libs separate from JW=
T. Perhaps that is the reality anyway.<u></u><u></u></p></div><div><p class=
=3D"MsoNormal"><u></u>=C2=A0<u></u></p></div><div><p class=3D"MsoNormal">Ho=
w would you implement it?<u></u><u></u></p></div><div><p class=3D"MsoNormal=
"><u></u>=C2=A0<u></u></p></div><div><p class=3D"MsoNormal">John B.<u></u><=
u></u></p></div><div><p class=3D"MsoNormal"><u></u>=C2=A0<u></u></p><div><b=
lockquote style=3D"margin-top:5.0pt;margin-bottom:5.0pt"><div><p class=3D"M=
soNormal">On Jul 27, 2017, at 6:10 PM, Brian Campbell &lt;<a href=3D"mailto=
:bcampbell@pingidentity.com" target=3D"_blank">bcampbell@pingidentity.com</=
a>&gt; wrote:<u></u><u></u></p></div><p class=3D"MsoNormal"><u></u>=C2=A0<u=
></u></p><div><div><div><p class=3D"MsoNormal" style=3D"margin-bottom:12.0p=
t">I wouldn&#39;t disagree that the issue with Connect is overstated someti=
mes. And it&#39;s a non-issue with sec event due to the &quot;nonce&quot; c=
laim (as you point out) as well as the omission of the &quot;exp&quot; clai=
m. Assuming correct validation anyway. <u></u><u></u></p></div><p class=3D"=
MsoNormal">The BCP draft suggests explicit typing to prevent Cross-JWT Conf=
usion more generally (not just sec events and id tokens). I was wondering i=
f some use of &quot;crit&quot; might accomplish the same thing but also cov=
er the case of existing JWT implementations being confused with new JWT pro=
files. <u></u><u></u></p></div><div><p class=3D"MsoNormal"><u></u>=C2=A0<u>=
</u></p><div><p class=3D"MsoNormal">On Thu, Jul 27, 2017 at 3:40 PM, John B=
radley &lt;<a href=3D"mailto:ve7jtb@ve7jtb.com" target=3D"_blank">ve7jtb@ve=
7jtb.com</a>&gt; wrote:<u></u><u></u></p><blockquote style=3D"border:none;b=
order-left:solid #cccccc 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;=
margin-right:0in"><div><p class=3D"MsoNormal">Not that I am against the gen=
eral desire for JWT not to be confused, but the attack surface for someone =
to take a sec event from one context and replay it as a id_token to login i=
s very small and if the client is correctly configured would not work as it=
 is now.<u></u><u></u></p><div><p class=3D"MsoNormal"><u></u>=C2=A0<u></u><=
/p></div><div><p class=3D"MsoNormal">The only way you could replay the sec =
event JWT is via the implicit flow. =C2=A0 The other flows would require a =
malicious AS and at that point you have bigger problems with a compromised =
token endpoint.<u></u><u></u></p></div><div><p class=3D"MsoNormal"><u></u>=
=C2=A0<u></u></p></div><div><p class=3D"MsoNormal">If you were to create a =
implicit response with the sec event token that has the correct issuer and =
aud, connect requires that nonce value from the request be present in the i=
d_token. =C2=A0 This would require that the attacker somehow get the AS to =
put not only the claim but the correct value from the request into the toke=
n.<u></u><u></u></p></div><div><p class=3D"MsoNormal"><u></u>=C2=A0<u></u><=
/p></div><div><p class=3D"MsoNormal">All in all I think that it is more lik=
ely (not 100% I admit) that a client will do that rather than checking the =
typ or a new crit JWT header parameter.<u></u><u></u></p></div><div><p clas=
s=3D"MsoNormal"><u></u>=C2=A0<u></u></p></div><div><p class=3D"MsoNormal">I=
 am all for a general solution for this but I think the issue with Connect =
is overstated sometimes.<u></u><u></u></p></div><div><p class=3D"MsoNormal"=
><u></u>=C2=A0<u></u></p></div><div><p class=3D"MsoNormal">John B.<u></u><u=
></u></p></div><div><p class=3D"MsoNormal">=C2=A0<u></u><u></u></p><div><bl=
ockquote style=3D"margin-top:5.0pt;margin-bottom:5.0pt"><div><div><div><p c=
lass=3D"MsoNormal">On Jul 27, 2017, at 5:19 PM, Phil Hunt &lt;<a href=3D"ma=
ilto:phil.hunt@oracle.com" target=3D"_blank">phil.hunt@oracle.com</a>&gt; w=
rote:<u></u><u></u></p></div><p class=3D"MsoNormal"><u></u>=C2=A0<u></u></p=
></div></div><div><div><div><div><p class=3D"MsoNormal">We have the use cas=
e in SECEVENTS where a logout event (e.g. OIDF backchannel logout) is extre=
mely close to an ID_TOKEN.=C2=A0<u></u><u></u></p><div><p class=3D"MsoNorma=
l"><u></u>=C2=A0<u></u></p></div><div><p class=3D"MsoNormal">Older relying =
parties who are do not yet support logout could be tricked into accepting a=
 logout assertion as an ID_TOKEN since they are too similar, and =C2=A0beca=
use a valid ID_TOKEN parser is in theory allowed to ignore claims it does n=
ot understand (e.g. =E2=80=9Cevents=E2=80=9D) - leading to a possible erron=
eous acceptance of the logout event AS and ID_TOKEN.<u></u><u></u></p></div=
><div><p class=3D"MsoNormal"><u></u>=C2=A0<u></u></p></div><div><p class=3D=
"MsoNormal">Because of this the issue of distinguishing classes or types of=
 JWTs emerged.<u></u><u></u></p></div><div><p class=3D"MsoNormal"><u></u>=
=C2=A0<u></u></p></div><div><p class=3D"MsoNormal">We discussed a number of=
 differentiators like =E2=80=9Caud=E2=80=9D, =E2=80=9Ctyp=E2=80=9D, =E2=80=
=9Ccrit&quot;, etc that would help.=C2=A0 But that really lead to the idea =
there there should be some best practices in the JWT BCP covering the issue=
(s).<u></u><u></u></p></div><div><p class=3D"MsoNormal"><u></u>=C2=A0<u></u=
></p><div><div><div><div><div><div><div><div><div><div><div><div><div><div>=
<div><div><div><p class=3D"MsoNormal">Phil<u></u><u></u></p></div><div><p c=
lass=3D"MsoNormal"><u></u>=C2=A0<u></u></p></div><div><p class=3D"MsoNormal=
">Oracle Corporation, Identity Cloud Services Architect &amp; Standards<u><=
/u><u></u></p></div><div><p class=3D"MsoNormal">@independentid<u></u><u></u=
></p></div><div><p class=3D"MsoNormal"><a href=3D"http://www.independentid.=
com/" target=3D"_blank">www.independentid.com</a><u></u><u></u></p></div></=
div></div></div><p class=3D"MsoNormal"><a href=3D"mailto:phil.hunt@oracle.c=
om" target=3D"_blank">phil.hunt@oracle.com</a><u></u><u></u></p></div></div=
></div></div></div></div></div></div></div></div></div></div></div><p class=
=3D"MsoNormal"><u></u>=C2=A0<u></u></p><div><blockquote style=3D"margin-top=
:5.0pt;margin-bottom:5.0pt"><div><p class=3D"MsoNormal">On Jul 27, 2017, at=
 2:00 PM, Nathaniel McCallum &lt;<a href=3D"mailto:npmccallum@redhat.com" t=
arget=3D"_blank">npmccallum@redhat.com</a>&gt; wrote:<u></u><u></u></p></di=
v><p class=3D"MsoNormal"><u></u>=C2=A0<u></u></p><div><div><p class=3D"MsoN=
ormal">Even after reading the whole section, I still don&#39;t understand t=
he<br>problem. Yes, a class of attack could exist where an attacker<br>subs=
titutes a valid JWT from one security context into another<br>context. But =
isn&#39;t this resolved by audience validation?<br><br>On Thu, Jul 27, 2017=
 at 3:34 PM, Brian Campbell<br>&lt;<a href=3D"mailto:bcampbell@pingidentity=
.com" target=3D"_blank">bcampbell@pingidentity.com</a>&gt; wrote:<br><br><u=
></u><u></u></p><blockquote style=3D"margin-top:5.0pt;margin-bottom:5.0pt">=
<p class=3D"MsoNormal">The draft describes it in<br><a href=3D"https://urld=
efense.proofpoint.com/v2/url?u=3Dhttps-3A__tools.ietf.org_html_draft-2Dshef=
fer-2Doauth-2Djwt-2Dbcp-2D01-23section-2D2.7&amp;d=3DDwICAg&amp;c=3DRoP1Yum=
CXCgaWHvlZYR8PQcxBKCX5YTpkKY057SbK10&amp;r=3DJBm5biRrKugCH0FkITSeGJxPEivzjW=
wlNKe4C_lLIGk&amp;m=3D02yWnzzFGNlefgVregxSncXu0b9sbh5pTrtBfQsC52A&amp;s=3D9=
GmPCouCMXE4enC48gfq0l0yc7ZlIxvEBAnQCVja_kY&amp;e=3D" target=3D"_blank">http=
s://urldefense.proofpoint.<wbr>com/v2/url?u=3Dhttps-3A__tools.<wbr>ietf.org=
_html_draft-2Dsheffer-<wbr>2Doauth-2Djwt-2Dbcp-2D01-<wbr>23section-2D2.7&am=
p;d=3DDwICAg&amp;c=3D<wbr>RoP1YumCXCgaWHvlZYR8PQcxBKCX5Y<wbr>TpkKY057SbK10&=
amp;r=3D<wbr>JBm5biRrKugCH0FkITSeGJxPEivzjW<wbr>wlNKe4C_lLIGk&amp;m=3D<wbr>=
02yWnzzFGNlefgVregxSncXu0b9sbh<wbr>5pTrtBfQsC52A&amp;s=3D<wbr>9GmPCouCMXE4e=
nC48gfq0l0yc7ZlIx<wbr>vEBAnQCVja_kY&amp;e=3D</a> <br><br>On Thu, Jul 27, 20=
17 at 1:30 PM, Nathaniel McCallum &lt;<a href=3D"mailto:npmccallum@redhat.c=
om" target=3D"_blank">npmccallum@redhat.com</a>&gt;<br>wrote:<br><br><u></u=
><u></u></p><blockquote style=3D"margin-top:5.0pt;margin-bottom:5.0pt"><p c=
lass=3D"MsoNormal"><br>What class of attacks is this trying to prevent? I f=
rankly don&#39;t see a<br>problem with confusing different types of JWT. Bu=
t I may just be<br>ignorant.<br><br>On Thu, Jul 27, 2017 at 2:49 PM, Brian =
Campbell<br>&lt;<a href=3D"mailto:bcampbell@pingidentity.com" target=3D"_bl=
ank">bcampbell@pingidentity.com</a>&gt; wrote:<br><br><u></u><u></u></p><bl=
ockquote style=3D"margin-top:5.0pt;margin-bottom:5.0pt"><p class=3D"MsoNorm=
al" style=3D"margin-bottom:12.0pt">During the first WG meeting last week I =
asked if use of the JOSE &quot;crit&quot;<br>(Critical) Header Parameter ha=
d been considered as a recommendation for<br>preventing confusion of one ki=
nd of JWT for another. Time was running<br>short<br>in the meeting so there=
 wasn&#39;t much discussion and it was requested that<br>I<br>take the ques=
tion to the list. And so here on the list is that.<br><br>Section 3.9 of th=
e JWT BCP draft now recommends explicit typing using<br>the<br>&quot;typ&qu=
ot; JWS/JWE header parameter but does concede that &#39;the use of<br>expli=
cit<br>typing may not achieve disambiguation from existing kinds of JWTs, a=
s<br>the<br>validation rules for existing kinds JWTs often do not use the &=
quot;typ&quot;<br>header<br>parameter value.&#39; =C2=A0And the recommendat=
ions for how to use the Type<br>Header<br>Parameter in JWT strongly suggest=
 that it&#39;s not currently being used for<br>any<br>validation.<br><br>Al=
ternatively using the JWS/JWE &quot;crit&quot; (Critical) Header Parameter =
to<br>signal<br>the type/intent/profile/<wbr>application of a JWT could ach=
ieve<br>disambiguation<br>even in validation of existing kinds of JWTs. The=
 critical header lists<br>other headers which must be understood and proces=
sed by the receiver and<br>that the JWS/JWE is invalid if those listed aren=
&#39;t understood. So a new<br>type/profile of JWT that uses the &quot;crit=
&quot; header would produce JWTs that<br>would be rejected even by existing=
 applications of JWT validation (that<br>actually implement &quot;crit&quot=
; properly anyway).<br><br>The JWT BCP could suggest the use of &quot;crit&=
quot; in conjunction with a<br>profile/application/type specific header. Or=
 it could provide a bit more<br>of<br>a framework like defining a registeri=
ng a new JOSE header &quot;p&quot; (strawman<br>of p<br>as a very short nam=
e for profile) and create a registry for its values.<br>A<br>JWT header usi=
ng that approach might look like the following where the<br>value<br>1 is r=
egistered as some cool new JWT profile/application. The consumer<br>of<br>s=
uch a JWT would have to understand and process the &quot;p&quot; header, wh=
ich<br>would<br>mean checking that it had the value expected.<br><br>=C2=A0=
=C2=A0=C2=A0=C2=A0{<br>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0&quot;alg&quot;:&quot;=
ES256&quot;,<br>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0&quot;crit&quot;:[&quot;p&quo=
t;],<br>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0&quot;p&quot;:1<br>=C2=A0=C2=A0=C2=A0=
=C2=A0}<br><br>A JOSE compliant JWT validator would reject such a JWT even =
for an OAuth<br>access token or OIDC id_token because the &quot;p&quot; hea=
der isn&#39;t known or<br>understood but is marked as critical.<br><br>To m=
e, that seems like an approach to preventing confusion that has more<br>tee=
th than the &quot;typ&quot; header. Which is why I asked about it last week=
 and<br>am<br>now bringing it to the list.<br><br><br><br><br><br><br><br><=
br><br><br>CONFIDENTIALITY NOTICE: This email may contain confidential and<=
br>privileged<br>material for the sole use of the intended recipient(s). An=
y review, use,<br>distribution or disclosure by others is strictly prohibit=
ed.=C2=A0 If you<br>have<br>received this communication in error, please no=
tify the sender<br>immediately<br>by e-mail and delete the message and any =
file attachments from your<br>computer. Thank you.<br>_____________________=
_________<wbr>_________________<br>jose mailing list<br><a href=3D"mailto:j=
ose@ietf.org" target=3D"_blank">jose@ietf.org</a><br><a href=3D"https://url=
defense.proofpoint.com/v2/url?u=3Dhttps-3A__www.ietf.org_mailman_listinfo_j=
ose&amp;d=3DDwICAg&amp;c=3DRoP1YumCXCgaWHvlZYR8PQcxBKCX5YTpkKY057SbK10&amp;=
r=3DJBm5biRrKugCH0FkITSeGJxPEivzjWwlNKe4C_lLIGk&amp;m=3D02yWnzzFGNlefgVregx=
SncXu0b9sbh5pTrtBfQsC52A&amp;s=3DeJ8QZBwe5AO-RDl_E16U1q_KpobaeSRUP4Cp2W-_jJ=
U&amp;e=3D" target=3D"_blank">https://urldefense.proofpoint.<wbr>com/v2/url=
?u=3Dhttps-3A__www.<wbr>ietf.org_mailman_listinfo_<wbr>jose&amp;d=3DDwICAg&=
amp;c=3D<wbr>RoP1YumCXCgaWHvlZYR8PQcxBKCX5Y<wbr>TpkKY057SbK10&amp;r=3D<wbr>=
JBm5biRrKugCH0FkITSeGJxPEivzjW<wbr>wlNKe4C_lLIGk&amp;m=3D<wbr>02yWnzzFGNlef=
gVregxSncXu0b9sbh<wbr>5pTrtBfQsC52A&amp;s=3DeJ8QZBwe5AO-<wbr>RDl_E16U1q_Kpo=
baeSRUP4Cp2W-_<wbr>jJU&amp;e=3D</a> <u></u><u></u></p></blockquote></blockq=
uote><p class=3D"MsoNormal"><br><br><br>CONFIDENTIALITY NOTICE: This email =
may contain confidential and privileged<br>material for the sole use of the=
 intended recipient(s). Any review, use,<br>distribution or disclosure by o=
thers is strictly prohibited.=C2=A0 If you have<br>received this communicat=
ion in error, please notify the sender immediately<br>by e-mail and delete =
the message and any file attachments from your<br>computer. Thank you.<u></=
u><u></u></p></blockquote><p class=3D"MsoNormal"><br>______________________=
________<wbr>_________________<br>jose mailing list<br><a href=3D"mailto:jo=
se@ietf.org" target=3D"_blank">jose@ietf.org</a><br><a href=3D"https://urld=
efense.proofpoint.com/v2/url?u=3Dhttps-3A__www.ietf.org_mailman_listinfo_jo=
se&amp;d=3DDwICAg&amp;c=3DRoP1YumCXCgaWHvlZYR8PQcxBKCX5YTpkKY057SbK10&amp;r=
=3DJBm5biRrKugCH0FkITSeGJxPEivzjWwlNKe4C_lLIGk&amp;m=3D02yWnzzFGNlefgVregxS=
ncXu0b9sbh5pTrtBfQsC52A&amp;s=3DeJ8QZBwe5AO-RDl_E16U1q_KpobaeSRUP4Cp2W-_jJU=
&amp;e=3D" target=3D"_blank">https://urldefense.proofpoint.<wbr>com/v2/url?=
u=3Dhttps-3A__www.<wbr>ietf.org_mailman_listinfo_<wbr>jose&amp;d=3DDwICAg&a=
mp;c=3D<wbr>RoP1YumCXCgaWHvlZYR8PQcxBKCX5Y<wbr>TpkKY057SbK10&amp;r=3D<wbr>J=
Bm5biRrKugCH0FkITSeGJxPEivzjW<wbr>wlNKe4C_lLIGk&amp;m=3D<wbr>02yWnzzFGNlefg=
VregxSncXu0b9sbh<wbr>5pTrtBfQsC52A&amp;s=3DeJ8QZBwe5AO-<wbr>RDl_E16U1q_Kpob=
aeSRUP4Cp2W-_<wbr>jJU&amp;e=3D</a> <u></u><u></u></p></div></div></blockquo=
te></div><p class=3D"MsoNormal"><u></u>=C2=A0<u></u></p></div></div></div><=
/div><p class=3D"MsoNormal">______________________________<wbr>____________=
_____<br>OAuth mailing list<br><a href=3D"mailto:OAuth@ietf.org" target=3D"=
_blank">OAuth@ietf.org</a><br><a href=3D"https://www.ietf.org/mailman/listi=
nfo/oauth" target=3D"_blank">https://www.ietf.org/mailman/<wbr>listinfo/oau=
th</a><u></u><u></u></p></div></blockquote></div><p class=3D"MsoNormal"><u>=
</u>=C2=A0<u></u></p></div></div><p class=3D"MsoNormal" style=3D"margin-bot=
tom:12.0pt"><br>______________________________<wbr>_________________<br>OAu=
th mailing list<br><a href=3D"mailto:OAuth@ietf.org" target=3D"_blank">OAut=
h@ietf.org</a><br><a href=3D"https://www.ietf.org/mailman/listinfo/oauth" t=
arget=3D"_blank">https://www.ietf.org/mailman/<wbr>listinfo/oauth</a><u></u=
><u></u></p></blockquote></div><p class=3D"MsoNormal"><u></u>=C2=A0<u></u><=
/p></div><p class=3D"MsoNormal"><br><b><i><span style=3D"font-size:10.0pt;f=
ont-family:&quot;Segoe UI&quot;,sans-serif;color:#555555;border:none window=
text 1.0pt;padding:0in">CONFIDENTIALITY NOTICE: This email may contain conf=
idential and privileged material for the sole use of the intended recipient=
(s). Any review, use, distribution or disclosure by others is strictly proh=
ibited.=C2=A0 If you have received this communication in error, please noti=
fy the sender immediately by e-mail and delete the message and any file att=
achments from your computer. Thank you.</span></i></b><u></u><u></u></p></d=
iv></blockquote></div><p class=3D"MsoNormal"><u></u>=C2=A0<u></u></p></div>=
</div></div></div></div></div></blockquote></div><br></div>

<br>
<i style=3D"margin:0px;padding:0px;border:0px;outline:0px;vertical-align:ba=
seline;background:rgb(255,255,255);font-family:proxima-nova-zendesk,system-=
ui,-apple-system,system-ui,&quot;Segoe UI&quot;,Roboto,Oxygen-Sans,Ubuntu,C=
antarell,&quot;Helvetica Neue&quot;,Arial,sans-serif;color:rgb(85,85,85)"><=
span style=3D"margin:0px;padding:0px;border:0px;outline:0px;vertical-align:=
baseline;background:transparent;font-family:proxima-nova-zendesk,system-ui,=
-apple-system,BlinkMacSystemFont,&quot;Segoe UI&quot;,Roboto,Oxygen-Sans,Ub=
untu,Cantarell,&quot;Helvetica Neue&quot;,Arial,sans-serif;font-weight:600"=
><font size=3D"2">CONFIDENTIALITY NOTICE: This email may contain confidenti=
al and privileged material for the sole use of the intended recipient(s). A=
ny review, use, distribution or disclosure by others is strictly prohibited=
.=C2=A0 If you have received this communication in error, please notify the=
 sender immediately by e-mail and delete the message and any file attachmen=
ts from your computer. Thank you.</font></span></i>
--f403045fe2d4ae3b3605555fbe89--


From nobody Fri Jul 28 13:00:16 2017
Return-Path: <bcampbell@pingidentity.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 7BA8E1320E3 for <jose@ietfa.amsl.com>; Fri, 28 Jul 2017 13:00:09 -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, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=pingidentity.com
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 MvM-_CpjwKdK for <jose@ietfa.amsl.com>; Fri, 28 Jul 2017 13:00:05 -0700 (PDT)
Received: from mail-pf0-x22b.google.com (mail-pf0-x22b.google.com [IPv6:2607:f8b0:400e:c00::22b]) (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 B64FD1317E3 for <jose@ietf.org>; Fri, 28 Jul 2017 13:00:05 -0700 (PDT)
Received: by mail-pf0-x22b.google.com with SMTP id z129so59981301pfb.3 for <jose@ietf.org>; Fri, 28 Jul 2017 13:00:05 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pingidentity.com; s=gmail; h=mime-version:from:date:message-id:subject:to; bh=pjO7hzbo6zNlaPUI7+nwEY7wkHZlb6ExrDTXlZ7WVUw=; b=ROtyYfacZ2MKvHMbuyxuDFIst1Q9qCuYopAaK1OIqH0WQ8V7ppNO7tzTm7xnyXJT1q y2Vtlp/HwskH91XF2w7A/lRBQ7dE4WRbQxpp72iVjcdKQ9bBCUQ87glnX37dKtoBK5kY 1lebDw9OVeGqb2q8uIfh0OJ+20WaAM1/8gJMM=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=pjO7hzbo6zNlaPUI7+nwEY7wkHZlb6ExrDTXlZ7WVUw=; b=Q3R2UlKlGtK64RxNHYx3dqlIL400EahwXSSlZ9ZMSC4fnWGN1siYfFUk8p0cA0Htv/ DzF02VVz4QavoRCOnRfLNjFUzssgw81I6E/m0Dls8PKWLodjVYnNYJBDUOtxpgqy+jp+ Eq2hZLluWsCNRS7eXFX3TKbIwVXkpQQEb60+Z8IqO4FiWVFyyGa+NkIS8heTNr9G1wmA EeJgrGEFiHWYBr09v6k0dyRnn//pkN3XKZs3ulJPGJaYNGFMzFIUKI2bB8AJh+OT8XFC MX2JDlmAABTXdhZC+tl+7tEWwyx8TXetGsiaDSChL52LbGaBBqLIWxTp5GbEB2McKD6p lRKA==
X-Gm-Message-State: AIVw113+kzcDA/sruyDcBJ7LvYGBk1lQLNzLyUZqm6oAbnHAnpuwJL4r xaWhktn7LAzc66dQkqTDjTiEtdPFwRNLCO1TF2XCPFz+4xZv9R30sAKZxJdnDrMso9p34RufBHx tyYo=
X-Received: by 10.98.204.144 with SMTP id j16mr8641324pfk.25.1501272005267; Fri, 28 Jul 2017 13:00:05 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.100.145.87 with HTTP; Fri, 28 Jul 2017 12:59:34 -0700 (PDT)
From: Brian Campbell <bcampbell@pingidentity.com>
Date: Fri, 28 Jul 2017 13:59:34 -0600
Message-ID: <CA+k3eCTHfJRWSV1ZGD8-zxPir+-3wqNUtESznxXs5tzJoSU2Zw@mail.gmail.com>
To: oauth <oauth@ietf.org>, "jose@ietf.org" <jose@ietf.org>
Content-Type: multipart/alternative; boundary="94eb2c11d6e295f60d0555662028"
Archived-At: <https://mailarchive.ietf.org/arch/msg/jose/oK2l-VfwpL0DvdpTI6Qf9ROeOOo>
Subject: [jose] JWT BCP on Compression in JWE
X-BeenThere: jose@ietf.org
X-Mailman-Version: 2.1.22
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: Fri, 28 Jul 2017 20:00:10 -0000

--94eb2c11d6e295f60d0555662028
Content-Type: text/plain; charset="UTF-8"

On critique of JWT I've seen a few times can be paraphrased as "JWT
supports compressed plaintext so, because of CRIME and BREACH, it is
dangerous and stupid."  It's very possible that I am stupid (many on this
list will likely attest to it) but I don't see the applicability of those
kinds of chosen plaintext attacks aimed at recovering sensitive data to how
JWT/JWE are typically used.

I think it would be useful, if during the development of the JWT BCP, the
authors or chairs or WG could somehow engage some experts (CFRG?) to
understand if there's any real practical advice that can be given about
using compression with JWE and the risks involved.

-- 
*CONFIDENTIALITY NOTICE: This email may contain confidential and privileged 
material for the sole use of the intended recipient(s). Any review, use, 
distribution or disclosure by others is strictly prohibited.  If you have 
received this communication in error, please notify the sender immediately 
by e-mail and delete the message and any file attachments from your 
computer. Thank you.*

--94eb2c11d6e295f60d0555662028
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div>On critique of JWT I&#39;ve seen a few times can be p=
araphrased as &quot;JWT supports compressed plaintext so, because of <span =
style=3D"color:rgb(34,34,34);font-family:sans-serif;font-size:14px;font-sty=
le:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weigh=
t:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transf=
orm:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,2=
55);text-decoration-style:initial;text-decoration-color:initial;display:inl=
ine;float:none">CRIME</span> and BREACH, it is dangerous and stupid.&quot;=
=C2=A0 It&#39;s very possible that I am stupid (many on this list will like=
ly attest to it) but I don&#39;t see the applicability of those kinds of ch=
osen plaintext attacks aimed at recovering sensitive data to how JWT/JWE ar=
e typically used.=C2=A0 <br><br></div>I think it would be useful, if during=
 the development of the JWT BCP, the authors or chairs or WG could somehow =
engage some experts (CFRG?) to understand if there&#39;s any real practical=
 advice that can be given about using compression with JWE and the risks in=
volved. <br><br><br></div>

<br>
<i style=3D"margin:0px;padding:0px;border:0px;outline:0px;vertical-align:ba=
seline;background:rgb(255,255,255);font-family:proxima-nova-zendesk,system-=
ui,-apple-system,system-ui,&quot;Segoe UI&quot;,Roboto,Oxygen-Sans,Ubuntu,C=
antarell,&quot;Helvetica Neue&quot;,Arial,sans-serif;color:rgb(85,85,85)"><=
span style=3D"margin:0px;padding:0px;border:0px;outline:0px;vertical-align:=
baseline;background:transparent;font-family:proxima-nova-zendesk,system-ui,=
-apple-system,BlinkMacSystemFont,&quot;Segoe UI&quot;,Roboto,Oxygen-Sans,Ub=
untu,Cantarell,&quot;Helvetica Neue&quot;,Arial,sans-serif;font-weight:600"=
><font size=3D"2">CONFIDENTIALITY NOTICE: This email may contain confidenti=
al and privileged material for the sole use of the intended recipient(s). A=
ny review, use, distribution or disclosure by others is strictly prohibited=
.=C2=A0 If you have received this communication in error, please notify the=
 sender immediately by e-mail and delete the message and any file attachmen=
ts from your computer. Thank you.</font></span></i>
--94eb2c11d6e295f60d0555662028--

