[OAUTH-WG] JMAP's experience with proposing an Authentication model

Bron Gondwana <brong@fastmailteam.com> Tue, 23 February 2021 13:03 UTC

Return-Path: <brong@fastmailteam.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 BD66D3A2AEB for <oauth@ietfa.amsl.com>; Tue, 23 Feb 2021 05:03:20 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.097
X-Spam-Level:
X-Spam-Status: No, score=-2.097 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=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=fastmailteam.com header.b=FZJzb+qW; dkim=pass (2048-bit key) header.d=messagingengine.com header.b=u3k0jrMT
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 Q8WbqPjsEYFy for <oauth@ietfa.amsl.com>; Tue, 23 Feb 2021 05:03:18 -0800 (PST)
Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id DBF3D3A2AE9 for <oauth@ietf.org>; Tue, 23 Feb 2021 05:03:18 -0800 (PST)
Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id CA2C95C008C; Tue, 23 Feb 2021 08:03:17 -0500 (EST)
Received: from imap7 ([10.202.2.57]) by compute2.internal (MEProxy); Tue, 23 Feb 2021 08:03:17 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= fastmailteam.com; h=mime-version:message-id:in-reply-to :references:date:from:to:cc:subject:content-type; s=fm2; bh=G4Sn cxe29R14ZJpwz2Nd9CL8MmzrHpbjEDX0Ks9kA0k=; b=FZJzb+qWUk4vYT8vpVYu 6oIQbkatI4/rSnIuVlp1Pv5NmC2iBqhcEUWnISI6lVaADR1tfj5MjEm2ifyctgtS TsyfD77GJEMFkKgy15T2yPuPZtX/QtEISraktPeP2uJM2KyHzFauj04l/YVpRX6j v/AS2RGo6xz36NMY1Qp0GtkrCPRS/mmSoZds5yPScWSct74p+VPQfsaGwrmelP5+ TnIQ6dhsDnqp8jnzM4pD1zbL75yJtgl4sWu6/QfZAPWUdAeDIaIxlPDIG7unBv4o hv3kwtNqobjVp6hgQyQBtsWFWyxYAO+H4f+HCZLt4qzbBjmYxTuqSy1KgdTsAfuo 2w==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=G4Sncx e29R14ZJpwz2Nd9CL8MmzrHpbjEDX0Ks9kA0k=; b=u3k0jrMTbL9Na8VqGy0eTO JyYuy6lKvM05ci/2sdnec8HrSYWQ4A2oBBdoZTHnt7p7kD1YGyAzUYSOK0E0kNPU 0aMDM4h+SX/GCV4i4dXwJYfZGxqhGh2QPIlUl4egm55w1bHghxnvgkuT7i0EJqlg yo0dl/erOYwE1DgueGbmnx/FI+EP0ZmxZEnpBRWwbfatE/nCjFRetSiLKVJvzHK3 /JsGX1dBnLDyNZIxMpyQf2nvoWTwP/fdJlAEK7h5xlkaUe+xKMUykmmlIbBoF83R eahuIKjAXnKNKEGnbzdToEOoJKH8DO00pX0Gk3/QVfThFF6U1/wpJPflDA0JK4Yw ==
X-ME-Sender: <xms:Ff00YLUL7mdzkw7eLnXAcWfK7OPl2M7QI_eK6fsZW6564BwneiDseg> <xme:Ff00YDm2sSeqQK51x456vgTHBZmmbtGn98NeGlXEtbsL1gBlILlua-eGYCsvaMl8h U954grM_8U>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrkeehgdegjecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefofgggkfgjfhffhffvufgtsegrtderreerreejnecuhfhrohhmpedfuehrohhn ucfiohhnugifrghnrgdfuceosghrohhnghesfhgrshhtmhgrihhlthgvrghmrdgtohhmqe enucggtffrrghtthgvrhhnpeehffduieffuefffeeuuedtiefhleeuvdeihfefuedvgfeu hffgffdthfefjedvieenucffohhmrghinhepihgvthhfrdhorhhgpdhirghnrgdrohhrgh enucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegsrhho nhhgsehfrghsthhmrghilhhtvggrmhdrtghomh
X-ME-Proxy: <xmx:Ff00YHYkTvJjiC-177WL2VPw7fQaTiJYXd9wpfgD98lfYe89TwjpkQ> <xmx:Ff00YGX2spUX5bjDoYYl8LOhaLpy9FREeN2pyuV666CMKGeHsRLYXw> <xmx:Ff00YFlr8X0OIsGShrYglg_wMwSqJB_N87WUChkE7GMAsNlox_hY4A> <xmx:Ff00YDQXF6tNt_8O0nAx7IifaxT7xVypWjIhFbA8cXiI9RsUrERU8A>
Received: by mailuser.nyi.internal (Postfix, from userid 501) id 043CB3604F6; Tue, 23 Feb 2021 08:03:17 -0500 (EST)
X-Mailer: MessagingEngine.com Webmail Interface
User-Agent: Cyrus-JMAP/3.5.0-alpha0-141-gf094924a34-fm-20210210.001-gf094924a
Mime-Version: 1.0
Message-Id: <98f539f4-1207-4a03-ae1f-f377d6964122@dogfood.fastmail.com>
In-Reply-To: <AM0PR08MB371608D64FF113417D8B3C2DFA809@AM0PR08MB3716.eurprd08.prod.outlook.com>
References: <37eecb9b-f0eb-e21c-b162-b1f0339e4981@si6networks.com> <3c2d646d-f18d-4d88-b458-29dbd486432b@beta.fastmail.com> <AM0PR08MB371669108E9CEA561BEC9EF6FA809@AM0PR08MB3716.eurprd08.prod.outlook.com> <d6648437-332b-4668-a1c7-591f2c287539@dogfood.fastmail.com> <AM0PR08MB371608D64FF113417D8B3C2DFA809@AM0PR08MB3716.eurprd08.prod.outlook.com>
Date: Wed, 24 Feb 2021 00:01:43 +1100
From: Bron Gondwana <brong@fastmailteam.com>
To: Hannes Tschofenig <Hannes.Tschofenig@arm.com>
Cc: "oauth@ietf.org" <oauth@ietf.org>
Content-Type: multipart/alternative; boundary="133c9b7726514212bc7d4cc9b293ac4c"
Archived-At: <https://mailarchive.ietf.org/arch/msg/oauth/PhdXFJ3KUZakv5PjfHOKdCXVP_k>
Subject: [OAUTH-WG] JMAP's experience with proposing an Authentication model
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: Tue, 23 Feb 2021 13:03:21 -0000

