Re: [OAUTH-WG] A few comments on draft-ietf-oauth-rar-01

Dave Tonge <dave.tonge@momentumft.co.uk> Thu, 09 July 2020 16:07 UTC

Return-Path: <dave.tonge@moneyhub.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 3A5D93A0CC5 for <oauth@ietfa.amsl.com>; Thu, 9 Jul 2020 09:07:23 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.739
X-Spam-Level:
X-Spam-Status: No, score=-1.739 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.249, HTML_MESSAGE=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-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 (1024-bit key) header.d=momentumft.co.uk
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 VAGfms2KOLov for <oauth@ietfa.amsl.com>; Thu, 9 Jul 2020 09:07:20 -0700 (PDT)
Received: from mail-ot1-x330.google.com (mail-ot1-x330.google.com [IPv6:2607:f8b0:4864:20::330]) (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 39E823A0CC6 for <oauth@ietf.org>; Thu, 9 Jul 2020 09:06:54 -0700 (PDT)
Received: by mail-ot1-x330.google.com with SMTP id 72so2066900otc.3 for <oauth@ietf.org>; Thu, 09 Jul 2020 09:06:54 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=momentumft.co.uk; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=/KXIkp7soTsJEFxDXQqRYzxtapzkRVvpZWPkqdh/aBg=; b=RudfDa7mvbKoCADxtaC8Df7fSsVblkXfOGQ/Xzbno38Kk2X0n5SVGaI6I8eRD+kLr5 HOlguaBuarse+b768nd4lY0qWlsUQpaLWVAA2sMJCHea63YS8LRkuDv34Y8czin1SIok BM/J7j3RtOK8v3bXkzOC0XfQNKbmy3wm4NKhI=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=/KXIkp7soTsJEFxDXQqRYzxtapzkRVvpZWPkqdh/aBg=; b=EcAdujpKP6qILjN7nTK6ugaZbzuZQCuxg96bQXIhRUS+CiAvw7Ad2tl/h0Hho9Sk8M u9K/MkAUyQqs7usPRrT5yP5XPlhgpuyJszMIY/zj2cdCA3rz/BlCxFh5PnnGRFA7S0WX rFR4r/h24mACScyCW5y6qmY09BPdsl6h+l6DszApRJLbB3V0LiYJklkB+t9dc4TnMeJD R/LC+txX9CPgNduBaCKXiYHkL1eYK1NLSSnULo1ZsgDUB9KeKjnWEzNKAUUtzn4Las7e eDyXquG7pRcFhzn0HuZlrZz15tnIHmTqygucn5FoZJpqPrtiS4IH7qI/Y2AxeVdHDL1h /eVA==
X-Gm-Message-State: AOAM533M/vIfX8cb//fmytRETFdD1Lk1XA1SZLwnExN66FdV3TOdmvkg EwzGlSN/Yjmz+PbWLP14KMRqsrdsfnBq6/MHAKbvAoMUDEPb/i5rAftpKMbXiyWssI7brsHzrec 0XqPuSZ1h20LAzg==
X-Google-Smtp-Source: ABdhPJwbyEeXnFqnpdlBXurp9jKbPy4vf5ik1CtnFxhsvIOmb2mQAjsa0WMSi9veinU0E/Ag4LTxyVULoHPDjz8g/Sg=
X-Received: by 2002:a9d:ee2:: with SMTP id 89mr19204318otj.260.1594310813177; Thu, 09 Jul 2020 09:06:53 -0700 (PDT)
MIME-Version: 1.0
References: <CAP-T6TSBiOnSAMHLPtGpNyFz2h2XRRyT8zL-EnNNSrvuhCGXxA@mail.gmail.com> <3AB19607-2D27-416B-BB6A-F9A5C566B9A7@forgerock.com> <4fa0537c-6324-cccd-28b0-80e3c2953b6e@connect2id.com> <85AB3BEE-5197-4EFB-A893-8B1B1ED23F7E@forgerock.com>
In-Reply-To: <85AB3BEE-5197-4EFB-A893-8B1B1ED23F7E@forgerock.com>
From: Dave Tonge <dave.tonge@momentumft.co.uk>
Date: Thu, 09 Jul 2020 18:06:42 +0200
Message-ID: <CAP-T6TR3bcEWVzbBXvdwRwDiB0bNcO-hEmSZw40mEf1zPvkqWQ@mail.gmail.com>
To: Neil Madden <neil.madden@forgerock.com>
Cc: Vladimir Dzhuvinov <vladimir@connect2id.com>, oauth <oauth@ietf.org>
Content-Type: multipart/alternative; boundary="000000000000ae711305aa0469f3"
Archived-At: <https://mailarchive.ietf.org/arch/msg/oauth/QSWoja9_P6IN19Uk5viC0di1nrA>
Subject: Re: [OAUTH-WG] A few comments on draft-ietf-oauth-rar-01
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: Thu, 09 Jul 2020 16:07:23 -0000

Hi Neil

RAR doesn't have to be transactional and people are already using standard
OAuth for transactions without RAR.
But I take your point that RAR is promoting a more transactional use of
OAuth.
However I still don't agree that there is a fundamental difference.
Revocation of access is irrelevant, as I mentioned if access was granted in
error, then the damage is already done whether the user revokes or not.

I'm not sure whether it is worth standardising the approach of linking one
OAuth request to another, and I'm definitely not sure about it for RAR.

It is an interesting suggestion of allowing a user access token to be
presented at the PAR endpoint, but I'm not sure that is needed.
If a particular implementation wants to allow a two stage transaction, they
can simply pass some reference to the first auth in the subsequent RAR auth
flows, e.g.

First flow, a user grants access with the simple scope of "make_payments",
the access token issued at the end of the grant allows access to a resource
server endpoints /payment-consents. The payload the client receives back
when hitting that endpoint is {*id: "123"*, paymentsStarted:[],
paymentsCompleted:[]}
The second flow the client uses RAR with authorization_details containing
this object:

    {
         "type": "payment_initiation",
         "actions": [
            "initiate",
            "status",
            "cancel"
         ],
         "locations": [
            "https://example.com/payments"
         ],
         "instructedAmount": {
            "currency": "EUR",
            "amount": "123.50"
         },
         "creditorName": "Merchant123",
         "creditorAccount": {
            "iban": "DE02100100109307118603"
         },
         "remittanceInformationUnstructured": "Ref Number Merchant",
         *"paymentConsentId": "123",*
      }

This type of flows seems to better separate the AS and the RS

What do you think?

Dave


On Thu, 9 Jul 2020 at 12:24, Neil Madden <neil.madden@forgerock.com> wrote:

>
>
> On 9 Jul 2020, at 09:53, Vladimir Dzhuvinov <vladimir@connect2id.com>
> wrote:
> On 09/07/2020 11:07, Neil Madden wrote:
>
>
>
> An AS is always free to implement the 2 step solution that you proposed
> and indeed it could be easier to implement with RAR in the manner you
> described, but I don't think it should be the prescribed approach.
>
>
> How can an AS implement this with RAR? This is my point - there is no
> mechanism at all in RAR to link a transaction to any kind of prior consent.
> It’s not about mandating such an approach, it’s about *supporting* it at
> all. Every transaction in RAR is a blank slate at the moment.
>
> The ability to reference an existing grant is a general problem with OAuth.
>
> The grant management draft has a "grant_id" parameter which can be used to
> reference prior consent. I suppose to reference prior consent as context
> only a new grant_management_mode may be needed.
>
>
> https://bitbucket.org/openid/fapi/src/master/Financial_API_Grant_Management.md
>
> We also have OAuth Incremental Authorization, which references a refresh
> token:
>
> https://tools.ietf.org/html/draft-ietf-oauth-incremental-authz-04
>
> Thanks, these are useful references. The grant_id approach could work.
> Incremental authZ is an interesting comparison, but in that case the new
> grant replaces the old one, whereas in transactional auth each grant is
> separate. Another potential issue is that the proof of the existing grant
> is only presented at the token endpoint, after the flow has completed.
> Although this does stop the kind of attacks I was worried about, it would
> be better to check this up front if possible. That’s certainly an
> interesting reference though, and one I hadn’t considered before in this
> context, so thanks for mentioning it.
>
> I think I prefer an approach using PAR, with the following
> additions/modifications:
>
> 1. Ability to make PAR mandatory for approval of some scopes and/or for
> particular clients (determined by AS policy).
> 2. Ability to authorize the call to the PAR endpoint using an access token
> instead of client authentication.
>   - AS policy can decide what type of authorization is required for a
> particular request: user-approved access token, client_credentials access
> token (i.e., current OB UK), or direct client authentication.
> 3. If a user-approved AT is used in step 2, then the AS MUST ensure that
> the same user is involved in the subsequent authorization flow.
>
> There is precedent for step 2 - e.g., token introspection currently allows
> an access token instead of client authentication.
>
> If RAR was then updated to discuss this issue in the security
> considerations (or elsewhere) with a reference to these features of PAR
> then I think I would be pretty happy with that.
>
> — Neil
>
> _______________________________________________
> OAuth mailing list
> OAuth@ietf.org
> https://www.ietf.org/mailman/listinfo/oauth
>


-- 
Dave Tonge
CTO
[image: Moneyhub Enterprise]
<http://www.google.com/url?q=http%3A%2F%2Fmoneyhubenterprise.com%2F&sa=D&sntz=1&usg=AFQjCNGUnR5opJv5S1uZOVg8aISwPKAv3A>
Moneyhub Financial Technology, 5th Floor, 10 Temple Back, Bristol, BS1 6FL
t: +44 (0)117 280 5120

Moneyhub Enterprise is a trading style of Moneyhub Financial Technology
Limited which is authorised and regulated by the Financial Conduct
Authority ("FCA"). Moneyhub Financial Technology is entered on the
Financial Services Register (FRN 809360) at fca.org.uk/register.
Moneyhub Financial
Technology is registered in England & Wales, company registration number
06909772 .
Moneyhub Financial Technology Limited 2018 ©

DISCLAIMER: This email (including any attachments) is subject to copyright,
and the information in it is confidential. Use of this email or of any
information in it other than by the addressee is unauthorised and unlawful.
Whilst reasonable efforts are made to ensure that any attachments are
virus-free, it is the recipient's sole responsibility to scan all
attachments for viruses. All calls and emails to and from this company may
be monitored and recorded for legitimate purposes relating to this
company's business. Any opinions expressed in this email (or in any
attachments) are those of the author and do not necessarily represent the
opinions of Moneyhub Financial Technology Limited or of any other group
company.

-- 


Moneyhub Enterprise is a trading style of Moneyhub Financial Technology 
Limited which is authorised and regulated by the Financial Conduct 
Authority ("FCA"). Moneyhub Financial Technology is entered on the 
Financial Services Register (FRN 809360) at https://register.fca.org.uk/ 
<https://register.fca.org.uk/>. Moneyhub Financial Technology is registered 
in England & Wales, company registration number 06909772. Moneyhub 
Financial Technology Limited 2020 © Moneyhub Enterprise, Regus Building, 
Temple Quay, 1 Friary, Bristol, BS1 6EA. 

DISCLAIMER: This email 
(including any attachments) is subject to copyright, and the information in 
it is confidential. Use of this email or of any information in it other 
than by the addressee is unauthorised and unlawful. Whilst reasonable 
efforts are made to ensure that any attachments are virus-free, it is the 
recipient's sole responsibility to scan all attachments for viruses. All 
calls and emails to and from this company may be monitored and recorded for 
legitimate purposes relating to this company's business. Any opinions 
expressed in this email (or in any attachments) are those of the author and 
do not necessarily represent the opinions of Moneyhub Financial Technology 
Limited or of any other group company.