Re: [core] [Anima] ANIMA constrained-join proxy revision to use CoAP

Toerless Eckert <tte@cs.fau.de> Tue, 01 November 2022 18:22 UTC

Return-Path: <eckert@i4.informatik.uni-erlangen.de>
X-Original-To: core@ietfa.amsl.com
Delivered-To: core@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id D5DA8C1524B4; Tue, 1 Nov 2022 11:22:52 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.657
X-Spam-Level:
X-Spam-Status: No, score=-1.657 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, URIBL_BLOCKED=0.001, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=no autolearn_force=no
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id O9vzVJSvR3Fz; Tue, 1 Nov 2022 11:22:50 -0700 (PDT)
Received: from faui40.informatik.uni-erlangen.de (faui40.informatik.uni-erlangen.de [IPv6:2001:638:a000:4134::ffff:40]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id E1163C14CE22; Tue, 1 Nov 2022 11:22:49 -0700 (PDT)
Received: from faui48e.informatik.uni-erlangen.de (faui48e.informatik.uni-erlangen.de [IPv6:2001:638:a000:4134::ffff:51]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by faui40.informatik.uni-erlangen.de (Postfix) with ESMTPS id 91E45548517; Tue, 1 Nov 2022 19:22:44 +0100 (CET)
Received: by faui48e.informatik.uni-erlangen.de (Postfix, from userid 10463) id 7A7A14EBED2; Tue, 1 Nov 2022 19:22:44 +0100 (CET)
Date: Tue, 01 Nov 2022 19:22:44 +0100
From: Toerless Eckert <tte@cs.fau.de>
To: Esko Dijk <esko.dijk@iotconsultancy.nl>
Cc: Michael Richardson <mcr@sandelman.ca>, "anima@ietf.org" <anima@ietf.org>, "core@ietf.org" <core@ietf.org>
Message-ID: <Y2Fj9OhySq8gwDMY@faui48e.informatik.uni-erlangen.de>
References: <1069641.1666559668@dyas> <1135706.1666576680@dyas> <DU0P190MB1978CB28B49E74237A238646FD309@DU0P190MB1978.EURP190.PROD.OUTLOOK.COM> <12548.1666795972@dyas> <DU0P190MB197834901144617C0B1D3DC1FD309@DU0P190MB1978.EURP190.PROD.OUTLOOK.COM> <25950.1666805892@dyas> <Y1rGkxZSzSI4TkWb@faui48e.informatik.uni-erlangen.de> <402818.1667226609@dyas> <Y2E5bX5hovIYT2m6@faui48e.informatik.uni-erlangen.de> <DU0P190MB19789BA139FF7805182ADDF2FD369@DU0P190MB1978.EURP190.PROD.OUTLOOK.COM>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: inline
In-Reply-To: <DU0P190MB19789BA139FF7805182ADDF2FD369@DU0P190MB1978.EURP190.PROD.OUTLOOK.COM>
Archived-At: <https://mailarchive.ietf.org/arch/msg/core/e7biZvi4DPjKGrnZluP27T_6o7Q>
Subject: Re: [core] [Anima] ANIMA constrained-join proxy revision to use CoAP
X-BeenThere: core@ietf.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: "Constrained RESTful Environments \(CoRE\) Working Group list" <core.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/core>, <mailto:core-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/core/>
List-Post: <mailto:core@ietf.org>
List-Help: <mailto:core-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/core>, <mailto:core-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 01 Nov 2022 18:22:52 -0000

On Tue, Nov 01, 2022 at 05:14:23PM +0000, Esko Dijk wrote:
> The Pledge here is not using unsecured CoAP towards the Join Proxy - the Join Proxy is using unsecured CoAP towards the "Registrar-Proxy" that is situated on a specific port on the Registrar host.
> So there should be no big security issues for rogue Pledges.

Ah. Right. The pledge is out of the picture wrt to header parameter choice
proxy/registrar. I was confused.

So wrt to security we're unchanged from our pre-coap solution, e.g: needs to
depend on ny underlying security of the mesh network, including e.g.: ACP if
its an ANI thats providing registar/proxy connectivity.

> We could of course explain in the Security Considerations section that the "Registrar-Proxy" needs to (or must) support only one CoAP resource for the Registrar-Proxy functionality and not accept requests to arbitrary other resources. Just to be complete.

Right.

> Suppose that a Pledge would try to send unsecured CoAP to a Join Proxy: 
> * if sent to the Join Proxy port (i.e. the DTLS port), the Join Proxy would just forward this as a data blob as usual and eventually the Registrar will try to parse the CoAP message as "DTLS" and fail.
> * if sent to any other port, the Join Proxy must discard the data since it is not using the proper encryption of the (mesh) network.  The JP only has a port "open to the outside world" to relay DTLS data blobs and other ports are not open.

Yes.

> On the one hand if we decide to use CoAP for a particular function then we may expect implementers need to know CoAP as well and e.g. read RFC 7252. Including thinking about security issues of unsecured-CoAP. The benefit or re-use comes with that responsibility as well as the CoAP protocol is far more rich/complex than what we actually need.

Well, in the case of ACP (RFC8994) i was put by security AD under a good amount of
discus' etc. to detail all the profile detail of TLS, DTLS and IPsec in ACP. And
i for each of the protocol pieces i choose either to specify a manually defined
very lightweight MTI profile to make implementation as lihtweight as possible
or was referring to some pre-existing profile guidance rfc. Which i think are fairly
big set of options. But i choose all of that only for the pieces i thought where
"non-constrained", aka: can have a lot of TLS/... code for all the different
crypto etc.

So, for our CoAP/CoAPs i am quite clueless whether
a) the RFCs (CoAP) we're referring to has a single MTI profile that will
   ensure all possible independent proxy and registrar implementations will interoperate
b) That profile will allow proxies not to have more code than what you would
   like there to be (for CoAP/CoAPs) to be implementable only whatever you think
   the most lightweight proxy is that you're interested in.