(bringing this back to just the OAuth list)

On Tue, Feb 23, 2021, at 23:46, Hannes Tschofenig wrote:
> I don’t know whether it is already too late for your document (which is dated 2016) to consider the use of OAuth but Rifaat and I are happy to put you on the spot in one of our future virtual office hours or virtual interim meetings. 


It's never "too late" - we could add a "how to Authenticate JMAP using OAuth" document easily enough.

That specific document which I mentioned went through many revisions and a split to eventually become RFC8620 and RFC8621.  The core JMAP spec says this about Authentication:

8.2 <https://tools.ietf.org/html/rfc8620#section-8.2>.  Authentication Scheme



   A number of HTTP authentication schemes have been standardised (see
   <https://www.iana.org/assignments/http-authschemes/>).  Servers
   should take care to assess the security characteristics of different
   schemes in relation to their needs when deciding what to implement.

   Use of the Basic authentication scheme is NOT RECOMMENDED.  Services
   that choose to use it are strongly recommended to require generation
   of a unique "app password" via some external mechanism for each
   client they wish to connect.  This allows connections from different
   devices to be differentiated by the server and access to be
   individually revoked.

What it doesn't have is something like what existed in the first draft, which allowed out-of-band authentication in many ways, and *probably did require security review - but security review from people who wanted it to succeed rather than from people who wanted it to go away because it wasn't OAuth*.  At the time, that didn't sound like something achievable.  We were told that any authentication proposal would have to get past the OAuth working group, who would shoot it down or stagnate it for years.  Maybe that was wrong, but it was the impression we got from multiple people in multiple conversations, both in our working group and in the hallway track.

The original authentication protocol started with a username and a service, and got back a session token plus list of authentication methods that were allowed, or even a "we already authenticated you out of band - go right ahead".

The methods included password or password plus second factor, but also allowed for things like "here's a URL, go sign in there and when you're finished your session will be valid" or "a popup has been shown in your existing sessions on other clients, confirm this code and click OK".

The important thing was that there was no requirement that there be any web context built into the client - it could happily just sit there waiting for a push event down the push channel to tell it that the session had been authorised, or poll to see if it was allowed access yet.  The authentication could be entirely out of band after the initial handshake.

It's a quite different model than OAuth2.  It's probably closer to GNAP, which is why I've been watching that with interest, though not with enough time to engage closely.

Cheers,

Bron.

--
  Bron Gondwana, CEO, Fastmail Pty Ltd
  brong@fastmailteam.com