Re: [Anima] comments on draft-ietf-anima-grasp-api

Brian E Carpenter <brian.e.carpenter@gmail.com> Fri, 09 August 2019 23:23 UTC

Return-Path: <brian.e.carpenter@gmail.com>
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 A09D1120059; Fri, 9 Aug 2019 16:23:27 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.999
X-Spam-Level:
X-Spam-Status: No, score=-1.999 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_NONE=-0.0001, SPF_HELO_NONE=0.001, 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 5tbkDOCYW8M3; Fri, 9 Aug 2019 16:23:25 -0700 (PDT)
Received: from mail-pg1-x52d.google.com (mail-pg1-x52d.google.com [IPv6:2607:f8b0:4864:20::52d]) (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 5B63E120048; Fri, 9 Aug 2019 16:23:25 -0700 (PDT)
Received: by mail-pg1-x52d.google.com with SMTP id l21so46562894pgm.3; Fri, 09 Aug 2019 16:23:25 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=mRvP4fxDkqwc47GeG2Gj1s7lTKTDoIvCIvMoDBv7gqc=; b=aNhdvlr766Sxw6m8rFFhuMNcr7DazVs//mCbxUiYPr1YV+l0dCfKKfJXDUgg2MMYOy JSsAy8vzgS4pu9RhiRyijGLiyEmy5xHKYSJcX3PPmYOILCmzuS1yJ0EtptCPtVB0B5ie qRkUNkwNKm0QZkVplaNEGhqrNV/SzzSSm319QFQf0jjsa425/P0gSOKzBWBVwqhjA0qh swyxfzXQ9nccuRITmrA/Jqp31QVp5g4hNtotm4IWb1Yosz+yEAPLSC9a4B7ciRz7qGQ6 hEa1X2L5wuBRFbognjPJgOn4jugPtds2ViyN/Ov7OanPF5l9EOiuhCkQYGJ6EkUmo7S1 O/PQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=mRvP4fxDkqwc47GeG2Gj1s7lTKTDoIvCIvMoDBv7gqc=; b=bG721vH+LS0Qb+dFQAOKGVwmKiPqm+8kmRK0FZq5157trlWVOZ/2Yi5vb2a102kPVe RQuwkRO956jOZ395+LS8y1Bdyh6RUK9+e8FUA+OFNVGi1d5WmT1yM4OtN3V7GrWteKV2 13SSIjAQJXVjxPiW+juK8s51KqszgGKloE2rqj+LQeIS23KYm0gRKT85wuJ6AZr87CgK j2CKu8RUul8yLh3oo9EPnqOaTsTFFKMG4Z8hExrwkntgHQCnjaSiQ/3WHYSogahbAzrf 3W4rC/YTQLKuA1Efs4uyNTF+UA6hg4vDqKYHYVHCf8cSMAOl8eGulQeuGSl1Ywr0MZts c3CA==
X-Gm-Message-State: APjAAAWKldBUTL59xI0sDw22UShypNVwVC3wYJikp5xu6rjpPcyDCnYg H4mjGpbB6UV5mTRRaAaBarpbZFz8
X-Google-Smtp-Source: APXvYqyhfS6lDuutU4Zl74SGq6bKrVR9e9aLM5HVb3hYQiKRzYMsXUyOgrzTd23P4yqLXBGpxLnWEA==
X-Received: by 2002:a05:6a00:5d:: with SMTP id i29mr1216738pfk.57.1565393004408; Fri, 09 Aug 2019 16:23:24 -0700 (PDT)
Received: from [192.168.178.30] ([118.148.73.254]) by smtp.gmail.com with ESMTPSA id 10sm4433257pfv.63.2019.08.09.16.23.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 09 Aug 2019 16:23:23 -0700 (PDT)
To: Toerless Eckert <tte@cs.fau.de>, draft-ietf-anima-grasp-api@ietf.org
Cc: "anima@ietf.org" <anima@ietf.org>
References: <20190809194328.6232pr2w2giuq2ur@faui48f.informatik.uni-erlangen.de>
From: Brian E Carpenter <brian.e.carpenter@gmail.com>
Message-ID: <d9c07756-1c54-1a00-b56c-aec567761b91@gmail.com>
Date: Sat, 10 Aug 2019 11:23:20 +1200
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0
MIME-Version: 1.0
In-Reply-To: <20190809194328.6232pr2w2giuq2ur@faui48f.informatik.uni-erlangen.de>
Content-Type: text/plain; charset="utf-8"
Content-Language: en-US
Content-Transfer-Encoding: quoted-printable
Archived-At: <https://mailarchive.ietf.org/arch/msg/anima/fQ0YgJaIT6-bA0gw67Z1JqbHPI8>
Subject: Re: [Anima] comments on draft-ietf-anima-grasp-api
X-BeenThere: anima@ietf.org
X-Mailman-Version: 2.1.29
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: Fri, 09 Aug 2019 23:23:28 -0000

Hi Toerless,

Jus to focus on what to me is a key point:

> More interestingly, i would be a great fan of talking about the
> API between library and core, to justify why we want to think about
> this modularity.

If there was only one operating system in the world, I guess we could
describe this. The challenge I see is that the way to solve this may
be drastically different in different o/s environments, depending on
what sort of IPC is available between contexts. So apart from saying
that an implementation needs to do this, I'm not sure how much we can say.

I did try to build an IPC interface into my Python implementation,
but the only way I could see that produced portable code was to
use a standard socket as the IPC mechanism. That works, but it's
pretty clumsy and seems very inefficient for production use.

However, it did show me that you are correct. There are some GRASP
functions that really need to be in a daemon** because they run on
their own even if there's no ASA in the node, and others that need
to be callable from multiple ASAs. The API as currently defined
only concerns those callable functions. You're actually asking for
the scope of the API draft to be expanded.

2nd level however: The daemon and the callable functions need to share
some common stateful data structures, which I suppose are somewhat
implementation-dependent, but the ones I found necessary are:

_asa_registry – where ASAs are registered
_obj_registry – where objectives are registered
_discovery_cache – where locators for discovered objectives are cached
_session_id_cache – where GRASP sesssion ids and ASA nonces are cached.
_flood_cache – where flooded objectives and their values are cached.

** In fact I needed to provide a way to activate such a daemon, because
Michael and Bill discovered that they needed to do so by hand during
the hackathon last month. It's called gremlin.py and contains 4 lines
of code.

Thanks
   Brian

P.S. We'll wait for Guangpeng's promised review before we revise the
draft.

On 10-Aug-19 07:43, Toerless Eckert wrote:
> 
> Hi Brian, *
> 
> I have right now primarily a high level comment:
> 
> The problem i have with the three layers of GRASP is that there
> is no good justification why they exist and why the API document
> needs to bother about them. The doc really only talks about the
> library of the GRASP Library.
> 
> This is not to say that i do not like the idea to talk about the
> modularity of a GRASP implementation, its just not well motivated
> and executed i feel.
> 
> So, one way to solve this is to also talk about the other APIs.
> 
> For the extended function module, one could for example say
> any extensions to GRASP that are CAN BE implemented on top the
> GRASP API defined in this document SHOULD be implemented as
> a GRASP Function Module. And examples could be the functions
> suggested in my DNS drafts, or ther drafts you have that fit.
> So, thats the simple part.
> 
> More interestingly, i would be a great fan of talking about the
> API between library and core, to justify why we want to think about
> this modularity.
> 
> This is where the outline could be something like the following:
> 
> Any peer-to-peer GRASP connection could and should be implemented
> in the context of the ASA, such as in a library compiled into the
> application. The reason is that this allows for greater 
> confidentiality and mutual authentication then if it went through
> the  GRASP core. Aka: any unicast message can ultimately have
> an originator authentication if the security and transport substrate
> used supports this. Which ACP does (TLS for ACP GRASP unicsast).
> 
> On the other hand, all the multicast messages and the hop-by
> hop flooded unicast replies will have to be seen by each intervening
> nodes non-ASA specific GRASP core code and hence needs to be implemented
> in a common component called he GRASP core. For examplanation, the
> terms "system level" or "daemon" could be used.
> 
> So as far as GRASP messages are concerned:
>  ASA(GRASP-library)<->GRASP_core -link- GRASP-core -link- ... ASA
>     M_FLOOD: hop-by-hop 'multicast'
>     M_DISCOVERY: (constrained) hop-by-hop multicast
>     M_RESPONSE:  hop-by-hop unicast
> 
>  ASA(GRASP-library)<-...(TLS)...->ASA(GRASP-library)
>     all unicasted messages except M_RESPONSE sent in
>     reply to a multicast received M_DISCOVERY.
> 
> So, there is a bit of work to do to go through the remainder
> of the document and figure out what to say about how each of
> the proposed API calls would operate at the GRASP API layer and
> at the GRASP_CORE layer. The way i imagine it, the API would
> be the same for both GRASP Core and GRASP Library except that
> i think we need to check which of the API calls need another
> (optional) locator parameter, because the whole goal of the exercise
> is that the GRASP library would create its own unicast GRASP socket(s)
> (e.g.: TLS) and that socket locator would need to be passed on via the
> API calls to the GRASP core where needed.
> 
> And when that locator option is not given on the according API
> calls, then the unicast would go across unicast sockets created and
> kept only inside the GRASP Core . Which means that the GRASP
> libary would also be  optional, but if an ASA runs directly
> on top of GRASP core only, then it would expose all
> potentially confidential objective value stuff to that
> shared GRASP core code.
> 
> Also: When an ASA runs in an environment where it has cached
> its relevant peers locators, then it can operate without
> relying on the discovery service parts of GRASP and hence also
> without any GRASP cores involved, arguably making a service
> built on such ASA more resilient and maybe less prone to attacks.
> 
> So, let me know if we can get this IMHO important high level aspect
> into the doc. If not, and if also can not find another reason to
> talk about a standardized API to the GRASP core then that text
> should better be moved to a non-specification section (informative
> only, appendix, etc. pp.)
> 
> Cheers
>     Toerless
>