Re: [Ace] draft-ietf-ace-mqtt-tls-profile - Validating a subscription is in scope

Jim Schaad <ietf@augustcellars.com> Sat, 18 January 2020 03:28 UTC

Return-Path: <ietf@augustcellars.com>
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 AEBD012004A; Fri, 17 Jan 2020 19:28:38 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.899
X-Spam-Level:
X-Spam-Status: No, score=-1.899 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-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 al11QMneotWf; Fri, 17 Jan 2020 19:28:36 -0800 (PST)
Received: from mail2.augustcellars.com (augustcellars.com [50.45.239.150]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 13C0F120041; Fri, 17 Jan 2020 19:28:36 -0800 (PST)
Received: from Jude (73.180.8.170) by mail2.augustcellars.com (192.168.0.56) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Fri, 17 Jan 2020 19:28:29 -0800
From: Jim Schaad <ietf@augustcellars.com>
To: 'Cigdem Sengul' <cigdem.sengul@gmail.com>
CC: draft-ietf-ace-mqtt-tls-profile@ietf.org, 'Ace Wg' <ace@ietf.org>
References: <003f01d5c9b2$1fe439b0$5facad10$@augustcellars.com> <CAA7SwCOieCSUhKHGS=y+zakoPvTkaZm4jLwcVq0rCpqS=GT3JA@mail.gmail.com> <00de01d5cafa$adefb420$09cf1c60$@augustcellars.com> <CAA7SwCNhLaXcopNV_WOZRd8B+5Ff3vJhSC_WeaFWVcmYRYZEiQ@mail.gmail.com>
In-Reply-To: <CAA7SwCNhLaXcopNV_WOZRd8B+5Ff3vJhSC_WeaFWVcmYRYZEiQ@mail.gmail.com>
Date: Fri, 17 Jan 2020 19:28:27 -0800
Message-ID: <012a01d5cdaf$5aad85f0$100891d0$@augustcellars.com>
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="----=_NextPart_000_012B_01D5CD6C.4C8D0510"
X-Mailer: Microsoft Outlook 16.0
Content-Language: en-us
Thread-Index: AQG68Cx4Lv4gMYGrZ81gKRTlPGEQPwK+Nj7oAjfsVBYCZEJuyafqneGA
X-Originating-IP: [73.180.8.170]
Archived-At: <https://mailarchive.ietf.org/arch/msg/ace/FUxLKrDtTM5I1XhIwkTett6fK4s>
Subject: Re: [Ace] draft-ietf-ace-mqtt-tls-profile - Validating a subscription is in scope
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: Sat, 18 Jan 2020 03:28:39 -0000

 

 

From: Cigdem Sengul <cigdem.sengul@gmail.com> 
Sent: Wednesday, January 15, 2020 4:44 AM
To: Jim Schaad <ietf@augustcellars.com>
Cc: draft-ietf-ace-mqtt-tls-profile@ietf.org; Ace Wg <ace@ietf.org>
Subject: Re: [Ace] draft-ietf-ace-mqtt-tls-profile - Validating a subscription is in scope

 

Hello,

 


It gets interesting when the scope is more restricted than the subscription request. 

For instance, the scope is sport/+

But subscription is sport/#

 

Should this be refused? Obviously the subscriber is attempting to subscribe to more than it has permission for. But does the broker still allow the subscription but reduce it to "sport/+"? 

 

[JLS] Given that this is not defined in the base MQTT specification, most clients would not expect this if the ACE is grafted on the side of the program.  I would therefore say this is a “not authorized” and go on.

 

 

[CS] Agreed. Another issue that we should say something about is the case when multiple permission strings aggregated together gives enough permission to the subscription request, based on the _current_ topic hierarchy. 

Example:

Scope strings in the token were: publish_sport/tennis  publish_sport/basketball

and then the client asks for publish_sport/+

 

If tennis and basketball are the only topics under sport, then this is a valid request. 

But, if the topic hierarchy is changes during the connection time (adds sport/baseball) then subscriber gets PUBLISH messages for something they should not. 

When topic subscriptions are not protected, the broker would send anything at the single level for sport/+ and would not worry about the new additions after the subscription. 

 

When topic subscriptions are protected, the Broker can choose to do two things:

1) Allow the subscription but internally subscribe the clients to sport/basketball and sport/tennis only.

or

2) Reject the subscription and the client needs to ask for subscriptions that are a subset or equal to their permission strings. So the client specifically needs to ask for publish_sport/tennis and publish_sport/basketball matching its scope strings. But then scope parameter cannot be optional and must be included in the AS response. 

or

3) Allow the subscription, when a new level is added, check the permissions of all active subscribers, send DISCONNECT if the current permissions do not apply to the new hierarchy. 

 

1 would need to be again signalled to the client, 2 might be too restrictive, and 3 may introduce a processing load if things are changing all the time (which I do not expect). 

Leaning towards 3...  Any thoughts?

 

[JLS]  My first thought was to run and hide.  I think you have the scope strings setup wrong, they all should be “subscribe_” not “publish_” as a client is never going to ask to publish with a wildcard (MQTT-3.3.2-2).     I would far prefer that the answer be 2 rather than 1 and I think that 3 is right out.

 

For 3 you are saying we are going to subscribe you, and then potentially disconnect you at a later time for something you never heard about.  I don’t really care about 1, only because there is no way to communicate this information back to the client that one is changing the set of subscriptions that was requested.  

 

I am not sure what you are requesting in terms of returning the scope parameter.  The current OAuth specification states that if the Authorization server returns a token that contains a different scope that the one requested by the client, then it is required to return the modified scope to the client.  Is that what you are looking for.

 

Jim

 

 

--Cigdem

 

 

 

 

 

Jim

 

 

--Cigdem 


Jim


_______________________________________________
Ace mailing list
Ace@ietf.org <mailto:Ace@ietf.org> 
https://www.ietf.org/mailman/listinfo/ace