Re: [GNAP] Addition of optional 'access_token' in interact callback section

Fabien Imbault <fabien.imbault@gmail.com> Sat, 22 January 2022 08:27 UTC

Return-Path: <fabien.imbault@gmail.com>
X-Original-To: txauth@ietfa.amsl.com
Delivered-To: txauth@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id BEA4D3A08BE for <txauth@ietfa.amsl.com>; Sat, 22 Jan 2022 00:27:35 -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, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, SPF_HELO_NONE=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=gmail.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 osR-urPtX1o8 for <txauth@ietfa.amsl.com>; Sat, 22 Jan 2022 00:27:31 -0800 (PST)
Received: from mail-il1-x134.google.com (mail-il1-x134.google.com [IPv6:2607:f8b0:4864:20::134]) (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 F0E943A08BC for <txauth@ietf.org>; Sat, 22 Jan 2022 00:27:30 -0800 (PST)
Received: by mail-il1-x134.google.com with SMTP id r15so9552372ilj.7 for <txauth@ietf.org>; Sat, 22 Jan 2022 00:27:30 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=EguL5KXpSsE8CwDG0sXYPSjnqPicQEQwaHwD6Tkq5VY=; b=qGLG7RQ9837p4auwDi1HcncwUgCu5S+0WwVxCP1T4FbroweDISCj/s+PV2JgrW2uee jws8MLdmbEcbNIGMc+E44nPAG+SRvEbPdFPPnCJbFqOWsJAjcU+u/Q2dernmn6pSiB2i bPT5g/faPHprfKjlc1Fq8MbyYj1r1mnqYO9Yh6kk3h3UJjMV9c409T81YNvaMVfsVUHf GmBEt4iS+/tOLAj/13C4nmx862BvAzw4hhZ7eKBQlxEhbFSKU9U+sEFjDpzPHaGMmV/n P6vTU4Q16PK2Jenh26nr720xbwCtBDNOcOr0JNSbu0vmZ5EPDbzMEIevr4cyhsyzQrde xpzQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=EguL5KXpSsE8CwDG0sXYPSjnqPicQEQwaHwD6Tkq5VY=; b=kFEePZ38l5GULVLoGQ/BS61a6TO0VH0Dg+PYc8g4fP5oIoPWJdYMpl83EwGAOSNX4S gZ51mdEl9yw4G3V9FZvQSO63hirFb5PPnCsKmkdjMBPvBbkLSpVSIvtoPzIOdnIZKM3N gFQ/lYNm9Uw44+KZqkn8re4lQMgCnL0sxvgFOqdJgqHbSJ9hMEd+It/cxNzW9s7zjkKb 9R0PHAcjOH2YXcja4nzL5vaP405FjLsZ8gsR9q6Iaw2L14SnVgwwkeTkWO/LMEtYvlu2 JzG9K7/Za9rAjerVOF5cw8SPox4YvNfGss0fSoyki9yZf91q8u1bV51nlPhRIUjso0bF BY9g==
X-Gm-Message-State: AOAM530L8Ul8eXG5dBTnPKHMLTx1NuIZYfVVZW79sO/kSgmfidgpqi2S 6OSy0R2ndu/H5qqe5pK9BV/3Y1PHqy0wloElz3c=
X-Google-Smtp-Source: ABdhPJwj7UOHy3gbou9Hvy8d7ai26EDy30pm29vp/up2B24sMEvRqL3NTFCA+t619TqoboBCeLu6ZVaaoP46/VU0JmU=
X-Received: by 2002:a05:6e02:1c27:: with SMTP id m7mr4147475ilh.114.1642840049586; Sat, 22 Jan 2022 00:27:29 -0800 (PST)
MIME-Version: 1.0
References: <YT1PR01MB30997386FF4252950B34E9F2E4549@YT1PR01MB3099.CANPRD01.PROD.OUTLOOK.COM> <YT1PR01MB3099EEADBB4C78C6BD0807D5E45B9@YT1PR01MB3099.CANPRD01.PROD.OUTLOOK.COM> <EC5B1BAD-6526-434B-A6CF-9CF656124C9B@mit.edu>
In-Reply-To: <EC5B1BAD-6526-434B-A6CF-9CF656124C9B@mit.edu>
From: Fabien Imbault <fabien.imbault@gmail.com>
Date: Sat, 22 Jan 2022 09:27:17 +0100
Message-ID: <CAM8feuSC2vxHWTu4SkcXZDMs19H25Ep05fZUHo0zznJj0nDdnw@mail.gmail.com>
To: Justin Richer <jricher@mit.edu>
Cc: Mike Varley <mike.varley@securekey.com>, GNAP Mailing List <txauth@ietf.org>
Content-Type: multipart/alternative; boundary="00000000000094197505d627811a"
Archived-At: <https://mailarchive.ietf.org/arch/msg/txauth/fIp_5y2HCC9Yq19ed1B5SwV9Z1k>
Subject: Re: [GNAP] Addition of optional 'access_token' in interact callback section
X-BeenThere: txauth@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: GNAP <txauth.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/txauth>, <mailto:txauth-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/txauth/>
List-Post: <mailto:txauth@ietf.org>
List-Help: <mailto:txauth-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/txauth>, <mailto:txauth-request@ietf.org?subject=subscribe>
X-List-Received-Date: Sat, 22 Jan 2022 08:27:36 -0000

Hi Mike,

I think the idea is interesting. I agree with the technicalities described
by Justin.

Could you describe an example, without resorting to the GNAP start/finish
parlance ? I think it would help us identity similar patterns more easily.

Best,
Fabien


On Fri, 21 Jan 2022, 19:42 Justin Richer, <jricher@mit.edu> wrote:

> Hi Mike, thanks for bringing this to the WG. My gut instinct is that we
> could potentially re-use a similar construct we have in other parts of the
> protocol, where we’re sending a URI and an access token to use at the URI,
> with all of its parameters. I think it’s important that we don’t slip into
> the OAuth 2 over-simplification of “access_token” being a simple string
> value, because then you need to invent a whole bunch of other things to
> talk about non-bearer tokens or other attributes. But we could take the
> same kind of construct we use for the continuation endpoint response and
> use it again with what you have below: you have a  URI and an access token,
> and the access token is a fully defined GNAP access token structure. So the
> “continue” section looks like this:
>
> {
>     "continue": {
>         "access_token": {
>             "value": "80UPRY5NM33OMUKMKSKU"
>         },
>         "uri": "https://server.example.com/continue",
>         "wait": 60
>     }
> }
>
> The access token here is, by default, bound to the client’s presented key
> — it’s the same structure that you get back from a “real” access token
> response, only embedded. This is what I’m thinking that might look like in
> the example below:
>
> {
>     "client" : "protected.client.ca",
>     "access_token" : {
>         "access" : [  "idproof1"],
>         "flags" : "bearer"
>     }
>     "interact" : {
>         "start" : [ "app", "user_code" ],
>         "finish" : {
>             "method" : "push",
>             "nonce" : "client_nonce_random",
>
> *            "uri" : "https://protected.client.ca/callback/session/abc-123
> <https://protected.client.ca/callback/session/abc-123>",
> "access_token" : {*
> * “value”: “callback_access_token”,*
> * “flags”: [ “bearer” ]*
> *     }*
>         }
>     }
> }
>
> This way, we’re not inventing a new structure, it’s just another GNAP
> token. And  yes, it would need to be optional, and only defined for the
> “push” method (at least with what’s defined in core).
>
> I agree that the security and privacy considerations of something like
> this would be pretty intense, though, since now we’re having the client
> instance create and manage a token. Maybe it’s a good extension? But if so,
> how can we define the “finish” section such that it can be extended this
> way?
>
> Would love to hear if anyone else has this use case, too.
>
>  — Justin
>
> On Jan 21, 2022, at 9:39 AM, Mike Varley <mike.varley@securekey.com>
> wrote:
>
> Hello GNAP’ers,
>
> I would like to float the idea of adding an optional core parameter to the
> ‘interact’ request object parameter called ‘access_token’. Specifically
> relevant to the finish.method = push function.
>
> For example:
> {
>     "client" : "protected.client.ca",
>     "access_token" : {
>         "access" : [  "idproof1"],
>         "flags" : "bearer"
>     }
>     "interact" : {
>         "start" : [ "app", "user_code" ],
>         "finish" : {
>             "method" : "push",
>             "uri" : "https://protected.client.ca/callback/session/abc-123
> ",
>             "nonce" : "client_nonce_random",
>             "access_token" : "callback_access_token"
>         }
>     }
> }
>
> The result of the above would be that when the POST callback is made to
> the client API endpoint, the bearer access token would be included as
> authorization.
>
> The motivation is clients who have API endpoints may require that all API
> calls be made with an access token -  there are no open server API
> endpoints. The motivation for including it in the core spec is too ensure
> there is a standard way of providing this security parameter, and AS
> developers are not left re-inventing this parameter for clients. Some
> clients I have worked with have been adverse to putting access tokens in
> the URI as parameters as these may get logged by proxies and gateways.
>
> There are a couple drawbacks that I see to supporting this parameter;
> first, it currently only covers “bearer” tokens – so other security
> parameters or requirements either get included (making the protocol and the
> AS life much more difficult), and second there wouldn’t be much guidance on
> how the client is expected to generate this access token (most access_token
> generating services require a client request to kick things off…) and then
> this may cascade into more complicated nuanced steps.
>
> I am very much interested in other’s experience on this topic; “this is a
> good idea/bad idea because…” and also “this should be core/extension
> because”. I believe adding lots of optional parameters for not-so-well
> defined use cases that may never practically occur in the wild to be
> detrimental to a spec as it just leads to more developer guesswork and
> customization, so I would like to avoid that also :)
>
> Thanks all!
>
> MV
>
> ---
> Mike Varley
> mike.varley@securekey.com
> Architect – Office of the CTO
> SecureKey Technologies Inc.
>
>
>
>
>
> This email and any attachments are for the sole use of the intended
> recipients and may be privileged, confidential or otherwise exempt from
> disclosure under law. Any distribution, printing or other use by anyone
> other than the intended recipient is prohibited. If you are not an intended
> recipient, please contact the sender immediately, and permanently delete
> this email and its attachments.
> --
> TXAuth mailing list
> TXAuth@ietf.org
> https://www.ietf.org/mailman/listinfo/txauth
>
>
> --
> TXAuth mailing list
> TXAuth@ietf.org
> https://www.ietf.org/mailman/listinfo/txauth
>