Re: [OAUTH-WG] OAuth Security Topics -- Recommend authorization code instead of implicit

Neil Madden <neil.madden@forgerock.com> Wed, 21 November 2018 08:35 UTC

Return-Path: <neil.madden@forgerock.com>
X-Original-To: oauth@ietfa.amsl.com
Delivered-To: oauth@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 9E0C2127332 for <oauth@ietfa.amsl.com>; Wed, 21 Nov 2018 00:35:00 -0800 (PST)
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, MIME_QP_LONG_LINE=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=forgerock.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 FQQKB1D4KAsx for <oauth@ietfa.amsl.com>; Wed, 21 Nov 2018 00:34:58 -0800 (PST)
Received: from mail-wr1-x435.google.com (mail-wr1-x435.google.com [IPv6:2a00:1450:4864:20::435]) (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 38DD2124408 for <oauth@ietf.org>; Wed, 21 Nov 2018 00:34:58 -0800 (PST)
Received: by mail-wr1-x435.google.com with SMTP id z5so393055wrt.11 for <oauth@ietf.org>; Wed, 21 Nov 2018 00:34:58 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=forgerock.com; s=google; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=C7iQ0vTvJBMrtkwacP9JpRDXTndp3SkAwE9Piy5Ha3A=; b=JnjsSxVK6Urp9m6wJWBEZVSUzZE0Di/UKJt66fCq5Cr2SbRshNgXGp4p90IRCLCkKF JryZ2DCXUx6i+gTM7LuUKtzFgWSBehvuiIQCjjxLwNBDXg2K0tneWFtXk8Ffo8aRK9It zO9RDyFN2JfJIoGd1x8mnGfMfY5TqA/Jr5WkQ=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=C7iQ0vTvJBMrtkwacP9JpRDXTndp3SkAwE9Piy5Ha3A=; b=s3ZaKaPlExZajI4Uri7DlLJufGT2eFeNHuOC43CU0TsZQnpZ/DSB+08qhMq4Wiuhy1 G5tMZb5ZhVUyguYXPFshTUkBn/vOAk4S3FiIqSmSGq89QphZMdVjTHpzoK667HkTDMpQ SFbImqpZPfevKFowvd/I7rjNS+tQJmVHCfdAmwbASKqeKRxJRgf/wDM0Jl5mfNzvryrT jWdVGFCgfCS8Qjy+bLeRjdzzp0GyQfZH2lp2QsrK6s6Gh5hhpSy+Pwvcyt7prsSh5l0V Y3n1Oh54I7n3ATB43ei+9IPMKZyqalq7HsIkZGJItB+OsnyqEUkKfgFMv4/Ej8Xnf0lj jwhA==
X-Gm-Message-State: AA+aEWYR1X5/J29FOKH0E7ZCX+Q36bIJAE0TfQiLzBm9RwnEirKtT4iY +H/nViH2VxJwzMxIeZN8Zm2uS9knPuA=
X-Google-Smtp-Source: AFSGD/XG4bkgoP0yg1+/ZieJe0ALuYvdLNq77yYEjQNHGHoqc0YAIUfQyk2PpsEV03d5sB6WOZJZ0A==
X-Received: by 2002:adf:82e4:: with SMTP id 91mr4991533wrc.131.1542789296558; Wed, 21 Nov 2018 00:34:56 -0800 (PST)
Received: from ?IPv6:2a01:4c8:1a:2953:31f3:b6a:47c5:df61? ([2a01:4c8:1a:2953:31f3:b6a:47c5:df61]) by smtp.gmail.com with ESMTPSA id c188-v6sm167935wma.39.2018.11.21.00.34.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 21 Nov 2018 00:34:55 -0800 (PST)
Content-Type: multipart/alternative; boundary="Apple-Mail-64F51EED-EB24-4BCA-961F-A44C7E56DAD5"
Mime-Version: 1.0 (1.0)
From: Neil Madden <neil.madden@forgerock.com>
X-Mailer: iPhone Mail (16B92)
In-Reply-To: <65005ad9-238e-9fe4-fb4b-ef54e93f84c3@yes.com>
Date: Wed, 21 Nov 2018 08:34:54 +0000
Cc: oauth@ietf.org
Content-Transfer-Encoding: 7bit
Message-Id: <92C3D667-E43E-4622-A688-689C216789BF@forgerock.com>
References: <VI1PR0801MB211266BA6F6E06FFB3081425FAD80@VI1PR0801MB2112.eurprd08.prod.outlook.com> <BL0PR00MB029244CACC634E2D2E923B77F5D80@BL0PR00MB0292.namprd00.prod.outlook.com> <61A6D327-D4EE-4954-B57F-4FF42BB22E7E@lodderstedt.net> <3AA54AC6-BE0B-4535-AF1D-919236EF69B8@forgerock.com> <65005ad9-238e-9fe4-fb4b-ef54e93f84c3@yes.com>
To: Daniel Fett <danielf+oauth@yes.com>
Archived-At: <https://mailarchive.ietf.org/arch/msg/oauth/aasxSxpSMCc-C9qE-CFCKJsRmZM>
Subject: Re: [OAUTH-WG] OAuth Security Topics -- Recommend authorization code instead of implicit
X-BeenThere: oauth@ietf.org
X-Mailman-Version: 2.1.29
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: Wed, 21 Nov 2018 08:35:01 -0000

> On 21 Nov 2018, at 08:26, Daniel Fett <danielf+oauth@yes.com> wrote:
> 
>> Am 20.11.18 um 13:24 schrieb Neil Madden:
>> If we are discussing this in the context of client-side web apps/SPAs, then surely the threat model includes malicious 3rd party scripts - for which neither token binding nor mTLS constrained tokens are very effective as those scripts run in the same TLS context as the legitimate client?
> Please correct me if I'm wrong, but if a page/SPA/origin includes a malicious third party script, the third party script can access all data of that JavaScript. It can exfiltrate tokens and/or send requests on behalf of that page/SPA/origin (using the page/SPA/origin's TLS context, cookies, etc.). 
> 
> So I doubt that there is any better solution than token binding or mTLS.
> 
> If we assume that an SPA includes a malicious third party script, it is completely compromised.
> 

No - same origin policy prevents those things. TLS doesn’t have those protections though because it acts at the transport layer and SOP is an application-layer concept. 

— Neil