Re: [jose] Text about applications and "alg":"none"
Mike Jones <Michael.Jones@microsoft.com> Thu, 05 September 2013 19:23 UTC
Return-Path: <Michael.Jones@microsoft.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 506C521F9C99 for <jose@ietfa.amsl.com>; Thu, 5 Sep 2013 12:23:48 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.323
X-Spam-Level:
X-Spam-Status: No, score=-3.323 tagged_above=-999 required=5 tests=[AWL=0.275, BAYES_00=-2.599, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-1]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id mLdYKddIW0IU for <jose@ietfa.amsl.com>; Thu, 5 Sep 2013 12:23:38 -0700 (PDT)
Received: from na01-bn1-obe.outbound.protection.outlook.com (mail-bn1lp0153.outbound.protection.outlook.com [207.46.163.153]) by ietfa.amsl.com (Postfix) with ESMTP id E2EA521F9BC4 for <jose@ietf.org>; Thu, 5 Sep 2013 12:23:36 -0700 (PDT)
Received: from BLUPR03CA031.namprd03.prod.outlook.com (10.141.30.24) by BLUPR03MB102.namprd03.prod.outlook.com (10.255.212.13) with Microsoft SMTP Server (TLS) id 15.0.745.25; Thu, 5 Sep 2013 19:23:24 +0000
Received: from BL2FFO11FD006.protection.gbl (2a01:111:f400:7c09::26) by BLUPR03CA031.outlook.office365.com (2a01:111:e400:879::24) with Microsoft SMTP Server (TLS) id 15.0.745.25 via Frontend Transport; Thu, 5 Sep 2013 19:23:24 +0000
Received: from mail.microsoft.com (131.107.125.37) by BL2FFO11FD006.mail.protection.outlook.com (10.173.161.2) with Microsoft SMTP Server (TLS) id 15.0.755.13 via Frontend Transport; Thu, 5 Sep 2013 19:23:23 +0000
Received: from TK5EX14MBXC291.redmond.corp.microsoft.com ([169.254.2.91]) by TK5EX14HUBC101.redmond.corp.microsoft.com ([157.54.7.153]) with mapi id 14.03.0136.001; Thu, 5 Sep 2013 19:22:30 +0000
From: Mike Jones <Michael.Jones@microsoft.com>
To: "Matt Miller (mamille2)" <mamille2@cisco.com>
Thread-Topic: [jose] Text about applications and "alg":"none"
Thread-Index: Ac6oz8HFVRQ5dc5WQMe2P9SO+FcgkQBekuqAAAGPWoAAAD+hAAAGj3DQ
Date: Thu, 05 Sep 2013 19:22:29 +0000
Message-ID: <4E1F6AAD24975D4BA5B16804296739436C2EEFCD@TK5EX14MBXC291.redmond.corp.microsoft.com>
References: <4E1F6AAD24975D4BA5B16804296739436C2EA801@TK5EX14MBXC291.redmond.corp.microsoft.com> <CAL02cgRnvCYZhA1=9e6nCWztavU0MoWRM+s9YduL3Xuj6yVpuQ@mail.gmail.com> <BF7E36B9C495A6468E8EC573603ED9411EEDE3DB@xmb-aln-x11.cisco.com> <CAL02cgQd0PF5-5C7S=142-pVj_nhsG6Y7Cm-MEAuUzQocxEM=g@mail.gmail.com>
In-Reply-To: <CAL02cgQd0PF5-5C7S=142-pVj_nhsG6Y7Cm-MEAuUzQocxEM=g@mail.gmail.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-originating-ip: [157.54.51.78]
Content-Type: multipart/alternative; boundary="_000_4E1F6AAD24975D4BA5B16804296739436C2EEFCDTK5EX14MBXC291r_"
MIME-Version: 1.0
X-Forefront-Antispam-Report: CIP:131.107.125.37; CTRY:US; IPV:CAL; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(51704005)(377454003)(199002)(189002)(24454002)(47976001)(50986001)(47736001)(49866001)(80976001)(81542001)(81342001)(15202345003)(46102001)(4396001)(19300405004)(65816001)(80022001)(44976005)(31966008)(19580395003)(69226001)(66066001)(83322001)(19580405001)(51856001)(71186001)(74502001)(47446002)(74662001)(83072001)(6806004)(59766001)(77982001)(15975445006)(56776001)(54316002)(76796001)(76786001)(74366001)(55846006)(74876001)(74706001)(79102001)(63696002)(20776003)(81816001)(77096001)(56816003)(16236675002)(512954002)(54356001)(33656001)(53806001)(76482001)(81686001); DIR:OUT; SFP:; SCL:1; SRVR:BLUPR03MB102; H:mail.microsoft.com; CLIP:131.107.125.37; RD:InfoDomainNonexistent; A:1; MX:1; LANG:en;
X-O365ENT-EOP-Header: Message processed by - O365_ENT: Allow from ranges (Engineering ONLY)
X-Forefront-PRVS: 096029FF66
X-OriginatorOrg: DuplicateDomain-a84fc36a-4ed7-4e57-ab1c-3e967bcbad48.microsoft.com
Cc: "jose@ietf.org" <jose@ietf.org>
Subject: Re: [jose] Text about applications and "alg":"none"
X-BeenThere: jose@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Javascript Object Signing and Encryption <jose.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/jose>, <mailto:jose-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/jose>
List-Post: <mailto:jose@ietf.org>
List-Help: <mailto:jose-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/jose>, <mailto:jose-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 05 Sep 2013 19:23:48 -0000
Thanks Matt, for suggesting the text. The version below has slight edits to make it editorially consistent with the terminology used elsewhere in the specs and to give the acceptable algorithm list approach equal billing with the Boolean approach.
Implementations that support plaintext JWS objects (i.e., the "alg" value
"none") MUST NOT accept such objects as valid unless the application
specifies that it is acceptable for a specific object to be non-integrity-protected.
Implementations MUST NOT accept plaintext JWS objects by default. For example,
the "verify" method of a hypothetical JWS software library might have a
boolean "acceptUnsigned" parameter (which defaults to "false") that indicates
"none" is an acceptable "alg" value. As another example, the "verify" method
might take a list of algorithms that are acceptable to the application as a parameter
and would reject plaintext JWS values if "none" is not in that list.
In order to mitigate downgrade attacks, applications MUST NOT signal
acceptance of plaintext JWS objects at a global level, and SHOULD signal
acceptance on a per-object basis. For example, suppose an application accepts
JWS objects over two channels, (1) HTTP and (2) HTTPS with client
authentication. It requires a JWS signature on objects received over HTTP,
but accepts plaintext JWS objects over HTTPS. If the application were to globally
indicate that "none" is acceptable, then an attacker could provide it with an
unsigned object over HTTP and still have that object successfully validate.
Instead, the application needs indicate acceptance of "none" for each object
received over HTTPS (e.g., by setting "acceptUnsigned" to "true" for the
first hypothetical JWS software library above), but not for each object received over
HTTP.
-- Mike
From: Richard Barnes [mailto:rlb@ipv.sx]
Sent: Thursday, September 05, 2013 9:02 AM
To: Matt Miller (mamille2)
Cc: Mike Jones; jose@ietf.org
Subject: Re: [jose] Text about applications and "alg":"none"
That text is fine with me. I would prefer the SHOULD be a MUST, but I could imagine some interface like RealJWSVerifier that takes things from HTTP, vs. NotReallyAJWSVerifierDangerWillRobinson from HTTPS.
Though it does highlight the crazy contortions we're having to go through to get "none" right, rather than just defining a separate syntax.
On Thu, Sep 5, 2013 at 11:55 AM, Matt Miller (mamille2) <mamille2@cisco.com<mailto:mamille2@cisco.com>> wrote:
I agree with the intent, but I'm not very comfortable with the actual text. It reads too much like software interface design, and I'd rather avoid telling people exactly how to write their software.
My suggested change (still makes me squeamish, but I can live with it):
"""
Implementations that support unsigned JWS objects (i.e., the "alg" value
"none") MUST NOT accept such objects as valid unless the application
specifies that it is acceptable for a specific object to be unsigned.
Implementations MUST NOT accept unsigned JWS objects by default. For example,
the "verify" method of a hypothetical JWS software library might have a
boolean "acceptUnsigned" parameter (which defaults to "false") that indicates
"none" is an acceptable "alg" value.
In order to mitigate downgrade attacks, applications MUST NOT indicate
acceptance of unsigned JWS objects at a global level, and SHOULD specify
acceptance on a per-object basis. For example, suppose an application accepts
JWS objects over two channels, (1) HTTP and (2) HTTPS with client
authentication. It requires a JWS signature on objects received over HTTP,
but accepts unsigned JWS objects over HTTPS. If the application globally
indicates that "none" is acceptable, then an attacker could provide it with an
unsigned object over HTTP and still have that object considered valid.
Instead, the application needs indicate acceptance of "none" for each object
received over HTTPS (e.g., by setting "acceptUnsigned" to "true" for the
hypothetical JWS software library above), but not for each object received over
HTTP.
"""
- m&m
Matt Miller < mamille2@cisco.com<mailto:mamille2@cisco.com> >
Cisco Systems, Inc.
On Sep 5, 2013, at 9:10 AM, Richard Barnes <rlb@ipv.sx<mailto:rlb@ipv.sx>> wrote:
> Thinking on this a little more, it seems like it would be simpler to state
> this just as an "allow unsigned" flag, rather than a more general
> "acceptable algorithms" set. That way we don't have to worry about all the
> downgrade scenarios when you have "none" along with something else.
>
> """
> Implementations that support unsigned JWS objects (i.e., the "alg" value
> "none") MUST NOT accept such objects as valid unless the application
> specifies that it is acceptable for a specific object to be unsigned. For
> example, the "verify" method of a JWS library might have a boolean
> "acceptUnsigned" parameter that would indicate that "none" is an acceptable
> "alg" value.
>
> Applications MUST specify this flag on a per-object basis, since otherwise
> they will be vulnerable to downgrade attacks. For example, suppose an
> application accepts JWS objects over two channels, (1) HTTP and (2) HTTPS
> with client authentication. It requires a JWS signature on objects received
> over HTTP, but accepts unsigned JWS objects over HTTPS. If the application
> sets a global setting that "none" is acceptable, then an attacker could
> provide it with an unsigned object over HTTP and still have that object
> considered valid. Instead, the application needs to set the
> "acceptUnsigned" flag to "false" for each object received over HTTP, and to
> "true" for each object received over HTTPS.
> """
>
> This makes the equivalence between the "separate object" and "constrained
> verify" cases a lot clearer. On the one hand, you would have
> "jose.somethingNotVerify(JWP)", and on the other hand, you would have
> "jose.verify(JWP, acceptUnsigned=True)".
>
> --Richard
>
>
>
>
> On Tue, Sep 3, 2013 at 2:02 PM, Mike Jones <Michael.Jones@microsoft.com<mailto:Michael.Jones@microsoft.com>>wrote:
>
>> I took an action item during the last call to write text along the lines
>> suggested by ekr about applications and "alg":"none". I propose that the
>> following text be included:****
>>
>> ** **
>>
>> It is RECOMMENDED that libraries provide applications a means of
>> specifying the list of acceptable algorithms used in a JWS object in a way
>> that causes inputs using algorithms outside the specified set to be
>> rejected. In particular, it is intended for applications to use this
>> mechanism to exclude accepting inputs using "alg":"none" in security
>> contexts where non-integrity protected inputs are not acceptable.****
>>
>> ** **
>>
>> Feedback/proposed wording refinements welcomed.****
>>
>> ** **
>>
>> -- Mike***
>> *
>>
>> ** **
>>
>> _______________________________________________
>> jose mailing list
>> jose@ietf.org<mailto:jose@ietf.org>
>> https://www.ietf.org/mailman/listinfo/jose
>>
>>
> _______________________________________________
> jose mailing list
> jose@ietf.org<mailto:jose@ietf.org>
> https://www.ietf.org/mailman/listinfo/jose
- [jose] Text about applications and "alg":"none" Mike Jones
- Re: [jose] Text about applications and "alg":"non… Richard Barnes
- Re: [jose] Text about applications and "alg":"non… Mike Jones
- Re: [jose] Text about applications and "alg":"non… Richard Barnes
- Re: [jose] Text about applications and "alg":"non… Richard Barnes
- Re: [jose] Text about applications and "alg":"non… Richard Barnes
- Re: [jose] Text about applications and "alg":"non… Richard Barnes
- Re: [jose] Text about applications and "alg":"non… Mike Jones
- Re: [jose] Text about applications and "alg":"non… Richard Barnes
- Re: [jose] Text about applications and "alg":"non… Richard Barnes
- Re: [jose] Text about applications and "alg":"non… Matt Miller (mamille2)
- Re: [jose] Text about applications and "alg":"non… Richard Barnes
- Re: [jose] Text about applications and "alg":"non… Mike Jones
- Re: [jose] Text about applications and "alg":"non… Manger, James H
- Re: [jose] Text about applications and "alg":"non… Richard Barnes