Re: [OAUTH-WG] Mix-Up About The Mix-Up Mitigation

Mike Jones <Michael.Jones@microsoft.com> Tue, 12 January 2016 22:53 UTC

Return-Path: <Michael.Jones@microsoft.com>
X-Original-To: oauth@ietfa.amsl.com
Delivered-To: oauth@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id C0A4D1A8F4E for <oauth@ietfa.amsl.com>; Tue, 12 Jan 2016 14:53:46 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.001
X-Spam-Level:
X-Spam-Status: No, score=-2.001 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, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001] autolearn=ham
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 1AcFwDC_CpJh for <oauth@ietfa.amsl.com>; Tue, 12 Jan 2016 14:53:43 -0800 (PST)
Received: from na01-bn1-obe.outbound.protection.outlook.com (mail-bn1on0759.outbound.protection.outlook.com [IPv6:2a01:111:f400:fc10::759]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id A80DF1A8F4A for <oauth@ietf.org>; Tue, 12 Jan 2016 14:53:42 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:To:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=+1S/p5fYOfDjQ6kn9BclLjXme1L5Bt+/c6K2K83LsQ4=; b=S+MT4pxZb7yfqz85MJDn72WymIqOCSpwKoahwtrePR/0Olt59pyfR2mDrJ0DW6UDfisPu3ldnfMRAQpVlnCvuE75hHRqkTSyQWcy/vtwqRUjtdmwgalExMTw/ufSme4B+qU0zoa4/eQepnwXWZg9afRJFVdKmS5ZT85VxforBC8=
Received: from BY2PR03MB442.namprd03.prod.outlook.com (10.141.141.145) by BY2PR03MB441.namprd03.prod.outlook.com (10.141.141.142) with Microsoft SMTP Server (TLS) id 15.1.361.13; Tue, 12 Jan 2016 22:53:24 +0000
Received: from BY2PR03MB442.namprd03.prod.outlook.com ([10.141.141.145]) by BY2PR03MB442.namprd03.prod.outlook.com ([10.141.141.145]) with mapi id 15.01.0361.006; Tue, 12 Jan 2016 22:53:24 +0000
From: Mike Jones <Michael.Jones@microsoft.com>
To: Brian Campbell <bcampbell@pingidentity.com>, oauth <oauth@ietf.org>
Thread-Topic: [OAUTH-WG] Mix-Up About The Mix-Up Mitigation
Thread-Index: AQHRTYgN3eg1UDGvE0eMvQSerFGJhJ74fQU/
Date: Tue, 12 Jan 2016 22:53:24 +0000
Message-ID: <BY2PR03MB4423033D5604E9E36B20C23F5CA0@BY2PR03MB442.namprd03.prod.outlook.com>
References: <CA+k3eCSpWFwyvk=XHP4b_zxzu-zrMYsS-axF6csO90-ahmkueQ@mail.gmail.com>
In-Reply-To: <CA+k3eCSpWFwyvk=XHP4b_zxzu-zrMYsS-axF6csO90-ahmkueQ@mail.gmail.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
authentication-results: spf=none (sender IP is ) smtp.mailfrom=Michael.Jones@microsoft.com;
x-originating-ip: [166.170.29.193]
x-microsoft-exchange-diagnostics: 1; BY2PR03MB441; 5:kMuP41EycwxJ6f/mUOphauwkS+Auez8kIySH5/P1fx2zmM546dXnDov8Nfeuk84nBNXZao8FTn8MT83hg3ChojnvzmNpLEA+B2X9lt5/pk+8HhOmI1CFLIpK2NVjM/gdYN9lH6jFmkxJOlODzHa0vg==; 24:GWjcUKM7z2XvQeT5ewloiBnhbLanslpyuXDf0dcBdv3EVnmwgoDR1DsllynIN1SQ5bSTP3/YxFbdcRwJOI635gR8yTI+XIPu6SmVbqs6/Nc=
x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BY2PR03MB441;
x-ms-office365-filtering-correlation-id: 92db3428-2ec9-4514-fdd7-08d31ba32d57
x-microsoft-antispam-prvs: <BY2PR03MB4415C505D8F58E452E7DF2EF5CA0@BY2PR03MB441.namprd03.prod.outlook.com>
x-exchange-antispam-report-test: UriScan:;
x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(61425038)(601004)(2401047)(5005006)(520078)(8121501046)(3002001)(10201501046)(61426038)(61427038); SRVR:BY2PR03MB441; BCL:0; PCL:0; RULEID:; SRVR:BY2PR03MB441;
x-forefront-prvs: 081904387B
x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(199003)(189002)(377454003)(122556002)(105586002)(99286002)(33656002)(92566002)(189998001)(2906002)(2900100001)(16236675004)(74316001)(106116001)(6116002)(3846002)(106356001)(76576001)(102836003)(19617315012)(1220700001)(66066001)(1096002)(5004730100002)(2950100001)(97736004)(15975445007)(77096005)(5008740100001)(81156007)(101416001)(5001770100001)(11100500001)(10400500002)(19580405001)(107886002)(5001960100002)(10290500002)(586003)(50986999)(76176999)(54356999)(5002640100001)(5005710100001)(8990500004)(40100003)(5003600100002)(86612001)(19580395003)(86362001)(10090500001)(87936001); DIR:OUT; SFP:1102; SCL:1; SRVR:BY2PR03MB441; H:BY2PR03MB442.namprd03.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en;
received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts)
spamdiagnosticoutput: 1:23
spamdiagnosticmetadata: NSPM
Content-Type: multipart/alternative; boundary="_000_BY2PR03MB4423033D5604E9E36B20C23F5CA0BY2PR03MB442namprd_"
MIME-Version: 1.0
X-OriginatorOrg: microsoft.com
X-MS-Exchange-CrossTenant-originalarrivaltime: 12 Jan 2016 22:53:24.2638 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47
X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR03MB441
Archived-At: <http://mailarchive.ietf.org/arch/msg/oauth/e-u4UmooE22aOaXEpvDXjRitl04>
Subject: Re: [OAUTH-WG] Mix-Up About The Mix-Up Mitigation
X-BeenThere: oauth@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: OAUTH WG <oauth.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/oauth>, <mailto:oauth-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/oauth/>
List-Post: <mailto:oauth@ietf.org>
List-Help: <mailto:oauth-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/oauth>, <mailto:oauth-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 12 Jan 2016 22:53:47 -0000

