Re: [OAUTH-WG] Feedback on OAuth for browser-based Apps

n-sakimura <n-sakimura@nri.co.jp> Sun, 28 July 2019 21:31 UTC

Return-Path: <n-sakimura@nri.co.jp>
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 8B44B120094 for <oauth@ietfa.amsl.com>; Sun, 28 Jul 2019 14:31:28 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.898
X-Spam-Level:
X-Spam-Status: No, score=-1.898 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=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 a0rJ71FiewiP for <oauth@ietfa.amsl.com>; Sun, 28 Jul 2019 14:31:25 -0700 (PDT)
Received: from nrifs04.index.or.jp (nrigw01.index.or.jp [133.250.250.1]) by ietfa.amsl.com (Postfix) with ESMTP id 6C84C120048 for <oauth@ietf.org>; Sun, 28 Jul 2019 14:31:23 -0700 (PDT)
Received: from nrimmfm052.index.or.jp (unknown [172.19.246.144]) by nrifs04.index.or.jp (Postfix) with ESMTP id F0CF4472EE6; Mon, 29 Jul 2019 06:31:22 +0900 (JST)
Received: from index.or.jp (unknown [172.19.246.151]) by nrimmfm052.index.or.jp (Postfix) with ESMTP id AFF134E0046; Mon, 29 Jul 2019 06:31:22 +0900 (JST)
Received: from nriea05.index.or.jp (localhost.localdomain [127.0.0.1]) by pps.mf051 (8.15.0.59/8.15.0.59) with SMTP id x6SLVMjp006368; Mon, 29 Jul 2019 06:31:22 +0900
Received: from nrims00b.nri.co.jp ([192.50.135.12]) by nriea05.index.or.jp with ESMTP id x6SLVMqO006366; Mon, 29 Jul 2019 06:31:22 +0900
Received: from nrims00b.nri.co.jp (localhost.localdomain [127.0.0.1]) by nrims00b.nri.co.jp (Switch-3.3.4/Switch-3.3.4) with ESMTP id x6SLVOIj040497; Mon, 29 Jul 2019 06:31:24 +0900
Received: (from mailnull@localhost) by nrims00b.nri.co.jp (Switch-3.3.4/Switch-3.3.0/Submit) id x6SLVOkL040496; Mon, 29 Jul 2019 06:31:24 +0900
X-Authentication-Warning: nrims00b.nri.co.jp: mailnull set sender to n-sakimura@nri.co.jp using -f
Received: from nrizmf13.index.or.jp ([172.100.25.22]) by nrims00b.nri.co.jp (Switch-3.3.4/Switch-3.3.4) with ESMTP id x6SLVOsZ040493; Mon, 29 Jul 2019 06:31:24 +0900
Received: from CUEXE01PA.cu.nri.co.jp (192.51.23.31) by CUEXM08PA.cu.nri.co.jp (172.159.253.50) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Mon, 29 Jul 2019 06:31:21 +0900
Received: from JPN01-OS2-obe.outbound.protection.outlook.com (104.47.92.54) by ex.nri.co.jp (192.51.23.33) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Mon, 29 Jul 2019 06:31:20 +0900
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eIq8hJNVT9/whWqKoPN+DLAHgPkVkCr7zBIr4KOAd/WxakY6YKGNDZQqvHTdKsWK8c17PztXj/2Ug3WmFldT9pN013eFVnyDdycm4yadT0a8l1+C7kP2VPXeR+At1x+B4mwEAmmdI5Mx/iG6htOBPzf/tFa4Q8p0EWB1Jk9ICAvHIZ+hpqrN1eTZCvOXBktJ7Dk166A3RhSE9shC9P8m/n90LRSZ8Viwh6v9gOOeSuypxO6YUN3uYB9dckSfTpSOTpESCWjdw1Y0b+3Nytw8ZvkIrJLuAulUowpuwg/cOcmpSe47W+XmsPcmzQmRdfX8iYchHaYlScQbXDBqzV5Y2g==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=mydvS3+UWD30w4IrJKfgJiId75BuUCrBnvgvLw9DNrY=; b=Ckg6o1a453sM+m8A9BWK/gaIPWysea6eDLk5Fy8S1mDZkJ/bKAZVFhHYFJ8CwxkwHwWa87IhhnGKkN8kqjvKcGDq3uKEP+5fVZdfRk/fIipYsIaesAajPGHZYlItayyy/yB/U64NBbXqx5MB+Mu4/rxoA6Bd5o58VyShLdgyzUpXab/iP1/O8ZMa3UHEfruT72vF50bFAl7o7iZyuLBcICN1NY7vIMSqTs0cXeQ77hRIwtpJaqK6+d834F6f924CPZSzzBwzSBYZzcrJqIJbeXtboZCfQFtufMZwfea04XXx0gEdZI3JQ3f+UiNdImbAUgIKNazpMTYQ0eJNLgtBmA==
ARC-Authentication-Results: i=1; mx.microsoft.com 1;spf=pass smtp.mailfrom=cu.nri.co.jp;dmarc=pass action=none header.from=cu.nri.co.jp;dkim=pass header.d=cu.nri.co.jp;arc=none
Received: from TYAPR01MB4413.jpnprd01.prod.outlook.com (20.179.173.206) by TYAPR01MB2255.jpnprd01.prod.outlook.com (52.133.179.146) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2115.15; Sun, 28 Jul 2019 21:31:19 +0000
Received: from TYAPR01MB4413.jpnprd01.prod.outlook.com ([fe80::a506:c36d:83ec:1b33]) by TYAPR01MB4413.jpnprd01.prod.outlook.com ([fe80::a506:c36d:83ec:1b33%6]) with mapi id 15.20.2115.005; Sun, 28 Jul 2019 21:31:19 +0000
From: n-sakimura <n-sakimura@nri.co.jp>
To: Justin Richer <jricher@mit.edu>, David Waite <david@alkaline-solutions.com>
CC: OAuth WG <oauth@ietf.org>
Thread-Topic: [OAUTH-WG] Feedback on OAuth for browser-based Apps
Thread-Index: AQHVQFTMw7yeGuX7O0STdvZ1BA6HuqbaRcAAgAC44QCAAD12gIAFWHGA
Date: Sun, 28 Jul 2019 21:31:19 +0000
Message-ID: <TYAPR01MB44137F45D4A889A933612885F9C20@TYAPR01MB4413.jpnprd01.prod.outlook.com>
References: <CAO7Ng+tyHaKQgJ4PcrcEpMcteqvdH2PE1CQP5j+5DqKJWuKPoQ@mail.gmail.com> <CAGBSGjoexpLjzOcBV+wjH6+CtRROB1ZbPre+7DgfipsO1RgVOQ@mail.gmail.com> <F6536A63-6950-4A05-A35C-B8215BB04277@alkaline-solutions.com> <DC16FB06-32A8-4CF9-999F-FB9F58E67B99@mit.edu>
In-Reply-To: <DC16FB06-32A8-4CF9-999F-FB9F58E67B99@mit.edu>
Accept-Language: ja-JP, en-US
Content-Language: ja-JP
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-mailadviser: Ver 3.40R03
authentication-results: spf=none (sender IP is ) smtp.mailfrom=n-sakimura@cu.nri.co.jp;
x-originating-ip: [133.250.166.11]
x-ms-publictraffictype: Email
x-ms-office365-filtering-correlation-id: 8d9273ad-eadf-4a5c-1d93-08d713a2ee2b
x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(1401327)(2017052603328)(7193020); SRVR:TYAPR01MB2255;
x-ms-traffictypediagnostic: TYAPR01MB2255:
x-ms-exchange-purlcount: 1
x-microsoft-antispam-prvs: <TYAPR01MB2255FEA8473F4642F62FCAADF9C20@TYAPR01MB2255.jpnprd01.prod.outlook.com>
x-ms-oob-tlc-oobclassifiers: OLM:10000;
x-forefront-prvs: 01128BA907
x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(366004)(346002)(376002)(39830400003)(396003)(136003)(199004)(189003)(51444003)(606006)(26005)(6506007)(53546011)(8936002)(256004)(14444005)(66066001)(186003)(71200400001)(71190400001)(478600001)(2906002)(476003)(3846002)(486006)(446003)(76176011)(68736007)(86362001)(102836004)(81166006)(81156014)(966005)(14454004)(8676002)(99286004)(6116002)(7736002)(7696005)(11346002)(46636005)(66574012)(25786009)(9686003)(236005)(53936002)(76116006)(66556008)(66476007)(66446008)(66946007)(64756008)(6436002)(6246003)(55016002)(110136005)(2171002)(74316002)(52536014)(5660300002)(229853002)(6306002)(316002)(4326008)(54896002)(33656002); DIR:OUT; SFP:1102; SCL:1; SRVR:TYAPR01MB2255; H:TYAPR01MB4413.jpnprd01.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:0; MX:1;
received-spf: None (protection.outlook.com: cu.nri.co.jp does not designate permitted sender hosts)
x-ms-exchange-senderadcheck: 1
x-microsoft-antispam-message-info: e10L7R0NsHUmkhqp4cT5TfVhvPWfsHOWlg/nVQjQiVP/H6vDWSU1f8CMW9QdfgEJ191Ux6xXoiOvb4He5y4lbCWOZjnD+IeJKU7gDdB1yrdUuuTWBf0ajMyiVMr+ZO2cx6bCXKT0UYA5gc2FhoqveuJktUGQrTgLMkszvysYofGBq1+36E5HwfDrXiteL609/SNiKmtHk9LjOzfxb22usAqaqFGto3XqB/nTH1NLpUNSisvhywe9QfWRDysCFtJR9GPVYk4gqzaX6220fVK8+BoKd3VadjFuywTqbjq+hPmA27nNJof7ww20243vSCh4Wt/LUZBF03ReDt+ws6LUdKvJZVXRiDvngHzW8uyqQw308waI38fHlVlUuj4pskVqc8F8YaAlerhVPpdaBhIAXHe6jS7l8BvHvhZliSXZ8SQ=
Content-Type: multipart/alternative; boundary="_000_TYAPR01MB44137F45D4A889A933612885F9C20TYAPR01MB4413jpnp_"
MIME-Version: 1.0
X-MS-Exchange-CrossTenant-Network-Message-Id: 8d9273ad-eadf-4a5c-1d93-08d713a2ee2b
X-MS-Exchange-CrossTenant-originalarrivaltime: 28 Jul 2019 21:31:19.6797 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: e3e360d9-7e7f-48d5-ac33-3c5de61f0a75
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: n-sakimura@cu.nri.co.jp
X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYAPR01MB2255
X-OrganizationHeadersPreserved: TYAPR01MB2255.jpnprd01.prod.outlook.com
X-CrossPremisesHeadersPromoted: CUEXE01PA.cu.nri.co.jp
X-CrossPremisesHeadersFiltered: CUEXE01PA.cu.nri.co.jp
X-OriginatorOrg: cu.nri.co.jp
Archived-At: <https://mailarchive.ietf.org/arch/msg/oauth/6yWC59HcsIx4VWNOPb2FWNUUlUs>
Subject: Re: [OAUTH-WG] Feedback on OAuth for browser-based Apps
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: Sun, 28 Jul 2019 21:31:29 -0000

