Re: [Anima-signaling] GRASP issue 51: Flooded objectives

Brian E Carpenter <brian.e.carpenter@gmail.com> Tue, 09 August 2016 01:22 UTC

Return-Path: <brian.e.carpenter@gmail.com>
X-Original-To: anima-signaling@ietfa.amsl.com
Delivered-To: anima-signaling@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id D4BEE12D619 for <anima-signaling@ietfa.amsl.com>; Mon, 8 Aug 2016 18:22:53 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.7
X-Spam-Level:
X-Spam-Status: No, score=-2.7 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com
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 JIniTPL01qNx for <anima-signaling@ietfa.amsl.com>; Mon, 8 Aug 2016 18:22:51 -0700 (PDT)
Received: from mail-pa0-x22d.google.com (mail-pa0-x22d.google.com [IPv6:2607:f8b0:400e:c03::22d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id D193812D664 for <anima-signaling@ietf.org>; Mon, 8 Aug 2016 18:22:51 -0700 (PDT)
Received: by mail-pa0-x22d.google.com with SMTP id pp5so118674801pac.3 for <anima-signaling@ietf.org>; Mon, 08 Aug 2016 18:22:51 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:to:references:cc:from:organization:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=24gETwqwA54QoGo6WIoq5Wh76mR8fvrvC/Pds7hu4rc=; b=TPfM6Th1GIV3l+cd2R1K6D+lTo6l7UrxRWhvVsOmTCahpJCGytIzo76LsXyFPAX1lE hlxUMDS7syqgx+zcqJ8+HmYoRc/cMFxappfvcMFoz8mpd3L7A5oK7th8d8IV0nUTRmVB 0VowzCs5fS5C7Hif6QqB18vpSq6IAihoFNiQi5uVlNUXuLn3tEfHjl+HE5/45oB3qZit BnCpTFVhCraNaJKGYNBzSAceNH3TKV+Bfov/YL4dUirngS9YP4LVIm98iykeMJ1OTYa3 C4Zm4NBTQdAu2AeOUF1Y8wxpm/ajhYXFvHKoxtlFmQTPSWUvr4ea6vp5arTYZVPHpYUv MtvQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:cc:from:organization :message-id:date:user-agent:mime-version:in-reply-to :content-transfer-encoding; bh=24gETwqwA54QoGo6WIoq5Wh76mR8fvrvC/Pds7hu4rc=; b=WQ3G8vCxIMv4BuYOdJZmieyBCJe0mqbzizjm5foFs8tfGjpjXOvPFN+arvZHyDQIO6 CXS+VRyShIg3jpDbm14NDrY1nQ++In/oXjX0tyVMNbHqz3TyKOyY7z0/ztf4TRo8akKX iXGGoLMIqL+XseVPcX5MbMXxMetYcgrAk6name18h7mHjjHp0BdOl2XGLXky8pJljGFn VmkY4FTq7wKahTH6dGqGRAy5bRpZNCoV8LZQo6UW2+sxElbhJEuUrqp0BumWBQjOqOra G5DypVSLykDfH/Mc+gpgtC71aplqQ1X3qoEa13WIYtihVOH6LAGPSbM/fcxUlOJieFQi REIw==
X-Gm-Message-State: AEkoouv8qPCswVZ/1A/j1psN+bjlsKU1xUSHuA2+T4Wn9RzkW171Z4vubqHcvEQKZ/fXkA==
X-Received: by 10.66.154.232 with SMTP id vr8mr166717627pab.104.1470705770953; Mon, 08 Aug 2016 18:22:50 -0700 (PDT)
Received: from ?IPv6:2406:e007:7ab6:1:28cc:dc4c:9703:6781? ([2406:e007:7ab6:1:28cc:dc4c:9703:6781]) by smtp.gmail.com with ESMTPSA id h125sm50876108pfg.54.2016.08.08.18.22.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 08 Aug 2016 18:22:49 -0700 (PDT)
To: Toerless Eckert <eckert@cisco.com>
References: <47c158b3-92f4-8a36-1bc1-c5c19afdc6b3@gmail.com> <20160801085529.GT21039@cisco.com> <97815aec-a36f-8dda-6798-eb0c1c5eda17@gmail.com> <20160805083457.GH21039@cisco.com> <f541b926-cde7-db52-a0fa-226761d0c3c8@gmail.com> <20160808140326.GA6295@cisco.com>
From: Brian E Carpenter <brian.e.carpenter@gmail.com>
Organization: University of Auckland
Message-ID: <a09050d0-ce14-d628-13b6-28e73a79d238@gmail.com>
Date: Tue, 9 Aug 2016 13:22:48 +1200
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0
MIME-Version: 1.0
In-Reply-To: <20160808140326.GA6295@cisco.com>
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
Archived-At: <https://mailarchive.ietf.org/arch/msg/anima-signaling/peuZ_nTzgyL9psOWH3dBi6Is0jw>
Cc: Anima signaling DT <anima-signaling@ietf.org>
Subject: Re: [Anima-signaling] GRASP issue 51: Flooded objectives
X-BeenThere: anima-signaling@ietf.org
X-Mailman-Version: 2.1.17
Precedence: list
List-Id: Mailing list for the signaling design team of the ANIMA WG <anima-signaling.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/anima-signaling>, <mailto:anima-signaling-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/anima-signaling/>
List-Post: <mailto:anima-signaling@ietf.org>
List-Help: <mailto:anima-signaling-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/anima-signaling>, <mailto:anima-signaling-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 09 Aug 2016 01:22:54 -0000

Thanks Toerless, this is a very useful discussion in terms of detecting
unspoken assumptions, so I have to continue with more questions:
On 09/08/2016 02:03, Toerless Eckert wrote:
> Inline
> 
> On Sat, Aug 06, 2016 at 02:39:35PM +1200, Brian E Carpenter wrote:
>> Hi Toerless, just drilling down on two points (I have not ignored the rest,
>> but these condition other aspects):
>>
>> On 05/08/2016 20:34, Toerless Eckert wrote:
>>
>> ...
>>>> 1. We specify that the source address is cached with the flooded objective, and that
>>>> multiple copies are kept if there are multiple sources.
>>>
>>> Yes, but "source" really must be the ASA transport address, aka: 
>>>    source = {ACP-ULA-IPv6-address, proto=TCP, ASA-GRASP-TCP-port}
>>
>> Here I have a little problem. Unless you plan to use GRASP messages for
>> the entire process, it isn't GRASP's business what protocol and dynamic
>> port are to be used.
> 
> I do not parse that sentence. Can you rephrase ?

How can the GRASP library and code know what protocol and port the ASA intends
to use for non-GRASP messages? It doesn't create the sockets for that, only
the ASA can do so. So in this case, if the ASA wants to talk over CoAP or HTTPS,
GRASP doesn't know anything about it. (I'm looking at
https://tools.ietf.org/html/draft-ietf-anima-bootstrapping-keyinfra-03#section-3.2)

>> So I think the protocol and the port need to be
>> fields in the flooded objective itself, not derived automatically by
>> GRASP. Does that make sense?
> 
> We need to be able to distinguish in the caches announcements for the same
> objective from two different ASA on the same autonomic node.

Now here's another hidden assumption. The GRASP spec currently says (in the
security considerations):

   - Authorization and Roles

      The GRASP protocol is agnostic about the role of individual ASAs
      and about which objectives a particular ASA is authorized to
      support.  It SHOULD apply obvious precautions such as allowing
      only one ASA in a given node to modify a given objective, but
      otherwise authorization is out of scope.

I have been working on the assumption that only one ASA is allowed to
register itself to manage a given objective in a single GRASP instance.
'Manage' means being a source of synchronization or flooding or being
a negotiation responder. Why? Because otherwise, other nodes will see
inconsistent behaviour by the node in question.

I don't understand an application scenario where it's useful to have two
ASAs managing the same objective in the same node. Why would you allow
two Registrars in the same node, for example?

But in fact, as far as I can see, GRASP discovery could work in such a
case, returning two different discovery responses from the same node, with
different GRASP-managed ports. (I suspect my code would already support that.)
That would allow synchronization or negotiation independently with either of
the ASAs. Hence the SHOULD in the above extract.

However, if we also allow two different ASAs in the same node to flood the
same objective, that does require some extra tagging, as you say below.
So I want to be very clear about it. Why do we want to do that?

Since it would be a protocol change, we would need to present it to the whole WG.

> Therefore the
> "source" needs to have another distinguisher beside the IPv6 address of the
> autonomic node. This is not an issue that the individual ASA can solve becaue
> the cache is kept by GRASP.
> 
> The distinguisher can be any ID, but i proposed to use the ASA's TCP port number
> through which it runs GRASP becaude this ID does already exist and is unique.
> So no new ID-allocation code to write.
> 
> This TCP port number will NOT be used to construct the transport port of any
> service connection!
> 
> Example:
> 
>     Registrar ASA objective announcement:
>         source = { ACP-ULA-IPv6-address, proto=TCP, Registrar-GRASP-TCP-Port }
>         ....
>         Payload:
>         EST-adress: { proto=TCP, port=<Registrar-EST-port> }
> 
> Registrar ASA starts, it gets a TCP port for its GRASP unicast messages
> GRASP puts that <Registrar-GRASP-TCP-Port> into the source of all Objectives from this ASA.
> 
> Then the Registrar ASA opens a TCP server port for the EST protocol. Then it
> announces the objective.
> 
> The Bootstrap-Proxy constructs the transport address of the EST connection
> by combining the TCP port from the payload EST-address with the IPv6 address
> of the source. The TCP port of the source is only used to send/receive GRASP
> messages from/to that ASA - which happens by the GRASP library. 
> 
> And of course, this could be a TCP or UDP port number. I personally think TCP
> is easier even if there is more overhead because i don't need to bother about
> fragmentation (for GRASP).

Fully agree about TCP. I haven't even coded the UDP option ;-)

> 
>> ...
>>>
>>> If the announcer of a flood sync announce dies, how would its cache entries
>>> ever be deleted ? On nodes that have an ASA interested in the objective,
>>> the ASA can look at expiry time and tell GRASP to expire the entries. But
>>> how about nodes without such ASA ?
>>
>> Is it a problem? The useless flooded objective would sit there until the
>> cache overflows and it gets deleted by the LRU algorithm.
> 
> Normally, U) means "used",

