Re: [Ace] AD review of draft-ietf-ace-oauth-params-05

Ludwig Seitz <ludwig.seitz@ri.se> Sun, 17 November 2019 03:45 UTC

Return-Path: <ludwig.seitz@ri.se>
X-Original-To: ace@ietfa.amsl.com
Delivered-To: ace@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 93074120837; Sat, 16 Nov 2019 19:45:30 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.9
X-Spam-Level:
X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=risecloud.onmicrosoft.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 RCcI_XgjxLlh; Sat, 16 Nov 2019 19:45:27 -0800 (PST)
Received: from EUR03-AM5-obe.outbound.protection.outlook.com (mail-eopbgr30045.outbound.protection.outlook.com [40.107.3.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id ECECE120046; Sat, 16 Nov 2019 19:45:26 -0800 (PST)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nSnlnFfRMoHv/MY6wmKCyrW9om1MtPskTrVU4i5UDGCrOodAjseHD+2TSuOfXXmhwPgGsN3kERG8D3Xi2jvz7W8E1ond5HstIiQw0iqmKNwfz2KeDQOenIQVaFEreDyCgcPATPImqz4TGeArWHR3tPaakNc9VGQXQzObuJnHLYydIjf/7k6FUGx29fQ4noRjZHdcIyxLn8+4N0+YpPd/7cXyCOUetO0O3sgr2bZ//P75NLpKUgeZyxNn1K/n14q6sSf2WdWbpv/gpGqUddFxcCSjSk8BU6NXC8Xchoj87zPQgsWYlWejQkgYoJrHODWHPL1vS3E2WTcLH3M6Pcz1GA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=NdM6zW2jwRq9rqwIZPYDGe5Jbw7kBaaPn9Xyn87iRT4=; b=g7VBMUyME7lclKmnpbSNX0NjZH2uNgwa462gOCfjx8XKun2xRQgNs/v/lyzgdQ3ml/dDEvcsCbK1zAsjoVgU5G8+NkJK+J4y18pT8spMMr+lmzn8qSnOtD5idRbZgHRrLJizYPQoQ+K1m+/PNMswgfjh8GXT30B0kdWrNw9AxCkGLm3r08TlD3koou+t0KH4+lJXPRhWcE84jHW0OFc9rx6mlt0hmKrCnF37mT6c+wm11ZVzmoegfbXJ+CAGgk/U4gqXjcovrA5R2nvTkbc5gjul8EzwZB5LoSaDpvOn34eLoFin8Cs808iRu1vB1hYMpjFLhGc0sBOhxIZaYmw/JA==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 194.218.146.197) smtp.rcpttodomain=ietf.org smtp.mailfrom=ri.se; dmarc=pass (p=none sp=none pct=100) action=none header.from=ri.se; dkim=none (message not signed); arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=RISEcloud.onmicrosoft.com; s=selector1-RISEcloud-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=NdM6zW2jwRq9rqwIZPYDGe5Jbw7kBaaPn9Xyn87iRT4=; b=nPxTeSLCe0fEjZDj8Id1/dDLNRUuMuj1d0i1kXBCLlTa+7p0PCTxTdvvzz33XfDKaMKu77L+b6WE9mRERqSTUTSUGAtGsymBkfW9FsuobLkF9n8ruP+mPsR3fa9wXoCi8YtPXIoQDWj+V/rGm0NED7lp1grZ+eTgc4bd4r40Qtc=
Received: from AM5P189CA0016.EURP189.PROD.OUTLOOK.COM (2603:10a6:206:15::29) by DB6P18901MB0055.EURP189.PROD.OUTLOOK.COM (2603:10a6:4:22::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2451.27; Sun, 17 Nov 2019 03:45:23 +0000
Received: from VE1EUR02FT056.eop-EUR02.prod.protection.outlook.com (2a01:111:f400:7e06::207) by AM5P189CA0016.outlook.office365.com (2603:10a6:206:15::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2451.23 via Frontend Transport; Sun, 17 Nov 2019 03:45:23 +0000
Authentication-Results: spf=pass (sender IP is 194.218.146.197) smtp.mailfrom=ri.se; ietf.org; dkim=none (message not signed) header.d=none;ietf.org; dmarc=pass action=none header.from=ri.se;
Received-SPF: Pass (protection.outlook.com: domain of ri.se designates 194.218.146.197 as permitted sender) receiver=protection.outlook.com; client-ip=194.218.146.197; helo=mail.ri.se;
Received: from mail.ri.se (194.218.146.197) by VE1EUR02FT056.mail.protection.outlook.com (10.152.13.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.2451.23 via Frontend Transport; Sun, 17 Nov 2019 03:45:22 +0000
Received: from [31.133.132.127] (10.116.0.226) by sp-mail-2.sp.se (10.100.0.162) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1779.2; Sun, 17 Nov 2019 04:45:18 +0100
To: Benjamin Kaduk <kaduk@mit.edu>, draft-ietf-ace-oauth-params.all@ietf.org
References: <20191115121419.GG32847@kduck.mit.edu>
From: Ludwig Seitz <ludwig.seitz@ri.se>
CC: "ace@ietf.org" <ace@ietf.org>
Message-ID: <5bfa41c5-7339-5443-9691-92c6fa879fe4@ri.se>
Date: Sun, 17 Nov 2019 04:45:04 +0100
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0
MIME-Version: 1.0
In-Reply-To: <20191115121419.GG32847@kduck.mit.edu>
Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg="sha-256"; boundary="------------ms010404080908090106080906"
X-Originating-IP: [10.116.0.226]
X-ClientProxiedBy: sp-mail-2.sp.se (10.100.0.162) To sp-mail-2.sp.se (10.100.0.162)
X-EOPAttributedMessage: 0
X-Forefront-Antispam-Report: CIP:194.218.146.197; IPV:NLI; CTRY:SE; EFV:NLI; SFV:NSPM; SFS:(10009020)(4636009)(346002)(39850400004)(396003)(136003)(376002)(72854002)(199004)(189003)(53754006)(6666004)(386003)(44832011)(86362001)(31686004)(81156014)(8676002)(31696002)(8936002)(6306002)(966005)(568964002)(6246003)(3846002)(229853002)(446003)(2171002)(336012)(6116002)(478600001)(5024004)(14444005)(11346002)(110136005)(186003)(305945005)(70206006)(71190400001)(16526019)(956004)(22756006)(40036005)(2906002)(486006)(36756003)(5660300002)(81166006)(356004)(22746008)(235185007)(4326008)(6706004)(33964004)(65956001)(65806001)(76176011)(26005)(30864003)(16586007)(16576012)(126002)(316002)(53546011)(70586007)(58126008)(2616005)(476003)(7736002)(106002); DIR:OUT; SFP:1101; SCL:1; SRVR:DB6P18901MB0055; H:mail.ri.se; FPR:; SPF:Pass; LANG:en; PTR:InfoDomainNonexistent; A:1; MX:1;
X-MS-PublicTrafficType: Email
X-MS-Office365-Filtering-Correlation-Id: 8e0b0cc0-abc0-49cd-d2d8-08d76b109324
X-MS-TrafficTypeDiagnostic: DB6P18901MB0055:
X-MS-Exchange-PUrlCount: 1
X-Microsoft-Antispam-PRVS: <DB6P18901MB0055C7117D9BF757194D0B0B82720@DB6P18901MB0055.EURP189.PROD.OUTLOOK.COM>
X-MS-Oob-TLC-OOBClassifiers: OLM:7691;
X-Forefront-PRVS: 02243C58C6
X-MS-Exchange-SenderADCheck: 1
X-Microsoft-Antispam: BCL:0;
X-Microsoft-Antispam-Message-Info: afKB7M3gJ6+BHhlagN6ZLhQkvfRZBh7qEXzuZt6r7gRyNq0cLHUX0FJ3ySsGMUhamkdzjvmM45IpzmAO/nisBiL3uYvn9i73CidnhbhNCtVMiVOeCFC3t+REYy3Lv5urj8+ap5+zayDceY4mpBaMXoeYSV3wjrqQ9mU3pha+Rwtc35WkN7NqIq3Evk2fW6+2KEeMaeaqQRr8BkBu9vq5TRD4T1PimeucuPxoQcjRrPdxaAiKNIyrS8xKgVt2ysQChFp5VrTk5Fw0RlgC/+ccVrXWWfM1DTlWEo+zJ6NF27L84OEQynlMql3uUikMaB4dNT0Txet2lW5wFNOYGeJrI1zH2znhj6MxyWya3bXNyiiVHVUmWNnTFoGXnp62Mlms+iqrRTOm0n52/EruqvulsYLdNKHZLVk3MqQceVseXITqKjm0n2QUQFWqujedh/hi/QOyATtYH+l7VWMJIe3cHMZPbNaIkljzt7Mb3GnuKCM=
X-OriginatorOrg: ri.se
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Nov 2019 03:45:22.7826 (UTC)
X-MS-Exchange-CrossTenant-Network-Message-Id: 8e0b0cc0-abc0-49cd-d2d8-08d76b109324
X-MS-Exchange-CrossTenant-Id: 5a9809cf-0bcb-413a-838a-09ecc40cc9e8
X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5a9809cf-0bcb-413a-838a-09ecc40cc9e8; Ip=[194.218.146.197]; Helo=[mail.ri.se]
X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem
X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6P18901MB0055
Archived-At: <https://mailarchive.ietf.org/arch/msg/ace/38rz-ID8DeJHEdhxKpmHxY55dKA>
Subject: Re: [Ace] AD review of draft-ietf-ace-oauth-params-05
X-BeenThere: ace@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Authentication and Authorization for Constrained Environments \(ace\)" <ace.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/ace>, <mailto:ace-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/ace/>
List-Post: <mailto:ace@ietf.org>
List-Help: <mailto:ace-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/ace>, <mailto:ace-request@ietf.org?subject=subscribe>
X-List-Received-Date: Sun, 17 Nov 2019 03:45:31 -0000

On 15/11/2019 13:14, Benjamin Kaduk wrote:
> Hi all,
> 
> I'm mostly just nitpicking in the following comments; the actual content
> here is in good shape.  (But some of these are popular things that
> directorate reviewers like to complain about, so fixing them preemptively
> seems wise.)
> 
> Section 1
> 
>     access tokens.  These parameters and claims can also be used in other
>     contexts, and may need to be updated to align them with ongoing OAuth
>     work.  Therefore they have been split out into this document, which
>     can be used and updated independently of [I-D.ietf-ace-oauth-authz].
> 
> I expect that we'll get some reviewers who want to wordsmith this last
> sentence.  It's fine to wait and see what suggestions come in (if any),
> but if you want to try to forestall those, my suggestion would be:
> 
> % Therefore, these parameters and claims have been put into a dedicated
> % document, to facilitate their use and any potential updates in a manner
> % independent of [I-D.ace-oauth-authz].
> 
Done.

> Section 3.1
> 
>     req_cnf
>        OPTIONAL.  This field contains information about the key the
>        client would like to bind to the access token for proof-of-
>        possession.  It is RECOMMENDED that an AS reject a request
>        containing a symmetric key value in the 'req_cnf' field, since the
>        AS is expected to be able to generate better symmetric keys than a
>        potentially constrained client.  The AS MUST verify that the
> 
> nit: I'd wordsmith this a bit, since the idea is that the AS-generated
> key will be better than one generated by a constrained client, but a
> non-constrained client can probably do just fine at keygen.  So,
> I'd consider dropping "potentially", as the rest of the sentence does
> not have anything to imply that all clients using this claim are
> constrained.
> 
Done.

>     Payload:
>     {
>        "req_cnf" : {
>           "COSE_Key" : {
>              "kty" : "EC",
>              "kid" : h'11',
>              "crv" : "P-256",
>              "x" : b64'usWxHK2PmfnHKwXPS54m0kTcGJ90UiglWiGahtagnv8',
>              "y" : b64'IBOL+C3BttVivg+lSreASjpkttcsz+1rb7btKLv8EX4'
>           }
>        }
>      }
> 
>     Figure 1: Example request for an access token bound to an asymmetric
>                                     key.
> 
> Shouldn't an access token request have an authorization code?
> The other parameters from Section 4.1.3 of RFC 6749 have conditions
> attached to their REQUIRED status, but not "code".
>
In draft-ietf-ace-oauth-authz section 5.6.1. (Client-to-AS Request) we 
specify that when the "grant_type" parameter is missing, then 
"client_credentials" is implied, which in turn means that the client 
does not need an authorization code.  Section 4.1.3 of RFC 6749 is about 
the authorization code grant, you are looking at the ACE-ified version 
of Section 4.4

> Section 3.2
> 
>     cnf
>        REQUIRED if the token type is "pop" and a symmetric key is used.
> 
> Just to check, this means that if the client includes a symmetric 'cnf'
> key and the AS ignores the prior recommendation to ignore such a
> symmetric confirmation key in the request, the AS still has to echo
> back the symmetric key that is in use?  (There's also potentially some
> interesting interactions if we use a 'kid'.)

Indeed as the drafts are written right now, that would be the expected
AS behaviour. This is not entirely intentional, and my only objection to 
changing it at this time is that writing specification text handling 
interactions we are recommending against (i.e. accepting 
client-suggested symmetric keys) seems icky.
As for 'kid' I'd just expect the AS to echo back the kid, not the actual 
key.

> 
>        MAY be present for asymmetric proof-of-possession keys.  This
>        field contains the proof-of-possession key that the AS selected
>        for the token.  Values of this parameter follow the syntax of the
> 
> And to check here again, the omitted 'cnf' in the response means that he
> AS accepted the client's requested asymmetric key?  (There wouldn't be a
> case where the AS rejects an offered asymmetric key and replaces it with
> a new one, right?)
Indeed that is correct. Note that there could be cases where an AS 
rejects an offered asymmetric key and replaces it by another one. This 
would be if the AS knows that the RS doesn't support this key format,
and also knows that the client holds another public key which is 
actually supported by the RS.

> 
>     rs_cnf
>        OPTIONAL if the token type is "pop" and asymmetric keys are used.
>        MUST NOT be present otherwise.  This field contains information
>        about the public key used by the RS to authenticate.  If this
>        parameter is absent, either the RS does not use a public key or
>        the AS assumes that the client already knows the public key of the
>        RS.  Values of this parameter follow the syntax of the "cnf" claim
> 
> I'd prefer to not word this as "the AS assumes", as that implies that we
> will end up with a fragile overall system.  Can we say something more
> along the lines of "when the AS knows that the RS can authenticate
> itself to the client without additional information"?  (I expect that
> less awkward wordings than the above are possible...)
>
Done.


>        from section 3.1 of [I-D.ietf-ace-cwt-proof-of-possession].  See
>        Section 5 for details on the use of this parameter.
> 
> Also (both here and above), I'd suggest s/details on the use of this
> parameter/additional discussion of the usage of this parameter/; we do not
> go into a huge amount of detail in Section 5.
Done.

> 
> I don't think the caption for Figure 3 is quite right...
Fixed.

> 
> Also, Figures 2 and 3 are using the same "SlAV32hkKG ..." access token
> snippet that we changed in the core spec, so we should probably change
> it here as well.
I changed the one in figure 3 to the same snippet I used which an 
asymmetric pop key in the core spec. The snippet in figure 2 is still in 
the core spec, so I left it here as well.

> 
> Section 3.3
> 
> In the symmetric-key case this basically degenerates to
> Needham-Schroeder (but I also don't expect anyone to use this with
> symmetric keys).
> However, for asymmetric keys, we might assume that the AS is not
> creating a new asymmetric keypair for the RS to use, and instead
> referring to one already known to the RS, e.g., just via the public
> part.  I can't quite decide whether the RS should always blindly trust
> the AS in this regard, or might want to have an additional policy layer
> that would allow for "I do not want to use this public key with this
> specific client".  Any such benefit from that would be subtle, as
> presumably the AS has already told the client the same key, and so the
> RS is limited to merely not presenting cryptographic evidence to the
> client that it holds the private key (as opposed to the client trusting
> the AS as trusted-third-party that the RS has that key).
> I guess that suggests that there's no need for additional policy on the
> RS, and we don't need any more text here.
> 
Actually I had asymmetric keys in mind when I created this claim.
Since one could imagine protocols using different symmetric keys for 
client and RS though, so I wouldn't want to restrict this to
asymmetric-only.
Also: yes, the idea was that the AS just uses the public part of an 
asymmetric key, of which it knows that the RS has the corresponding 
private part.
Do you want me to make this more explicit?

> Section 5
> 
>     o  "req_cnf" in the access token request C -> AS, OPTIONAL to
>        indicate the client's raw public key, or the key-identifier of a
>        previously established key between C and RS that the client wishes
>        to use for proof-of-possession of the access token.
> 
> There's potentially an interesting question here about whether the AS
> has to, can, or shouldn't assign semantics to key identifiers.  The part
> most needed for interoperability is, of course, that the RS knows to map
> an incoming kid to an actual key, and the parallel that the client knows
> that the (kid, key, RS) tuple is usable.  I don't see a reason why the
> AS needs to have semantics to a given kid for interoperability, though
> perhaps there will be some scenarios where the AS manages the kid
> namespace at a given RS as opposed to the RS doing so.  But, on the
> other hand, having the AS not give semantics to 'kid' turns the AS into
> a dumb transport, which tends to be the sort of thing that merits
> additional analysis.

Basically the current expectation is that when the client requests a kid 
to be bound to an access token, it "knows what it is doing" i.e. either 
it has already sent a token using this pop key to the RS previously; or 
the client and the RS have been commissioned to have this shared key 
bound to the kid.
Do you want me to make this more explicit?

> 
>     o  "cnf" in the token response AS -> C, OPTIONAL if using an
>        asymmetric key or a key that the client requested via a key
>        identifier in the request.  REQUIRED if the client didn't specify
>        a "req_cnf" and symmetric keys are used.  Used to indicate the
> 
> This seems to make no statement (REQUIRED/OPTIONAL) about this claim for
> the case where the client didn't specify a "req_cnf" and asymmetric keys
> are used.  This situation, of course, can't happen (at least not
> currently), as the absence of "req_cnf" is used as a signal for server
> (symmetric) keygen, but I suggest that we only mention "client didn't
> specify a 'req_cnf'" so we don't have to keep explaining this to
> reviewers.

So should I remove the "and symmetric keys are used." part?


> 
>     o  "rs_cnf" in the token response AS -> C, OPTIONAL to indicate the
>        public key of the RS, if it uses one to authenticate to the
>        client.
> 
> nit(?): I'd consider adding a phrase about "and the binding between key
> and RS identiyt is not established through other means".
Done.

> 
>     o  "rs_cnf" in the introspection response AS -> RS, OPTIONAL,
>        contains the public key that the RS should use for authenticating
>        to the client (e.g. if the RS has several different public keys).
> 
> nit(?): I'd consider adding a phrase about "and there may be ambiguity
> as to which key to use" or similar, though I'm failing to come up with a
> non-awkward phrasing.
> 
Done. I'll go with slightly awkward, but more correct.


>     Note that the COSE_Key structure in a confirmation claim or parameter
>     may contain an "alg" or "key_ops" parameter.  If such parameters are
>     present, a client MUST NOT use a key that is not compatible with the
>     profile or proof-of-possession algorithm according to those
> 
> nit(?): s/not compatible/incompatible/ would avoid a "double 'not'", if
> that's seen as desirable.
Fixed.

> 
> Section 6
> 
> I thought we had set up separate map key namespaces for (e.g.) token
> requests, token responses, and introspection responses, so that
> attempting to use the same key value for all the uses of these
> parameters defined by this document is something of a type error.
> E.g., they end up in different registries, as we do in Section 9.2, 9.5,
> and 9.6.
> 
That is correct. I have added separate entries and a column
specifying the different uses. I will leave the values to be the same 
though.

> Section 9.1, 9.2, 9.4
> 
> I note that the distance between "authenticate to the client" and
> "authenticate the client" is small enough that I expect it to be a
> common misreading, and also that the other descriptions at
> https://www.iana.org/assignments/jwt/jwt.xhtml#claims are a bit more
> pithy than what we use here.  Perhaps, "public key used by RS to
> authenticate itself to client"?
> 
Done.

> Section 9.5
> 
>     This section registers the following parameter mappings in the "Token
>     Endpoint CBOR Mappings" registry established in section 8.9. of
>     [I-D.ietf-ace-oauth-authz].
> 
> It looks like this has been renamed to the "OAuth Parameters CBOR
> Mappings" registry?
Correct. Fixed.

> 
> Section 9.6
> 
>     This section registers the following parameter mappings in the
>     "Introspection Endpoint CBOR Mappings" registry established in
>     section 8.11. of [I-D.ietf-ace-oauth-authz].
> 
> Similarly, this has been renamed to "OAuth Token Introspection Response
> CBOR Mappings".
> 
Fixed.

> Section 11.1
> 
> It's not entirely clear that RFC 7252 needs to be a normative reference;
> we don't do much with CoAP directly in this document.
> 
Agree. I moved it.

> Appendix A
> 
> We might want to wordsmith this some if it's to be kept for the final
> RFC (depending on what the OAuth work looks like at that point).  I'm
> not sure that there are any useful changes to make to it right now,
> though.

It seems the OAuth draft I'm talking about here is not going anywhere 
fast. We might consider removing this in the final edition.

/Ludwig

-- 
Ludwig Seitz, PhD
Security Lab, RISE
Phone +46(0)70-349 92 51