Agreed.

On the related issue, issue of exporting the access token that a confidential client got to a public client is there as it was discussed in the Friday’s Oauth WG meeting. Though I did not make any comment on Friday as we were running out of time, I think that is a bad idea as the AuthZ server has issued it assuming that it is kept by a confidential client.

Hybrid response type was made because of the view that the public client should get less privilege.

If we are getting rid of Implicit flow, this aspect need to be addressed.

Having said that: if SPA is using the code flow, is it not acting as a public client without a client secret?

Nat

From: OAuth [mailto:oauth-bounces@ietf.org] On Behalf Of Justin Richer
Sent: Thursday, July 25, 2019 8:45 PM
To: David Waite <david@alkaline-solutions.com>
Cc: OAuth WG <oauth@ietf.org>
Subject: Re: [OAUTH-WG] Feedback on OAuth for browser-based Apps

This raises an interesting question that I don’t think we’ve addressed yet: how to appropriately vary token lifetimes and access for different clients.

Previously, an AS could see that a client was using the implicit flow and decide to limit token lifetimes or scopes based on that alone. Similarly, I know of at least some AS implementations that let you limit what scopes you allow under the client credentials grant. The key issue is that if all your clients are using the auth code flow (which I agree they should), then how does an AS tell the difference in capabilities between incoming clients?

