Re: [Anima] 2nd WGLC for draft-ietf-anima-constrained-join-proxy-12, ends September 20th 2022

Esko Dijk <esko.dijk@iotconsultancy.nl> Wed, 12 October 2022 07:49 UTC

Return-Path: <esko.dijk@iotconsultancy.nl>
X-Original-To: anima@ietfa.amsl.com
Delivered-To: anima@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 02F1AC1524B5; Wed, 12 Oct 2022 00:49:18 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -7.11
X-Spam-Level:
X-Spam-Status: No, score=-7.11 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, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=iotconsultancy.nl
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 TyYY--vYM5_o; Wed, 12 Oct 2022 00:49:13 -0700 (PDT)
Received: from EUR03-AM7-obe.outbound.protection.outlook.com (mail-am7eur03on2116.outbound.protection.outlook.com [40.107.105.116]) (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 8C244C1522CC; Wed, 12 Oct 2022 00:49:11 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JCXt/khZrv7TlC7aTD93tkSBQ8wBzr6dq5IUShvEsIYOJYGWNLfS2KcagR3mVmRgZuSt3IjZc9aKoiYsB0mhEWGQ8THsh6DNK6q63vQHowE8Wf7zYk8AJx+ab/as9yFH8ZzFOaSLp7cdOzUUlyRu/PK+i+nPo9bu8+DRpiKBC+9s1/ktQVcRCDIyBgrEoHPgQb7JGV/RaRSqh4t4mY8Iv4Af9EDkrHs8Cd0SPwPo+jYV4jnv6DDmPY06+3nLlX8tLaoZlAxh/u4gzT755sBlIBFI7yGfSy0JCFwjOjFVgsoNry08DAd4m/2zw3v6axtK8rI4+J2iZvFA5+xfo8Tkdg==
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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=VeaKRtFe/BA76pylS3Mea+OA4JGT4u71FV+ZEDX7up0=; b=NZQvtHYakwm/VOCXrg3M6V7Q0yvkihcuGcR02sDnj9Nnjn4Sj0zyonlHMbil5P1VBoxer1THefjP80vvd9Ql77T+f4VR8k5VlufGkaonICp/EKIIja4PsoYZpov7cUlFlOF37FmzvTvz4IpgDp4U6O7HjipSU9IUIQ/mPfhuT864QybRRB5aiWpYWkwSNzIXJGp8ErU1x4aNIYQX3iOEOoK6favuqIEm455q2mLyHD0cKpIauarqD9cB37uueE6SRNIaS+L8a58Qb6lg4wrkPg8aSuNu/s+xaZo9dYLBULLXlXuhp0FDgnluo8/9ItnjEQNod8/Yds4U0DOM6Y29yA==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=iotconsultancy.nl; dmarc=pass action=none header.from=iotconsultancy.nl; dkim=pass header.d=iotconsultancy.nl; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iotconsultancy.nl; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=VeaKRtFe/BA76pylS3Mea+OA4JGT4u71FV+ZEDX7up0=; b=ak39osnKqljgHxrcDvI5Np+UtaogPjZ7Vn7HHsOOkvLca3UEui3NCbB2EkjpyCFUD5vF9s086wkkuHtFfmuHPPMmvCIiiPGvUMXGbZ8+AYLpf2sV4YyfoU1/HDEy5ADoZXFjPeKHfNfbU+6NXOe+I9qdplp3p29594Pp/7J07Bc=
Received: from DU0P190MB1978.EURP190.PROD.OUTLOOK.COM (2603:10a6:10:3b9::20) by DB8P190MB0697.EURP190.PROD.OUTLOOK.COM (2603:10a6:10:125::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5709.21; Wed, 12 Oct 2022 07:49:07 +0000
Received: from DU0P190MB1978.EURP190.PROD.OUTLOOK.COM ([fe80::1de:9807:7495:454e]) by DU0P190MB1978.EURP190.PROD.OUTLOOK.COM ([fe80::1de:9807:7495:454e%2]) with mapi id 15.20.5676.034; Wed, 12 Oct 2022 07:49:07 +0000
From: Esko Dijk <esko.dijk@iotconsultancy.nl>
To: Toerless Eckert <tte@cs.fau.de>
CC: Michael Richardson <mcr@sandelman.ca>, Anima WG <anima@ietf.org>, "anima-chairs@ietf.org" <anima-chairs@ietf.org>, stokcons <stokcons@bbhmail.nl>
Thread-Topic: [Anima] 2nd WGLC for draft-ietf-anima-constrained-join-proxy-12, ends September 20th 2022
Thread-Index: AQHYwhP3HO7jwtOswEm8kcCpJFFx1a3ov6uwgAEGqwCAAAIXgIAIbm+AgBhVcfA=
Date: Wed, 12 Oct 2022 07:49:06 +0000
Message-ID: <DU0P190MB1978A4C862C2DE321FD8680EFD229@DU0P190MB1978.EURP190.PROD.OUTLOOK.COM>
References: <Yxd/oBl0dmbmUI8L@faui48e.informatik.uni-erlangen.de> <DU0P190MB1978F420D478B93CE29F36D3FD4C9@DU0P190MB1978.EURP190.PROD.OUTLOOK.COM> <46723.1663756262@dooku> <DU0P190MB1978AC04BBB22272B360984DFD4F9@DU0P190MB1978.EURP190.PROD.OUTLOOK.COM> <YzH8R88OY/kNDLxz@faui48e.informatik.uni-erlangen.de>
In-Reply-To: <YzH8R88OY/kNDLxz@faui48e.informatik.uni-erlangen.de>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=iotconsultancy.nl;
x-ms-publictraffictype: Email
x-ms-traffictypediagnostic: DU0P190MB1978:EE_|DB8P190MB0697:EE_
x-ms-office365-filtering-correlation-id: 3f05066e-72d1-44e7-fa06-08daac263daa
x-ms-exchange-senderadcheck: 1
x-ms-exchange-antispam-relay: 0
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: u6BYuRQdWjnK/am8GZTXadkkrwQN0xsG1/Mx9UBahGXihdy8eLiUIPySKtet1mjl13zhNPlkkbg3Q0LSaIxN28XCPyKrtw22+QOL1eMtyBApsfEdWlD8Wi+65Hsm7CLLctC1daXRV5gMmTiXrUfBZk+yIgj7dHFF32KkbzIkHCflYparU8r5SJb3kjaPAfbwC8Bj6Kun/FCPZX7YNGenVOvfshnEdh+bnghJ7L4Eziqy09t93wmpqw/rjlFEywlI8KChxpuIatrORpJGAdJ/qNLflzRJOF5aIIVG3MQQhVuS4OuF3m5vxrZ0R3NRK/3cvvypeVQ3aXAHctDSYCPnq+fj1S5pj3AF2HDBpghQx4vrXuR8HGN80CqsZ04VmZ7mSLFSq8bjOtxtkUO7AOEa7s+Nc5CLosIcwkSy2OQmPfsWFv1dICw+3zRQeMwECU9+OXjUHa8Y/CRGk+IHYAPhZCAHQOWNtw+2+GYKgDXCUxuXYTSVHKzMvlAimu6PDQLCLlMecVIurplbgapq3M453Jxuur0Q2MlewHVXLKG8nawAmf7NA1Y2GEHHZPIfom+zLXU5aYjil76MU++M14cF9pwbYLo8KKxlaF1XczE/iRqmoK7j8/06OCdjcaesKT6d1sizD5FR/+9jLODAi/XqMp5/6KKg1lqS0YkGV1PoHERbTJ/OW70tf2r1fYvyARhW
x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DU0P190MB1978.EURP190.PROD.OUTLOOK.COM; PTR:; CAT:NONE; SFS:(13230022)(366004)(346002)(376002)(136003)(39830400003)(396003)(451199015)(86362001)(33656002)(2906002)(38070700005)(66476007)(52536014)(44832011)(41300700001)(66946007)(66446008)(4326008)(8676002)(64756008)(5660300002)(66556008)(316002)(76116006)(6916009)(54906003)(8936002)(71200400001)(38100700002)(478600001)(122000001)(6506007)(26005)(83380400001)(53546011)(55016003)(7696005)(9686003)(186003); DIR:OUT; SFP:1102;
x-ms-exchange-antispam-messagedata-chunkcount: 1
x-ms-exchange-antispam-messagedata-0: XS051mGyrCwoz5FlHW2GaWKrMa8QFGs7aq5sI5jYw3fIxrKsEzAYeq2YVAMJCNbGMONZyi8pdshlbDLx1HVXpIjnnghhRm94aIq5AeGQBL59IwF4NxsKKxRrstps7Gae1HxySqugE6gWb9bgrLxosQ/+7EkaCUNKoMC8EiuXscJlFeIPZRbtY09dt1j/tXe4gikv/KIlKExGDd68pbw8yzSHzUqgraXwN//BZv0aX+BDA2XcGtiCBigpI9OO2vSdgV+P988xglFLsoDV5vQMG2JLxJIJbSCUOMv5ISZP3y6G/EqK5OgxArCdKQb+g3vlsTqmxP6clIQ/yEizYXqAvihtlNqdtaKFdBbsy0XCOy/Yx3V/wsdczMN0uBQGXkC3bxcGWWN8GYIjbFj7xDbDoMQOmQVqBLwkztxTEVdYbac=
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: base64
MIME-Version: 1.0
X-OriginatorOrg: iotconsultancy.nl
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-AuthSource: DU0P190MB1978.EURP190.PROD.OUTLOOK.COM
X-MS-Exchange-CrossTenant-Network-Message-Id: 3f05066e-72d1-44e7-fa06-08daac263daa
X-MS-Exchange-CrossTenant-originalarrivaltime: 12 Oct 2022 07:49:06.9227 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 58bbf628-15d2-46bc-820b-863b6774d44b
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: w7FFGhSQYugC8zLgnPx/EXWsy1drXkJsDz3WIZz1p/u5A6T0iNMJG8enliOa2W7fv5USghLRI1tFyWa2Az42kL0UZ0i8+6ZAid2WviiA7Kk=
X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8P190MB0697
Archived-At: <https://mailarchive.ietf.org/arch/msg/anima/MB8FZTLa9X9YbzVqBHFcKaGcVKk>
Subject: Re: [Anima] 2nd WGLC for draft-ietf-anima-constrained-join-proxy-12, ends September 20th 2022
X-BeenThere: anima@ietf.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: Autonomic Networking Integrated Model and Approach <anima.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/anima>, <mailto:anima-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/anima/>
List-Post: <mailto:anima@ietf.org>
List-Help: <mailto:anima-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/anima>, <mailto:anima-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 12 Oct 2022 07:49:18 -0000

Toerless, thanks for your good input.

> Do you think these are useful numbers ?

The limit on number of mapping states for the stateful proxy sounds okay. The ICMP error is useful to signal to a Pledge "try again later, or try another proxy/network". Lack of response will signal the same from the Pledge's point of view.
Rate-limiting seems also needed on the stateful proxy, for example if one given Pledge keeps sending upstream data to the Registrar but the Registrar never sends something back it would be unwise to keep on relaying the upstream traffic without limits.


> Is it possible to come up with good recommendations on such packet rate limiters ? For example
> 1% of the "uplink" bitrate ? Can you think of mesh networks where this would not
> be a good enough number ? If this (or another number)  makes sense we could suggest
> to add it to the stateless proxy section.

For the stateless proxy, it is hard to determine a good rate limit number. 1% is not good because it would slow down the joining process of a genuine Pledge to a crawl. Some strategies that could work better:

1. Initially allow a (near) unlimited use of "uplink" bandwidth, to get a fast enrollment in the common case. When the relayed traffic persists for some time (either by same Pledge or other Pledge, no difference) apply a stricter rate limit.
2. Apply a (rough) 'data budget' for upstream traffic to the Registrar. Only if sufficient "downstream" traffic comes back from the Registrar to Pledge(s), the upstream data is allowed at a high rate. If that's not the case, a strict rate limit is applied.
3. Send the radio frames associated to relayed "upstream" traffic with the lowest priority.  I.e. have a scheduler with packet priority. I know e.g. OpenThread has this to prioritize mesh management-traffic.

A combination of approaches is also possible.
Solution 3 seems easiest to implement, if the mesh network stack already has a working priority-based scheduler. But it will probably need to be combined with some rate-limit approach too.

So one solution is:
Proxy SHOULD locally schedule the "upstream" IP packets to be sent with lowest priority.  And Proxy SHOULD apply a rate limit to "upstream" data volume to be approximately equal to the "downstream" data volume (all that's coming back from the Registrar).

> If the proxy does not discover a registrar, then of course it can not forward enrolment
> requests. We should at least specify that proxies need to correctly support that
> registrar (announcemenets) are switched on/off. What do you think ?

Yes, the key part here is that when a Proxy once discovers a Registrar it cannot assume that this Registrar will be alive on that IP address forever. So it needs to rediscover in case the original discovery information expired. If rediscovery fails, it will not forward traffic anymore to the old IP address.
This aspect may not be obvious so including that in the security considerations sounds good.   (Exact timing out mechanism will depend on the discovery method used. DNS-SD may be also an option for a future extension of the draft. )
In the GRASP case it's announcements being switched on/off.  In the CoAP discovery case, the Max-Age Option in the response determines for how long the result is valid. (Default max-age is 60 secs). The latter may be good to point out explicitly as none of the CoAP RFCs mention this use of Max-Age yet; though it was raised on the core list and is in draft-lenders-dns-over-coap-04.


> Instead of stopping service announcements (registrar and proxy), i would then love to see the service
> announcements witth some "service status" flag/field. For example "off hours" or the like. Workflow:
> Device to be enrolled has single color LED. You connect it (west coast) to the network, and it would
> indicate "off hours" through eg.: repeating three short blinks. This validates that network connectivity
> works, and that enrolment will proceed once someone switches "BRSKI on" (next morning).
>
> Does that make sense ?

That makes sense, and sounds like possible future work! For now we can just rely on discovery and the presence/absence of a service, and its advertised lifetime. All of the current discovery methods support that at least.
For CoAP discovery at least some "service availability parameter" could be defined in general so that it can be used for any types of services/resources advertised.

Regards
Esko

-----Original Message-----
From: Toerless Eckert <tte@cs.fau.de> 
Sent: Monday, September 26, 2022 21:24
To: Esko Dijk <esko.dijk@iotconsultancy.nl>
Cc: Michael Richardson <mcr@sandelman.ca>; Anima WG <anima@ietf.org>; anima-chairs@ietf.org; stokcons <stokcons@bbhmail.nl>
Subject: Re: [Anima] 2nd WGLC for draft-ietf-anima-constrained-join-proxy-12, ends September 20th 2022

Thanks, Esko

inline

On Wed, Sep 21, 2022 at 10:52:47AM +0000, Esko Dijk wrote:
> Thanks,
> 
> One item I forgot to include which was also on my mind - a security consideration. If an autonomous bootstrap method like BRSKI is left "always-on" in a mesh network, it means that at any time an off-mesh attacker can contact its nearby Join Proxies and flood them with traffic. E.g. using different LL addresses to pretend it is multiple Pledges.
> This will cause relayed traffic on the mesh, potentially overloading it.
> 
> * One solution component is clearly rate-limiting of relayed traffic. But, this is not even mentioned in the security considerations. And not in 8995 as far as I can tell.

For the stateful proxy, the pull request from my review i sent last friday suggests the
following text:

   To protect itself and the Registrar against malfunctioning Pledges
   and or denial of service attacks, the join proxy SHOULD limit the
   number of simultaneous mapping states for each IP_p%IF to 2 and the
   number of simultaneous mapping states per interface to 10.  When
   mapping state can not be built, the proxy SHOULD return an ICMP error
   (1), "Destination Port Unreachable" message with code (1),
   "Communication with destination administratively prohibited".

Do you think these are useful numbers ?

The whole idea of the stateless proxy is of course to remove the need for intellegence
from the proxy and only have it on the registrar. The best DoS protection i could
think of on the proxy is therefore just a total packet rate limiter. Is it possible
to come up with good recommendations on such packet rate limiters ? For example
1% of the "uplink" bitrate ? Can you think of mesh networks where this would not
be a good enough number ? If this (or another number)  makes sense we could suggest
to add it to the stateless proxy section.

> * Another solution component is being able (by an admin) to "turn on" and "turn off" the entire option of BRSKI bootstrapping.  This could also be mentioned as a security advice: turn it off when not needed i.e. when the operator knows for sure there are no new Pledges to be bootstrapped.  The method of "turning on/off" could be implementation-specific as we don't define any APIs for control of Join Proxies.  The intended behavior of any Join Proxy is then as follows:
>    1. If BRSKI is "on", respond to discovery requests by Pledges as usual and do relay any (DTLS) records they may send to the join-port.
>    2. If BRSKI is "off" , don't respond to discovery requests by Pledges and don't relay any data sent to the join-port. (Effectively, close it.)

If the proxy does not discover a registrar, then of course it can not forward enrolment
requests. We should at least specify that proxies need to correctly support that
registrar (announcemenets) are switched on/off. What do you think ?

> Some networks may have a "BRSKI always on" policy because it's needed for their application and for convenience, but for a majority of networks I expect that isn't needed.


I can already see a BRSKI scenario in the USA, where the manager of the east-coast NOC went home at
5PM and some IT folks on the west coast still want enroll new equipment in an installation and
wonder what happens.

But if this is what customers want (and i think you say some of them likely will want this), then i would
like to see appropriate disagnostics for the local installer:

Instead of stopping service announcements (registrar and proxy), i would then love to see the service
announcements witth some "service status" flag/field. For example "off hours" or the like. Workflow:
Device to be enrolled has single color LED. You connect it (west coast) to the network, and it would
indicate "off hours" through eg.: repeating three short blinks. This validates that network connectivity
works, and that enrolment will proceed once someone switches "BRSKI on" (next morning).

Does that make sense ?

> Maybe such practical security related solutions are already described in other documents e.g. 6TiSCH joining or GRASP documents but unfortunately I didn't read enough of those documents to know this. If so we can also refer to it as security consideration.
> For a mesh network, avoiding an outsider to be able to "load" the mesh links with random data is especially important.

Indeed. Hopefully the #state and rate limiters proposed above would be sufficient to get past
this point ?

Cheers
    Toerless
> 
> Regards
> Esko
> 
> -----Original Message-----
> From: Michael Richardson <mcr@sandelman.ca> 
> Sent: Wednesday, September 21, 2022 12:31
> To: Esko Dijk <esko.dijk@iotconsultancy.nl>
> Cc: Anima WG <anima@ietf.org>; anima-chairs@ietf.org; stokcons <stokcons@bbhmail.nl>
> Subject: Re: [Anima] 2nd WGLC for draft-ietf-anima-constrained-join-proxy-12, ends September 20th 2022
> 
> Okay, thank you. I'll crunch through your comments on Friday.

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