This is now a more generic review comment than my misguided URI comment.

If we're fine on this a) and b) thats great.

> But if we fear that implementers not versed in CoAP are going to mess things up, we may want to write some additional guidance. Like how to deal with the various options the client may include.

Don't do unreasonavble stuff for me. If the above a) and b) makes sense and
is solbed by existing text, we're done on this piece i think. 

> The forward/reverse proxy we tried to explain in https://datatracker.ietf.org/doc/html/draft-ietf-core-groupcomm-bis-07#section-3.5  (in the context of CoAP group communication). No pictures there unfortunately.

Ok, will check in detail.

Thanks
    Toerless

> Esko
> 
> -----Original Message-----
> From: Toerless Eckert <tte@cs.fau.de> 
> Sent: Tuesday, November 1, 2022 16:21
> To: Michael Richardson <mcr@sandelman.ca>
> Cc: Esko Dijk <esko.dijk@iotconsultancy.nl>; anima@ietf.org; core@ietf.org
> Subject: Re: [Anima] [core] ANIMA constrained-join proxy revision to use CoAP
> 
> Our proxy is an application using CoAP. In that respect it is IMHO not a bad
> idea to be explicit in what options are and what options are not to be included
> in the CoAP headers, and not expect that implementers should/could figure this
> all out by themselves. Especially, when there are options whose inclusion and
> reaction to could create a security risk.
> 
> I guess i do not understand CoAP well enough, but the wy it sounds to me,
> unclusion of the Uri option would be a security risk, because it would
> allow the Pledge to indicate to the constrained proxy which registrar/proxy to
> connect to, right ? Which a pledge shuoldn't be able to know anyhow, but if it
> was including it, it could make the proxy select a registrar proxy that it 
> shouldn't use.
> 
> If we do not document this, how would an implementer be supposed to come to
> the conclusion of what E.g.: Esko wrote in his reply, e.g.: that an error
> would be raised (which seems what we should do).
> 
> Whats even all this terminology - forward/reverse proxy... Is there a simple
> picture anyhwere in any of the RFC references explaining this ?
> 
> Thanks!
>     Toerless
> 
> On Mon, Oct 31, 2022 at 03:30:09PM +0100, Michael Richardson wrote:
> > Toerless Eckert <tte@cs.fau.de> wrote:
> >     > Can we make sure that the text does explain why the field is not
> >     > inclueded, and explain that the packet MUST be rejected if it was
> >     > included ?
> > 
> > Why should we reject if it is included?
> > 
> >     > Seems like:
> > 
> >     > Field is not included and would cause rejection of the packet if it was
> >     > present, because it is inappropriate for the initiator to choose the
> >     > next hop after the proxy not only because the Pledge would not know it,
> >     > but because it is also not appropriate for security purposes for the
> >     > Pledge to choose it.
> > 
> >     > Do i correctly understand this ?
> > 
> > I don't think it's about the initiator choosing the next proxy.
> 
> -- 
> ---
> tte@cs.fau.de
> _______________________________________________
> Anima mailing list
> Anima@ietf.org
> https://www.ietf.org/mailman/listinfo/anima

-- 
---
tte@cs.fau.de