Obviously it can do it on a per-client basis still, but now an AS is going to have to know a bit more about the app itself. Perhaps we finally need a few more entries in the “application_type” metadata parameter from OIDC’s extension RFC7591 beyond “native” and “web”? But we at least probably want to point out to AS implementors that this is something they want to consider tracking in their data model for clients.

— Justin


On Jul 25, 2019, at 4:04 AM, David Waite <david@alkaline-solutions.com<mailto:david@alkaline-solutions.com>> wrote:





On Jul 24, 2019, at 3:03 PM, Aaron Parecki <aaron@parecki.com<mailto:aaron@parecki.com>> wrote:

On Mon, Jul 22, 2019 at 2:14 AM Dominick Baier
<dbaier@leastprivilege.com<mailto:dbaier@leastprivilege.com>> wrote:
<snip>


I would rather say that ANY JS app should use CSP to lock down the browser features to a minimal attack surface. In addition, if refresh or access tokens are involved - further settings like disabling inline scripting (unsafe inline) and eval should be disabled.

I'm not sure what to do with this suggestion. It feels like a blanket
recommendation of enabling CSP will likely be ignored since it's too
broad, and recommending disabling inline scripts is overreaching
unless backed up by a specific threat it's protecting against. Did you
have a particular threat in mind?

I would say that browser applications should take measures to harden their applications again code injection and arbitrary code execution. Examples include eliminating inline script (and limiting embeddable objects as much as possible) via CSP, and versioning third party resources via techniques like subresource integrity.  Mechanisms such as augmenting the codebase to make sure all appropriate user input, data storage, and output properly sanitize data may be used - although they may be more expensive to implement and audit.

The AS should likewise take into account an application’s overall security posture when deciding appropriate policies around delegated authorization scopes and token lifetimes.

Best current practices include turning the screws tightly around CSP. But it is (theoretically) possible to accomplish the same with brute-force sanitization, which has been made simpler with framework support. It is still ultimately the AS job to decide which clients have which capabilities.

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