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 <[email protected]> 
Sent: Monday, September 26, 2022 21:24
To: Esko Dijk <[email protected]>
Cc: Michael Richardson <[email protected]>; Anima WG <[email protected]>; 
[email protected]; stokcons <[email protected]>
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 <[email protected]> 
> Sent: Wednesday, September 21, 2022 12:31
> To: Esko Dijk <[email protected]>
> Cc: Anima WG <[email protected]>; [email protected]; stokcons 
> <[email protected]>
> 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.

-- 
---
[email protected]
_______________________________________________
Anima mailing list
[email protected]
https://www.ietf.org/mailman/listinfo/anima

Reply via email to