Re: [OAUTH-WG] We appear to still be litigating OAuth, oops

Phillip Hunt <phil.hunt@independentid.com> Wed, 24 February 2021 17:10 UTC

Return-Path: <phil.hunt@independentid.com>
X-Original-To: ietf@ietfa.amsl.com
Delivered-To: ietf@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 67E273A0936 for <ietf@ietfa.amsl.com>; Wed, 24 Feb 2021 09:10:10 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.864
X-Spam-Level:
X-Spam-Status: No, score=-0.864 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, MIME_QP_LONG_LINE=0.001, MISSING_HEADERS=1.021, SPF_HELO_NONE=0.001, SPF_NONE=0.001, T_KAM_HTML_FONT_INVALID=0.01, URIBL_BLOCKED=0.001] autolearn=no autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=independentid-com.20150623.gappssmtp.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 od0h58csRDnN for <ietf@ietfa.amsl.com>; Wed, 24 Feb 2021 09:10:07 -0800 (PST)
Received: from mail-pf1-x42f.google.com (mail-pf1-x42f.google.com [IPv6:2607:f8b0:4864:20::42f]) (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 1C1C63A083B for <ietf@ietf.org>; Wed, 24 Feb 2021 09:10:06 -0800 (PST)
Received: by mail-pf1-x42f.google.com with SMTP id j12so1715560pfj.12 for <ietf@ietf.org>; Wed, 24 Feb 2021 09:10:06 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=independentid-com.20150623.gappssmtp.com; s=20150623; h=content-transfer-encoding:from:mime-version:subject:message-id:date :cc; bh=kok6S1n+pzr4g4ak8jYjbY2DHl71KhcS0rNfFabvw24=; b=t3/cOYNhMtBrJ1CkVHRYRl8JRnTegK0ZnqAE+Q5f5Q7XRDdAC/d3R+bDH4ZluY+4uV 4bVDp3HctHbYj+/jPFKvC7JljuhWhE0MI7IzjbJXRmDd0ZIxTIJVlRAw5IaiQU/vylue 9pgB/zhtEiQdg12iFmf3YryieIy2kvR3MqC3s/R97yoJs/uryz1Uzt5JNM2/lwi/97OB Zjp1GGDthLGYt1StHpofl705BmKCz4zdrIqHPHzdX/QpE0o5Yj1+gQB6FD2BEW4lmWFC 4/rnqmLba/GFoEXPadsxbbzbeR7cBGBnCCUgGfy2QAo++cWnExm/Pzdlbx8wxWtYixA9 RCPQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:content-transfer-encoding:from:mime-version :subject:message-id:date:cc; bh=kok6S1n+pzr4g4ak8jYjbY2DHl71KhcS0rNfFabvw24=; b=TcQ8WuFs3jobNGwtQt5eKewfBHnD66OnSBoIwY30PEBVkvuCzoaVoy6i1/eXqbgMCE mU4Oo5umApybQLONOt+2mOVFWGwQekp3EZ3xMqGTeiHopJ9N07b7yYIIwqwOXR7ffKeo ILyOqdh+aMeBBTnnXvtaJNJLi4FslBxctCr7tMNh3Gh/VQkIvWLohNb7GJr1AnGM8O+P ajr+JCuQKpYYWosQQBzWRf+O/DnGF7LRYNIG9CJTLRjjbtWR9oTZQp4yJHKwqbir3KDc a/5X/k5GwUDj4CVO2q7B+Bd1E1jsECvIbZfArofaBW6eXwV3WSgbTol52lywi4YrOgQB Tbug==
X-Gm-Message-State: AOAM530YgI3k1QxecAk3IixvVmni9i4Fitbysp52Zxm/B8YmPqpZt+Ws YRWYb+aC2T7bir9/NTWOTjOh7Q==
X-Google-Smtp-Source: ABdhPJyVzoh8F27g2vYGgWwAMTbLfJBT67hORUz7ye6M7OgYJrCEn4FBSKuH6NQSVc6MUsFKMp33YQ==
X-Received: by 2002:a05:6a00:9d:b029:1ed:c1d6:5042 with SMTP id c29-20020a056a00009db02901edc1d65042mr11712989pfj.71.1614186606334; Wed, 24 Feb 2021 09:10:06 -0800 (PST)
Received: from ?IPv6:2001:569:7a71:1d00:f5c0:d87b:8984:9a74? (node-1w7jr9qrfoxxb9ffdavw7pnjo.ipv6.telus.net. [2001:569:7a71:1d00:f5c0:d87b:8984:9a74]) by smtp.gmail.com with ESMTPSA id w207sm1779804pff.62.2021.02.24.09.10.05 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 24 Feb 2021 09:10:05 -0800 (PST)
Content-Type: multipart/alternative; boundary=Apple-Mail-4FAEEA39-51CE-4BA2-B954-03FD113AFEA9
Content-Transfer-Encoding: 7bit
From: Phillip Hunt <phil.hunt@independentid.com>
Mime-Version: 1.0 (1.0)
Subject: Re: [OAUTH-WG] We appear to still be litigating OAuth, oops
Message-Id: <2BA2F95F-2621-49C2-9D4B-C7431C78F6F3@independentid.com>
Date: Wed, 24 Feb 2021 09:10:05 -0800
Cc: Justin Richer <jricher@mit.edu>, Bron Gondwana <brong@fastmailteam.com>, Phillip Hallam-Baker <phill@hallambaker.com>, OAuth@ietf.org, IETF-Discussion Discussion <ietf@ietf.org>
X-Mailer: iPhone Mail (18D52)
Archived-At: <https://mailarchive.ietf.org/arch/msg/ietf/iH8QpVEK2n2HguDD7JE9aS05oeE>
X-BeenThere: ietf@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: IETF-Discussion <ietf.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/ietf>, <mailto:ietf-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/ietf/>
List-Post: <mailto:ietf@ietf.org>
List-Help: <mailto:ietf-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/ietf>, <mailto:ietf-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 24 Feb 2021 17:10:10 -0000

One thing that this thread is overlooking (Hannes and others have mentioned it) is that OAuth is an *authorization* protocol not intended for authentication. 

OAuth is not really for federation and sharing of claims.  The idea is for an authz server to issue short term tokens that contain enough information to provide context (the subject) when an identified client accesses a relying party api. 

This role of identity provisioning and the nxm discussion really belong over in the OpenId Connect working group....unless the IETF wants to solve this problem too. 

The IETF also has an OAuth enabled provisioning spec called SCIM (RFC7643/7644).  There is even a profile for using SCIM with OpenId Connect.  That said, we have JIT provisioning and on demand with OpenId Connect and we have direct provisioning with SCIM. 

Regarding NxM for OAuth this does not usually work out the way people think. Access control for APIs is almost alwayd “local” to the API. When i hear NxM what people usually mean is they want to accept externally issues tokens. There are a number of flows including token exchange that this group has published (RFC8693). 

Finally in the federated authentication space a lot of work was done on UMA or User Managed Access. It hasn’t really broken out. It has been deployed in a lot of communities/silos where nxm relations exist but for whatever reason it has not gone mainstream. My theory is that every developer wants to control the user experience so much they fight any form of delegation. 

Hope this helps. 

Cheers,

Phil

> On Feb 24, 2021, at 8:35 AM, Tim Bray <tbray@textuality.com> wrote:
> 
> The OAuth work has successfully built a perfectly reasonable syntax and protocol for exchanging identity and attribute assertions, and that's fine.  What it hasn't done is opened up the world of Identity Provision, but that's not a technical problem. 
> 
> OAuth flowed out of OpenID back in the day. The core idea of OpenID, beginning with the attractive but wrong notion that URIs are a good way for people to identify themselves, was that service providers should be prepared to trust arbitrary identity providers.  At the moment, nobody has figured out an automated way for services to figure out which  identity providers they want to trust. The counter-argument is that service providers should just trust people to pick appropriate identity providers, and it has never in my experience succeeded in convincing a single lawyer or business-policy type.
> 
> 
> 
> On Wed, Feb 24, 2021 at 7:21 AM Justin Richer <jricher@mit.edu> wrote:
>> I agree that the NxM problem is the purview of the whole IETF, but it’s something that we’re particularly interested in over in GNAP. As the editor of OAuth’s dynamic registration extension and the GNAP core protocol, I hope I can add to this conversation.
>> 
>> From a technical standpoint, OAuth’s dynamic client registration lets arbitrary clients talk to an AS, but the trust isn’t there in practice. On top of that I think this problem is exacerbated by a fundamental protocol design element of OAuth: the client_id that’s required. That field means there’s an assumption that a relationship was set up between the pieces of software, implied to be trusted by admins at the AS. Sure you can get that client_id under special circumstances, but there’s still a special weight handed to that and the dynamic stuff feels like you’re giving up control as an AS. In GNAP, the relationship is inverted, and it’s designed as “dynamic-first”, with pre-registered clients being an optimization on top of that.
>> 
>> Does this solve the NxM problem? No, because companies are still going to decide that they only talk to keys or identifiers that they know ahead of time. But the protocol puts the dynamic case forward as baseline and fits in much better with the likes of JMAP than OAuth ever could:
>> 
>> - {The Bat} creates a key pair.
>> - {User} enters their email address into {Bat}, {Bat} does discovery (maybe that’s a JMAP thing? Webfinger?) and finds the JMAP server and the GNAP endpoint for authentication as an option.
>> - {Bat} talks to the GNAP AS at {ISP} and presents the key it just made up. {ISP} has never seen this key, but knows how to talk GNAP and get the user to authorize {Bat} to access email.
>> - {User} does this using GNAP and gets back an access token that’s tied to the key {Bat} made back at the beginning. That token is tied (at the {ISP}) to the user’s account.
>> 
>> Yes, you can do all of this today with OAuth (and people have done so), but OAuth’s basic model of “go do discovery and registration first and THEN talk to me” is a trust impediment more than it is a technical impediment. The “negotiation” part of the GNAP name comes from the philosophy of “start talking first and figure out what you need as you go”. Instead of jumping through hoops to get something you can trust, you just start in and then decide how much you trust it. A corporate rollout could use its own key distribution mechanism and static registration to limit which client instances talk back to the company server, regardless of which accounts would authorize access on top of that. An internet-facing service is going to be more likely to take a TLS approach, of “I’ll talk to you in a secure fashion without caring who you are right now”.
>> 
>> We really are trying to make GNAP a consistent protocol at its core and learn from problems with OAuth in the wild, all while letting GNAP address a wider variety of use cases. I agree that GNAP could be clearer about specific use cases, and we’re working on the spec still so any help here is appreciated. 
>> 
>>  — Justin
>> 
>>> On Feb 24, 2021, at 7:15 AM, Bron Gondwana <brong@fastmailteam.com> wrote:
>>> 
>>> 
>>> 
>>> On Wed, Feb 24, 2021, at 23:09, Warren Parad wrote:
>>>> (I tend to trend lightly in the pronoun area, mostly because I'm shocked that openid included gender but not pronouns)
>>>> 
>>>> I hadn't heard that to be called the NxM problem, so that definitely cleared up the potential confusion (at least for me).
>>>> 
>>>> I think GNAPs lack of clarity is a non sequitur for the handling or not of the multitrust arbitrary-client with arbitrary-service, however it's lack of clarity for me prevents me from knowing whether GNAP actually seeks to solve this problem. So from an OAuth WG perspective we can still ask:
>>>> 
>>>> Is this or should this problem be left to GNAP to solve, or is an OAuth WG responsibility?
>>> 
>>> Honestly I think the problem space is the whole ietf's responsibility. Protocols that allow an end user to safely transfer data between two parties that don't have a pre-existing trust relationship are a key part of enabling user freedom and user choice.
>>> 
>>> Bron.
>>> 
>>>> 
>>>> 
>>>> Warren Parad
>>>> Founder, CTO
>>>> Secure your user data with IAM authorization as a service. Implement Authress.
>>>> 
>>>> 
>>>> On Wed, Feb 24, 2021 at 12:39 PM Bron Gondwana <brong@fastmailteam.com> wrote:
>>>> 
>>>> On Wed, Feb 24, 2021, at 22:04, Warren Parad wrote:
>>>>> I would prefer Bron to answer that question, as they are the one who started this email thread.
>>>> 
>>>> You can also use he when talking about me, or she for that matter - I do enough group fitness classes where it's roughly assumed that the entire class is female, and I have an ambiguous enough name that I'm used to it.  Most people use "he" most of the time.
>>>> 
>>>>> However let's look at GNAP, I've honestly been struggling to understand at least one fully documented case that GNAP supports. It seems in every document the only thing that is clear is GNAP wants to allow "everything", doesn't actually talk about an example.
>>>> 
>>>> That's my biggest fear for GNAP - it too will try to be everything to everybody and wind up being nothing to nobody because the super flexible "everything protocol" is the same as no protocol at all, since you have to special-case everybody you talk to anyway.
>>>> 
>>>>> By NxM, I assume we mean that the end user or client is free to select whichever AS they want, in a way which the RS can verify the AS credential and the user identity, without the RS having to (and really without the ability to limit) which AS are allowed.
>>>> 
>>>> Let's get down to use cases then, rather than talking in abstracts.
>>>> 
>>>> I'm an end user with a copy of {The Bat email client} and I want to connect it to {Gmail} + {Yahoo} + {My ISP}.  It supports {POP3}, a widely popular open standard.  I want to be able to authenticate to each of those services without saving my plaintext passwords on my hard disk where the next {Windows ME} virus will exfiltrate them to {Noextraditionistan} and all my {Dogecoin} will then be exfiltrated from my {Paybuddy} account, leaving me destitute.
>>>> 
>>>> But, {The Bat} doesn't have a trusted client cert from my isp, because who does - so there's no good protocol for me - it's either plaintext auth, or it's some architecture astronaut multi-party nonsense that's massively over specified and doesn't work half the time.  So I write a plain text password on a post-it note which is lying in the dust under my monitor because the glue has gone bad, and I hope I never accidentally click "remember me" when I type it in.
>>>> 
>>>> That's been the reality of the end user experience for very many years.
>>>> 
>>>> NxM means that you can authenticate an arbitrary client against an arbitrary server so long as they are both speaking a known public protocol, without needing to build a trust relationship between the client vendor and the server vendor first.
>>>> 
>>>> Any "trust relationship" is made through a user both who trusts the client and trusts the server, and it's not transitive over to other users of the same client and the same server.  The client author doesn't need to get a signed "I trust you" from every single server, and the server author doesn't have to go identify every single client.
>>>> 
>>>> That's what NxM means to a user, the ability to use arbitrary clients with arbitrary servers so long as they both implement a documented protocol.  Interoperability.
>>>> 
>>>> OAuth has not given interoperability in the NxM sense outside some simple web use cases.  They're nice and all, but they don't tend to be useful with open protocols - OAuth gets used for accessing proprietary API endpoints after getting an access key for a single provider.  At least you get Nx1 or 1xM out of it depending who's the N and who's the M, and maybe some of your code can rhyme so you're not doing everything from scratch each time.
>>>> 
>>>> This is the sorry story of real open protocols.  The floor for true interoperability is still username + password over cleartext, over hopefully a TLS tunnel that's providing some level of protection.  Most so than a few years ago when Fastmail wrote our "starttls considered harmful"[1] objection to the IETF's habit at the time of putting a "STARTTLS" upgrade into an initially plaintext protocol, where an active intercepter could just strip the "I support STARTTLS" indicator from the protocol and convince the client to send the credentials in the clear.
>>>> 
>>>> We're a little better mostly these days, but it's still a tirefire, and in my heart I do hold the OAuth working group's squatting on this area of the landscape while failing to address this burning need partially responsible.  The result (as Phillip pointed out upthread) has been a consolidation towards a few big players - because NxM becomes tractable when you reduce the N and M to small enough numbers.
>>>> 
>>>> Bron.
>>>> 
>>>> [1] https://www.fastmail.help/hc/en-us/articles/360058753834-SSL-TLS-and-STARTTLS
>>>> 
>>>> --
>>>>   Bron Gondwana, CEO, Fastmail Pty Ltd
>>>>   brong@fastmailteam.com
>>>> 
>>>> 
>>> 
>>> --
>>>   Bron Gondwana, CEO, Fastmail Pty Ltd
>>>   brong@fastmailteam.com
>>> 
>>> _______________________________________________
>>> OAuth mailing list
>>> OAuth@ietf.org
>>> https://www.ietf.org/mailman/listinfo/oauth
> _______________________________________________
> OAuth mailing list
> OAuth@ietf.org
> https://www.ietf.org/mailman/listinfo/oauth