Re: [Ace] Review for draft-palombini-ace-coap-pubsub-profile

Benjamin Kaduk <kaduk@mit.edu> Tue, 24 December 2019 19:33 UTC

Return-Path: <kaduk@mit.edu>
X-Original-To: ace@ietfa.amsl.com
Delivered-To: ace@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 3C4441201E0 for <ace@ietfa.amsl.com>; Tue, 24 Dec 2019 11:33:06 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.199
X-Spam-Level:
X-Spam-Status: No, score=-4.199 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
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 D0x4zUQYl1Be for <ace@ietfa.amsl.com>; Tue, 24 Dec 2019 11:33:03 -0800 (PST)
Received: from outgoing.mit.edu (outgoing-auth-1.mit.edu [18.9.28.11]) (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 848CA120046 for <ace@ietf.org>; Tue, 24 Dec 2019 11:33:03 -0800 (PST)
Received: from kduck.mit.edu ([24.16.140.251]) (authenticated bits=56) (User authenticated as kaduk@ATHENA.MIT.EDU) by outgoing.mit.edu (8.14.7/8.12.4) with ESMTP id xBOJWnu3028894 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 24 Dec 2019 14:32:51 -0500
Date: Tue, 24 Dec 2019 11:32:49 -0800
From: Benjamin Kaduk <kaduk@mit.edu>
To: Cigdem Sengul <cigdem.sengul@gmail.com>
Cc: Francesca Palombini <francesca.palombini@ericsson.com>, Ace Wg <ace@ietf.org>
Message-ID: <20191224193249.GS35479@kduck.mit.edu>
References: <CAA7SwCMhdOctrzQqGAUz4-z7SvKfKZLErAJT88eSDwCMedg-rg@mail.gmail.com> <75220EAA-9455-4691-9E99-3E16401D1309@ericsson.com> <CAA7SwCPZx57naJUqzPrRz7T2E_EibG0ggfQ-gBVWras1w5WG1A@mail.gmail.com> <20191219223015.GO81833@kduck.mit.edu> <CAA7SwCMoe_nqrUo_w+WXaT9yN_sh2gc=Uu-i_gpKLWs+oHEYzQ@mail.gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: inline
In-Reply-To: <CAA7SwCMoe_nqrUo_w+WXaT9yN_sh2gc=Uu-i_gpKLWs+oHEYzQ@mail.gmail.com>
User-Agent: Mutt/1.12.1 (2019-06-15)
Archived-At: <https://mailarchive.ietf.org/arch/msg/ace/skg60DHZstwZ4vXRL12rnpCIolE>
Subject: Re: [Ace] Review for draft-palombini-ace-coap-pubsub-profile
X-BeenThere: ace@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Authentication and Authorization for Constrained Environments \(ace\)" <ace.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/ace>, <mailto:ace-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/ace/>
List-Post: <mailto:ace@ietf.org>
List-Help: <mailto:ace-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/ace>, <mailto:ace-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 24 Dec 2019 19:33:06 -0000

On Fri, Dec 20, 2019 at 12:03:04PM +0000, Cigdem Sengul wrote:
> Hello Ben,
> Response below.
> 
> >  >
> > >
> >
> > > CS: I see that I wasn't clear in my thinking before and mixed up things.
> > I
> > > was trying to understand how groups map to topics and the topic
> > hierarchy;
> > > and how group maintenance scales with the increasing number of topics,
> > > publisher and subscribers. Said another way, who creates groups, and
> > > creates/updates keys for these groups to be maintained in the KDC?
> > >
> > > I agree topic hierarchies require more thought. Here is my second attempt
> > > at explaining my thinking, which is by no means complete:
> > > In MQTT, it is possible to publish to all levels in a topic hierarchy
> > e.g.,
> > > if you have sport/tennis/player1/rankings, it is possible to publish to
> > the
> > > sport, sport/tennis, sport/player1, sport/player1/rankings...
> > > One option is to have as many keys as the nodes on the hierarchy
> > > independent of actual publishers and subscribers to them.  (Assuming this
> > > hierarchy is pre-built, and AS2 maintains a complete topic-key database).
> > > So, if publisher P1 comes with rights to publish to sport/tennis - he
> > gets
> > > the keys for that. But, if he comes with the right to publish to
> > > sport/tennis/#, he gets multiple keys, one each for every node under
> > > tennis.
> >
> > Having to always send all the keys would get frustrating (and/or expensive
> > in terms of bytes!), but the "other option" below feels quite messy with
> > respect to having to push out updates when membership/number of groups
> > changes.  I suppose the right balance depends on actual usage patterns, but
> > I would mostly expect a flow where permissions on a hierarchy grant the
> > ability to get any (per-topic) key from the hierarchy, but you still have
> > to explicitly request the individual key for the individual topics you are
> > going to post to, to be of most generic applicability.  Am I forgetting a
> > reason why that's not possible?
> >
> > Thanks,
> >
> >
> Yes, both have problems - mainly used them to talk about the differences
> between (semi-)static grouping (topics define groups) and dynamic grouping
> (active publisher/subscribers and their topic permissions determine groups).
> 
> Yes, a token with scopes that use the wildcard will give you the right to
> get any key from the hierarchy. In the "first approach," you would need the
> get the specific one for the individual topic because any number of
> publisher/subscribers may be on that topic (but not on others).
> If I understand correctly, you suggest that the client asks for the right
> key just-in-time before a publish/subscribe message?
> This is a good solution if the client can connect to AS2 at all times, but
> in ACE, I thought, we did not assume ASes are always reachable by clients.
> Therefore, I was always thinking of a scenario where the client is
> provisioned with the right keys beforehand (determined by their
> permissions).

Yes, I was thinking of having the client ask for the key "just in time",
but you are also right that we do consider cases where such connectivity is
not always available.  So perhaps there is not a single clear answer for
all cases...

> But the "second option", where the same encryption key may be used across
> different topics,  has the same connectivity requirements due to rekeying
> expected as groups change.
> 
> I hinted this in my previous e-mail by having to consider rekeying
> policies, as I haven't seen it mentioned in coap-pub-sub.
> 
> Need to also consider rekeying as a separate problem that needs to be
> addressed regardless of what approach is taken: ace-key-groupcomm refers
> to  [RFC2093], [RFC2094] and [RFC2627] for rekeying mechanisms and I am not
> exactly sure how to use them for client-broker communication.
> 
>  ace-key-groupcomm also states: If the application requires forward
> security, the KDC MUST generate new group keying material and securely
> distribute it to all the current group members but the leaving node, using
> the message format of the Key Distribution Response"
> If it is the AS2 (KDC) that needs to rekey groups, then AS2 should be able
> to connect to the clients and push this information? Am I missing something
> here?

I think we need to hear from other members of the WG to make progress here;
I don't have a clear picture, myself.

-Ben

> (In MQTT, things were easier when tokens expire. The Broker knows a token
> expired and disconnects the client, which forces the client to get a new
> token. But, the Broker here has no idea of rekeying.  So, the trigger for
> that needs to come from AS2. )
> 
> Regards,
> --Cigdem
> 
> 
> > Ben
> >
> 
> 
> 
> 
> 
> 
> 
> >
> > > The other option is creating groups dynamically and subtopics inherit
> > > authorisations (as captured by the wildcards), i.e., publisher and
> > > subscribers that have an exact match in their topic filters form a group.
> > > Going back to the previous example, assuming AS2 is generating the keys
> > > (need to read the groupcomm in detail to understand how the KDC and its
> > > endpoints work in general), I imagine something like this may work:
> > > Publisher P1 - publish_sport/tennis/#  -> AS2 checks if a matching group
> > > exists, doesn't find one, generates the key, and hands it out to P1,
> > stores
> > > the mapping.
> > > Publisher P2 - publish_sport/tennis/# -> AS2 checks if a matching group
> > > exists, find one, gives out the key to P2.
> > > Subscriber S1 - publish_sport/tennis/# -> AS2 checks if a matching group
> > > exists, find one, gives out the key to S1. Until now, assumed no rekeying
> > > when the new members join an existing group, as this would work well with
> > > MQTT RETAIN option, which enables the publisher to indicate
> > > to the Broker that it should store the most
> > >  recent message for the associated topic.  Hence, the new subscribers
> > > can receive
> > > the last sent message from the publisher of that particular topic
> > > without waiting
> > > for the next PUBLISH message.
> > > Subscriber S2 - publish_sport/tennis/+/rankings - AS2 checks if a
> > matching
> > > group exists, does not find an exact match -> generates new key, but then
> > > needs to update P1, P2, S1 as well as publish_sport/tennis/+/rankings
> > will
> > > be sent encrypted with the new key, and the rest will be with the old
> > key.
> > > When they are rekeyed, the publishers may send RETAINED messages again
> > with
> > > the new key.
> > >
> > > i.e.,
> > > P1-P2-S1 are one group
> > > P1-P2-S1-S2 would be another group
> > > Two groups - two keys.
> > >
> > > Do not know what is best, or there is a third option.
> > >
> > > Another thing to consider would be rekeying policies of course.
> > >
> > >
> > > >
> > > > Another approach could be each publisher creating its group. This way
> > the
> > > > number of groups scales with the number of publishers (and the COSE
> > keys is
> > > > per publisher).
> > > >
> > > >
> > > >
> > > > FP: I don't think this scales well, but yes, an application could also
> > do
> > > > this.
> > > >
> > >
> > > CS: Yes, scratch that - that actually wouldn't work.
> > >
> > > Thanks,
> > > --Cigdem
> > >
> > >
> > >
> > > >
> > > >
> > > > Kind regards,
> > > >
> > > > --Cigdem
> > > >
> >
> > > _______________________________________________
> > > Ace mailing list
> > > Ace@ietf.org
> > > https://www.ietf.org/mailman/listinfo/ace
> >
> >