Re: [Ace] Reviewing ace-aif

Carsten Bormann <cabo@tzi.org> Tue, 11 May 2021 15:11 UTC

Return-Path: <cabo@tzi.org>
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 541C93A1AFA; Tue, 11 May 2021 08:11:55 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.899
X-Spam-Level:
X-Spam-Status: No, score=-1.899 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
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 BWeFgXVp5tx8; Tue, 11 May 2021 08:11:49 -0700 (PDT)
Received: from gabriel-2.zfn.uni-bremen.de (gabriel-2.zfn.uni-bremen.de [134.102.50.19]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 76D843A1AFB; Tue, 11 May 2021 08:11:46 -0700 (PDT)
Received: from [192.168.217.118] (p548dcb12.dip0.t-ipconnect.de [84.141.203.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by gabriel-2.zfn.uni-bremen.de (Postfix) with ESMTPSA id 4FfhGR22B0z315S; Tue, 11 May 2021 17:11:43 +0200 (CEST)
Content-Type: text/plain; charset=utf-8
Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.6\))
From: Carsten Bormann <cabo@tzi.org>
In-Reply-To: <YEn+5bX7AhOmtX/h@hephaistos.amsuess.com>
Date: Tue, 11 May 2021 17:11:42 +0200
Cc: draft-ietf-ace-aif@ietf.org, ace@ietf.org, draft-irtf-t2trg-rest-iot@ietf.org
X-Mao-Original-Outgoing-Id: 642438702.837334-e34c912340023f1425bbbcc7b2484a60
Content-Transfer-Encoding: quoted-printable
Message-Id: <3C6B9011-EDB0-44DD-AD09-4880AE80AEAE@tzi.org>
References: <YEn+5bX7AhOmtX/h@hephaistos.amsuess.com>
To: =?utf-8?Q?Christian_Ams=C3=BCss?= <christian@amsuess.com>
X-Mailer: Apple Mail (2.3608.120.23.2.6)
Archived-At: <https://mailarchive.ietf.org/arch/msg/ace/3X4AtpNWJ5EoIb6LddPU4LH7o8M>
Subject: Re: [Ace] Reviewing ace-aif
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: Tue, 11 May 2021 15:11:56 -0000

Hi Christian,

It seems I haven’t looked at this for a while.
It’s been two months now 🤦‍♂️, so let me try to make some progress:

> On 2021-03-11, at 12:28, Christian M. Amsüss <christian@amsuess.com> wrote:
> 
> Hello Carsten, hello AIF,
> 
> as promised I've had a look at AIF:
> 
> "need to ascertain that other devices they place requests on are the ones they intended"
> ========================================================================================
> 
> This is an important statement which I don't see taken up outside the
> introduction. Especially considering how the requester not only needs to
> be sure it places the requests on the intended target, but also how to
> get from the intention to the operation.
> 
> It's hard to place concretely, given that most of the remaining document
> talks about the REST and it *is* trivial there (once there is clarity of
> the target).

I think this needs to be further elaborated in a more general context, such as https://datatracker.ietf.org/doc/draft-ietf-ace-actors/ (which has been parked for a while — maybe time to pick it up again?).

> Suggested addition for seccons bullets:
> 
> * ensure that both subject and target map Toid/Tperm pairs to the same
>  operations.
> 
> (This links back to the CoRE RD discussion about a client that wants to
> perform a single Toid/Tperm action, but got fed metadata by an untrusted
> party that makes it express that to a differen URI on the same target
> host, causing a different Toid/Tperm that it may also be authorized for
> but did not intend).

Covered that in a half-sentence added to the second bullet (actually, all parties must agree on that meaning).

> "AIF MUST be used in a way that it is unambiguous who is the target"
> ====================================================================
> 
> There might be a case for many alike targets that all receive the same
> configuration (thinking of homogenous sensor cloud where a client gets a
> token to access any device's /s/temp); s/unambiguous/clear/ would open
> it up for that.
> 
> REST model / Uri-Query
> ======================
> 
> The way the path tstr includes the Uri-Query seems to indicate the
> strict resource definition in which /foo is completely distinct from
> /foo?x=y, which I appreciate.
> 
> To a reader coming from different mindsets that could be pointed out
> more pronouncedly, for example by extending (double asterisks marking
> additions):
> 
>  One might be tempted to extend the model towards URI templates
>  [RFC6570]; **this would open things up for local-parts like
>  `/s/temp{?any*}`**. However, that requires some considerations of the
>  ease and unambiguity of matching a given URI against a set of
>  templates in an AIF object.

Slightly edited and added.

> Figures
> =======
> 
> I didn't check the CDDL by running it through a parser, but trust you
> did at some point.

I just did again, and took the opportunity to use the RFC-editor-preferred type value (cddl, not CDDL).

> (Someone with a bit of time at their hands might
> want to add support for this at the datatracker, and then we'd have a
> nice 🌊🐗 logo where YANG based documents have their ☯ ).

We’d need a bit of threading to make this work well…
Stuff for CDDL 2.0!

> REST on "point of enforcement"
> ==============================
> 
> In all the examples the point of enforcement is a full authority. I'm
> currently thinking of a media device roughly described as follows
> 
> </media/>,
> </media/incoming/>,
> </media/animations/>,
> </media/sounds/>,
> </media.public>;cf="application/aif+cbor";applicable-for=unauthenticated-users,
> </media/>;rel=policy-for;</media.policy>
> 
> where whoever is authorized to write to /media.public may decide what
> inside /media/ is public and what is not (but doesn't get to open up
> /config/ to the public).
> 
> I *think* from reading the spec that all is in place for such
> applications to work (where the way of linking AIF documents to the
> subjects is out of scope, as is the relation type and how the relation
> type is used to set the target unambig... aeh, clearly).
> 
> If it is, I'd leave it up to your judgement whether it's worth words or
> not. If it is not, please help me understand why not (maybe it can be
> helped) or what I missed that rules it out.

I do think that an extended example would be useful.  Maybe over in the T2TRG restful design draft?

All changes are in
https://github.com/cabo/ace-aif/commit/8990b05

Grüße, Carsten