Re: [Ace] Reviewing ace-aif

Carsten Bormann <> Tue, 11 May 2021 15:11 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id 541C93A1AFA; Tue, 11 May 2021 08:11:55 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -1.899
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 ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id BWeFgXVp5tx8; Tue, 11 May 2021 08:11:49 -0700 (PDT)
Received: from ( []) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by (Postfix) with ESMTPS id 76D843A1AFB; Tue, 11 May 2021 08:11:46 -0700 (PDT)
Received: from [] ( []) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by (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.\))
From: Carsten Bormann <>
In-Reply-To: <YEn+5bX7AhOmtX/>
Date: Tue, 11 May 2021 17:11:42 +0200
X-Mao-Original-Outgoing-Id: 642438702.837334-e34c912340023f1425bbbcc7b2484a60
Content-Transfer-Encoding: quoted-printable
Message-Id: <>
References: <YEn+5bX7AhOmtX/>
To: =?utf-8?Q?Christian_Ams=C3=BCss?= <>
X-Mailer: Apple Mail (2.3608.
Archived-At: <>
Subject: Re: [Ace] Reviewing ace-aif
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Authentication and Authorization for Constrained Environments \(ace\)" <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-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 <> 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 (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

Grüße, Carsten