John Bradley and I went over this today and I'm already planning on simplifying the draft along the lines described. I would have written this earlier but I've been busy at a NIST meeting today.

John has also stated writing a note about how cut-and-paste does and doesn't apply here but hasn't finished it yet because he's been similarly occupied.  He's also started writing up the state_hash token request parameter, as he agreed to do.

Watch this space for the new draft...

Best wishes,
-- Mike
________________________________
From: Brian Campbell<mailto:bcampbell@pingidentity.com>
Sent: ‎1/‎12/‎2016 5:24 PM
To: oauth<mailto:oauth@ietf.org>
Subject: [OAUTH-WG] Mix-Up About The Mix-Up Mitigation

The "IdP Mix-Up" and "Malicious Endpoint" attacks (as well as variations on them) take advantage of the fact that there's nothing in the OAuth authorization response to the client's redirect_uri that identifies the authorization server. As a result, a variety of techniques can be used to trick the client into sending the code (or token in some cases) to the wrong endpoint.

To the best of my recollection the general consensus coming out of the meetings in Darmstadt (which Hannes mentioned in OAuth Security Advisory: Authorization Server Mix-Up<https://mailarchive.ietf.org/arch/msg/oauth/JIVxFBGsJBVtm7ljwJhPUm3Fr-w>;) was to put forth an I-D as a simple extension to OAuth, which described how to return an issuer identifier for the authorization server and client identifier as authorization response parameters from the authorization endpoint. Doing so enables the client to know which AS the response came from and thus avoid sending the code to a different AS. Also, it doesn't introduce application/message level cryptography requirements on client implementations.

The mitigation draft that was posted yesterday<http://tools.ietf.org/html/draft-jones-oauth-mix-up-mitigation-00> diverges considerably from that with a significantly expanded scope that introduces OpenID Connect ID Tokens (sort of anyway) to regular OAuth and the retrieval of a metadata/discovery document in-between the authorization request and the access token request.

It is possible that my recollection from Darmstadt is wrong. But I expect others who were there could corroborate my account of what transpired. Of course, the agreements out of the Darmstadt meeting were never intended to be the final word - the whole WG would have the opportunity to weigh, as is now the case. However, a goal of meeting face-to-face was to come away with a good consensus towards a proposed solution that could (hopefully) be implementable in the very near term and move thought the IETF process in an expedited manner. I believe we'd reached consensus but the content of -00 draft does not reflect it.

I've made the plea off-list several times to simplify the draft to reflect the simple solution and now I'm doing the same on-list. Simplify the response validation to just say not to send the code/token back to an AS entity other that the one identified by the 'iss' in the response. And remove the id_token and JWT parts that .

If this WG and/or the larger community believes that OAuth needs signed responses, let's develop a proper singed response mechanism. I don't know if it's needed or not but I do know that it's a decent chunk of work that should be conscientiously undertaken independent of what can and should be a simple to understand and implement fix for the idp mix-up problem.