Right. It needs to be deleted by a Least Recently Updated algorithm!

> and i think we can not do this:
> Check my algorithm for a bootstrap proxy finding the best registrar. It will retrieve
> from GRASP all those registrar cache entries, so you can't figure out which one
> it "Uses" without additional API. The only thing the currently planned APIs
> would give you is an indication when the client ASA tries to use an objective
> and it's broken. But it will try only what it thinks are the best. Not the others,
> so they won't get good LRU treatment.
> 
> We need to have a fairly high frequency of periodic flood-sync messages anyhow.
> Else a newly rebooted device will not learn them well. Or we need to make
> the protocol more complex by generating additional triggered flood syncs for newly
> booted devices. Aka: one flood sync every 30 seconds . Then it makes a lot of sense
> to also time them out.
> 
>>> Aka: expiry_time looks to me like a logical GRASP header parameter so that
>>> we can GRASP without ASA expire flood sync cache entries.
>>
>> We can do that. It's a choice: extra bytes in every flood message versus
>> no default expiry mechanism, just LRU cache expiry.

The alternative is a fixed lifetime but I don't like that for flooded
objectives, because some of them (e.g. Intent) might have infinite validity.

> 
> I'll vote for extra bytes.

If we're happy that flooding is relatively rare, that seems OK. Of course that's
another protocol change to be discussed with the whole WG.

Rgds
   Brian

> 
> Cheers
>     Toerless
> 
>> I'll review all your points after we clear these ones up.
>>
>> Thanks
>>     Brian
>