[GNAP] draft-ietf-gnap-core-protocol-00 feedback

Dick Hardt <dick.hardt@gmail.com> Tue, 20 October 2020 03:27 UTC

Return-Path: <dick.hardt@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 7E4F93A10E6 for <txauth@ietfa.amsl.com>; Mon, 19 Oct 2020 20:27:04 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.096
X-Spam-Level:
X-Spam-Status: No, score=-2.096 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_FONT_LOW_CONTRAST=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 1CWa9vTsLI7B for <txauth@ietfa.amsl.com>; Mon, 19 Oct 2020 20:27:01 -0700 (PDT)
Received: from mail-lf1-x130.google.com (mail-lf1-x130.google.com [IPv6:2a00:1450:4864:20::130]) (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 1F82F3A10BA for <txauth@ietf.org>; Mon, 19 Oct 2020 20:27:01 -0700 (PDT)
Received: by mail-lf1-x130.google.com with SMTP id d24so266363lfa.8 for <txauth@ietf.org>; Mon, 19 Oct 2020 20:27:01 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=3ZK0bGFEx8YW6sFXy80zxj2ktVoBZqgElSq6vZFlKUM=; b=I5ZTi30oDxvEHjwtnXoA9ptNQwbKUKKQCZxC8d/BPdX/+lXrHf70n4Oh+NkzzUWPyy AhpXL6QMDh4BLzdKaooVFvdoDL7TrMKFPG6+QXfem0u7jDedXRtS5BOqWeG03uWnJJ6Q vBCnFEzBWnAqP7auk0aKZmaF1cYHdc/i9Nq4UrwcEel/6Gn96RA2RErN34prNDdISDYv RRBQz60ndbuhcxU1A+AGAy77kZslv9vMCMwnr+NuDMQQQTiRTBvdjxP5UG6t4689G1Ro DzyLRKoipDMqmc/E9mZR8dyeO35OhVD22V8RriRB9qFfm1XhrfP8NouXTWPpWBf60Eo7 WD0g==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=3ZK0bGFEx8YW6sFXy80zxj2ktVoBZqgElSq6vZFlKUM=; b=gmlAMWWojW2g2T+Ht3Ggrv34MtHyTik5AI3HNkUm2Ug9PN/UlHxpgKBbBy0b/3ENDz LyyOB6MwxKnNIgQuseFplOQ5ruv8LyR5d+GDuJ8bXS0VdECxaP61szv2nMgeHedi+qZL APx8qiF5mrByt7Movo5zItia3LusDtgVrpyaVgGK1sGBrCtHSD4PvcMBjsrMHhJtg60k 7eT5nGARVOtULIv3sKreCE02Wt1crN8uEQo4QxG4UdIj0jIy99sgpy8+FlsHEb1+cDEi Oj7kNYGc3jCukN5wFYLVpzpohsXs5YvMnWwB0vHDoTGbH6KVFloDB4XOa19jSNutNVPU QgKw==
X-Gm-Message-State: AOAM5322kyizK33kB9gxx6Db9fT+YtICuxYjQST0m79+bXEBSFjl4NyG C1ffQrThVTNkg0C9Kmy7aZwgajpJuf9kIWn0HINcWcU1AdPA7Q==
X-Google-Smtp-Source: ABdhPJyrT2nq/UXgb149SvgzewVapsw7aZY/iWwqLZjuMgbJfQy/eXnqFME62dNk3rBMsYsswQ7DRoYvzhAA4PX/Ix4=
X-Received: by 2002:a19:cb14:: with SMTP id b20mr215108lfg.162.1603164418813; Mon, 19 Oct 2020 20:26:58 -0700 (PDT)
MIME-Version: 1.0
From: Dick Hardt <dick.hardt@gmail.com>
Date: Mon, 19 Oct 2020 20:26:22 -0700
Message-ID: <CAD9ie-v7uUxBzMz6K_n=xpVAvnJY=GHe1iB7hBOBj4xxdbp0wg@mail.gmail.com>
To: GNAP Mailing List <txauth@ietf.org>
Content-Type: multipart/alternative; boundary="000000000000b3336205b211cd99"
Archived-At: <https://mailarchive.ietf.org/arch/msg/txauth/F_2RGucuAh_dc2y6knZgX8hpAC8>
Subject: [GNAP] draft-ietf-gnap-core-protocol-00 feedback
X-BeenThere: txauth@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: <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: Tue, 20 Oct 2020 03:27:06 -0000

*Previous Feedback*
The following items were discussed in the design team, but did not make it
into the draft for WG discussion. A concern I have with many of the editor
notes (which I point out) is that they are heavily biased by Justin's
vision and misrepresent the options.

*Abstract:* "information passed directly to the software" can mean pretty
much anything. The charter has "user identifiers, and identity assertions."

*1. *Same point as in Abstract around "information".

*1.1* Roles:
Add in roles for operators of AS and RC.
Show trust framework between legal entities (user, RO, client operator, AS
operator)
Differentiate between legal entities having a relationship or HCI and the
actual protocol roles (RC, AS, RS)
What is the difference between roles and parties? Can we avoid the term
parties? RQ is both a party and a role.
Alternative names:
client for RC
user for RQ

*1.2* Elements:
defined access token without using "credential"
Grant as both a noun (what is being requested) and a verb
Grant is already is a noun being used as an adjective in "Grant Negotiation
..." and "Grant Response"
"Subject Information" is better than just "information" -- but is still
extremely broad
The subject information should be about the user, not the RO. For example,
in an enterprise use case where resource access and identity claims are
being requested, the RO is not the user, but could be an administrator. The
"subject information" is going to be about the user of the client, not the
administrator.

*1.3.3* step 7 - what is a refreshed credential? We should refer to the
defined terms.

*2.* title should be Grant Request to match with Grant Response in (3), and
use of "Grant Request" in 2.7, 2.9, 5, 5.4, & 5.5

*2.1.2:* "a RC MAY send a string known to the AS or RS"
why "or"? Explain.

*2.2* "sub_ids"
are sub_ids a good idea, a best practice? despite warnings in the protocol,
developers will use an email identifier as a communication identifier, or
worse, a verified identifier.
GNAP is defining a query language here for subject identifiers.

*2.3 *Identifying a client via URL
Mobile Apps and SPA can identify themselves with an HTTPS url that only
that client can receive redirects to (universal link in iOS, android app
link). The client passes the general identifier for the client (class_id?)
and the AS ensures the redirect URI belongs to that client. A parameter is
passed on the redirect to the client that the client presents to the AS to
prove it is an instance of that client. The AS may then release access and
claims to the client. The AS may also provide an instance identifier for
the client so that instance of the client can uniquely identify itself.

The editor note that instance_id is analogous to the client_id prevents an
instance of the client in the preceding paragraph from uniquely identifying
itself, and the name is misleading.

Additionally, pre-registered identifiers (class_id which should be
equivalent to client_id for confidential clients) and dynamic identifiers
(instance_id) have different operational and infrastructure requirements.
pre-registered identifiers should be read only for the AS vs read / write
for the AS. There may be millions of dynamic identifier for one
pre-registered identifier (mobile app, SPA)

*2.3.1 *Do we need to support symmetric keys? Most OAuth clients support a
secret, not a key.

*2.3.2*
what are the supported public key formats?
What if the client is able to use different proofing mechanisms? How does
it negotiate with the AS?


*2.4.1* identifying the user
this identifier would be useful if it had properties that other opaque
identifiers did not have: being globally unique. A reason developers have
used the email in ID Tokens was that it was a globally unique string in
contrast to the tuple of "iss" and "sub" in the ID Token which was much
more complicated to add and work with in a DB. Otherwise, we are creating
yet another user identifier.

*2.5* interaction capabilities / modes (section 3.3 as well)
While the document has renamed "interaction capabilities" to "interaction
modes", but the client is still declaring capabilities, but in 3.3 there
are conflicting statements

"If the RC has indicated a capability to interact with the RO in its
request (Section 2.5)"

The AS MUST NOT respond with any interaction mode that the RC did not
indicate in its request.

using the same 4 interaction modes in the client request would make it
easier for the client to say which modes it supports, and the AS to respond
with which modes are allowed. It also allows all parameters required for a
mode to be in the mode. For example the URL for a double redirection, vs a
redirection to an information page after a user_code or decoupled redirect.

*2.5* declaring RC capabilities
Editor's note on what this is supposed to do, and why it can't be done by
just adding the properties to the request.

*2.7 *perhaps this could be done by updating  an existing Grant Request.
This seems overly complicated.

*2.8* Perhaps this should be in 2.2 where we are requesting information
about the user?
Given that solving the use cases solved by OIDC is in conflict with the
editor note that OIDF should be doing the integration with GNAP. The
current model is confusing as requests are in one object, and responses are
in a different object. We don't have to combine the userinfo endpoint
request with the id_token request just because that was convenient for
OIDC. The editorial comments make thi seem much messier than it is.

*3.* The URI can be stable, and the access token is potentially
superfluous. As the client is authenticating with the same key in all
subsequent requests, rotation of the URI or access token may be
superfluous. Having an access token for the AS seems that is used while
authenticating vs the typical access token for an RS seems very confusing
to a developer.

Additionally, putting the access token for calls to the AS in the HTTP
Authorization header precludes using the HTTP Authorization header for
client authentication in 8.

*4.4.2 *This functionality looks like a WebHook, and perhaps belongs in the
API between the client and the AS rather than an interaction that involves
the user. Also, this functionality provides no protection to session
fixation. The interaction reference has no value.

*4.4.3 *While it is good to see an editor's note that a unique callback URL
could be used, the statement "but it would not prevent an attacker from
injecting an unrelated interaction reference into this channel." is
misleading. This would only happen if the client did not ensure it is the
same user, as that would be linked to the correct URL. Similarly, the
interaction reference does not provide protection if the client does not
ensure it is the same user.
Using a unique callback URL would be much simpler, and appears to provide
the same protection as the interaction reference and the hashing.

*5. *
Continuing a Grant Request (which in (2) is called an Access Request)
Is "continuing the right word"?
We are either "validating" the request (5.1), polling the request (5.2),
modifying the request (5.3), reading the request (5.4), or cancelling the
request (5.5).

Include editorial discussion of replacing a request, replacing part of a
request, and adding to a request, and if we should have semantics for all 3
mechanisms.

*8*
While some binding mechanisms work the same for the client calling the AS
as the RS, the requirements are different. When the client calls the AS,
the client is authenticating. When the client is calling the RS, the client
is proving it is authorized to access the resource. The RS does not need to
know the identity of the client -- just that it is the client that the AS
gave the access token to.

*8.2 Attached JWS*
Why not a JWT?
This is the ONLY self contained mechanism. All the other ones require all,
or most of the HTTP headers and the body to be kept together.

The editor note

"Alternatively, we could add all these fields to the body of the request,
but then it gets awkward for non-body requests like GET/DELETE."

It is not awkward. A mechanism is described later of having the JWS as an
HTTP header. Something JWS was designed for.

The editor note

"A downside to this method is that it requires the content type to be
something other than application/json, and it doesn't work against an RS
without additional profiling since it takes over the request body - plus we
have to specify different delivery locations for a GET vs. a POST, for
example."

Not being application/json is a feature as the AS can detect the signature
mechanism. Per above, the requirements for the AS and RS are different. The
client can use the same mechanism of signing with an empty body and placing
the JWS in an HTTP header just as it does below for requests with no body.
The RS is proving it was given the access token by the AS, and binding that
to time, URI, and method.


The editor note

"Additionally it is potentially fragile like a detached JWS since a
multi-tier system could parse the payload and pass the parsed payload
downstream with potential transformations. We might want to remove this in
favor of general-purpose HTTP signing, or at least provide guidance on its
use."

is very misleading. The whole point is to pass the JWS between
components so that each can independently verify the request. ALL the other
mechanisms have the fragility described as different components are going
to pass around the JSON -- and even if they pass around the detached
signature information and other headers, a component could transform the
JSON in parsing and stringifying the request.

The straightforward way to use JOSE from a developers point of view would
be:

- use JWT
- include the key in the header
- have "iat", the method, and the URI in the payload
- put the JWT in the HTTP Authorization header for methods without a body

This is how I wrote it in my implementation. It was very straightforward.

Only the last point conflicts with GNAP as now written -- all the other
aspects could be how it is done for JWT.


*Additional feedback*
the document name is redundant - protocol is in it twice
(gnap = Grant Negotiation and Authorization Protocol)-core-protocol
"draft-ietf-gnap-core" would be sufficient

1.2 Elements
Key - "A cryptographic element binding a request to the holder of the key."
It is actually *any* holder of the key.

2.2 Editor's note "you'd need a full identity protocol and not just this"
implies that GNAP is not an identity protocol despite it supporting the
OpenId Connect use cases.

3.5 Do we need this section? The only thing with "handle" in the name is
user_handle. The access token is not really a handle.

ᐧ