Re: [webfinger] Redefining "properties"

Will Norris <will@willnorris.com> Mon, 18 August 2014 03:36 UTC

Return-Path: <wnorris@gmail.com>
X-Original-To: webfinger@ietfa.amsl.com
Delivered-To: webfinger@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id BC5D91A028A for <webfinger@ietfa.amsl.com>; Sun, 17 Aug 2014 20:36:58 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: 0.622
X-Spam-Level:
X-Spam-Status: No, score=0.622 tagged_above=-999 required=5 tests=[BAYES_40=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FM_FORGED_GMAIL=0.622, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, SPF_PASS=-0.001] autolearn=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 rQcYowvLBjer for <webfinger@ietfa.amsl.com>; Sun, 17 Aug 2014 20:36:56 -0700 (PDT)
Received: from mail-lb0-x234.google.com (mail-lb0-x234.google.com [IPv6:2a00:1450:4010:c04::234]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 462181A0282 for <webfinger@ietf.org>; Sun, 17 Aug 2014 20:36:56 -0700 (PDT)
Received: by mail-lb0-f180.google.com with SMTP id v6so3633636lbi.39 for <webfinger@ietf.org>; Sun, 17 Aug 2014 20:36:54 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=KpJNfGKXHyXodMHytttOgVjfGmzIEEFSv8iEqhJgCUE=; b=wCUqCBQIVRK4EF/uPocEITeYiR3BsqfGJmcLz47fOtpHaIolrYozGNyvoykuTVfX9e ebgqI00OdMTojNdprsXfURMG2ApVlWyj8XTatExHtYL6g00BB2TIVZhWZVU9Chqs34Pd sMcPB+eERjGE2xLq5UWu33/LdMgns9d0dJZ8QJmmlAjj5Hkr0j6Dtg7i6/BDAFT+VE3V yZSlWxcb1SpAtKNE+I0bmBzs+3IIxZxMwOLD7YBjmUysWT/EsKkIrkccuZbDgHcR/HEH qCstGSqa3F1+3HZilRoqeOW1EpxcEayER3Sl2dkE3HJicPKZXRsN8oHYTUZWqrbbT22v WUfQ==
X-Received: by 10.152.179.168 with SMTP id dh8mr26923514lac.0.1408333014583; Sun, 17 Aug 2014 20:36:54 -0700 (PDT)
MIME-Version: 1.0
Sender: wnorris@gmail.com
Received: by 10.152.210.103 with HTTP; Sun, 17 Aug 2014 20:36:14 -0700 (PDT)
In-Reply-To: <em6aba2e86-7b0f-49d3-a041-49439c5f7df4@sydney>
References: <CAJqAn3ysg30qZndNpUvk=kUK0ZCcQrW652E_6-0-+q_ceFPHAA@mail.gmail.com> <em6aba2e86-7b0f-49d3-a041-49439c5f7df4@sydney>
From: Will Norris <will@willnorris.com>
Date: Sun, 17 Aug 2014 20:36:14 -0700
X-Google-Sender-Auth: G7aDWwrKSfm1M-m8tdKMvyNXVgg
Message-ID: <CAJqAn3zdfmqi_+fyBcxxQSVPLLVs9raHxQWaPqdYiX1=s6Uw9g@mail.gmail.com>
To: webfinger@googlegroups.com
Content-Type: multipart/alternative; boundary="001a1133a55c0f4edd0500df1544"
Archived-At: http://mailarchive.ietf.org/arch/msg/webfinger/RC1e2uzN5kJkq18YXqpa7dNkXyc
Cc: "webfinger@ietf.org" <webfinger@ietf.org>
Subject: Re: [webfinger] Redefining "properties"
X-BeenThere: webfinger@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: Discussion of the Webfinger protocol proposal in the Applications Area <webfinger.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/webfinger>, <mailto:webfinger-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/webfinger/>
List-Post: <mailto:webfinger@ietf.org>
List-Help: <mailto:webfinger-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/webfinger>, <mailto:webfinger-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 18 Aug 2014 03:36:59 -0000

On Sat, Aug 16, 2014 at 12:05 PM, 'Paul E. Jones' via WebFinger <
webfinger@googlegroups.com> wrote:

>  Will,
>
> Sorry for the slow response.  I've been busy.
>
> Yes, folks do want to put more complex data into JRD as opposed to
> linking, including objects or arrays.  I can see how this can be abused,
> but then I can also see an argument for not linking to data that could be
> trivially represented inside the JRD itself.
>
>  Unfortunately, I do not have details of the specific use cases.
>

as a rule, I think suggestions for major changes to spec should always be
accompanied by concrete use cases that necessitate the change, ever more so
when we're talking about *breaking* changes to a *finalized* spec.  (in
this case Mike did provide an example later, so my comment is more to the
fact that his was proposed in the first place without an actual use case in
mind)


> All I do know is that there people working on unrelated applications where
> they want to be able to  do things like this with WebFinger:
>
> "properties" :
> {
>   "http://example.com/ns/foo" :
>   {
>     "a" : "Hello",
>     "b" : 32
>   }
> }
>
> Perhaps what might be worse is the possibility that people do this:
>
> ...
> "properties" :
> {
>   "http://example.com/ns/foo" : "{\"a\" : \"Hello\", \"b\" : 32}"
> }
> ...
> When working on WebFinger, there was a desire to keep it as simple as
> possible.  However, I fully appreciate why some would want to do something
> like this.  Sometimes, linking to external resources is "overkill" for the
> task at hand.  And, you're right that dealing with polymorphic data types
> can be a pain.  Then again, the JSON parser deals with much of this
> automatically and the client is likely going to only be looking for known
> members, anyway.
>

it depends very much on what the code is doing.  If you're just relying on
a JSON parser to parse an unknown structure, it's unlikely anything too bad
will happen.  However, if you're specifically trying to unserialize the
properties object into a string=>string map, then you would likely get a
parsing error.


>
> So, I'm not sure what to do here.  I'm OK with making a change.  It
> bothers me that we might break any client code that assumes all properties
> are strings.
>

"client code that assumes all properties are strings" almost sounds like
they took a shortcut or something.  This could also be spelled "client code
that implemented the spec as written"... *of course* they may have assumed
properties would be strings, that's what the spec said they would be (or
null).


> But, there is always the option to add some other member named something
> other than "properties".
>
> I take it you're not too keen on the idea, though.
>

I think that option should certainly be explored at least.  In fact, that's
something that can already be done today, no?  I don't think webfinger
precludes including other JSON values, does it?

Certainly, making breaking changes does bother me, though I still don't
think there as been THAT much adoption in the wild yet, so I don't know how
much would really be at risk of breaking.  What is the process for making
this kind of change anyway?  Publish an entirely new RFC that updates 7033?
 Publish a rewritten spec that obsoletes 7033 altogether?


As a separate issue, and I don't recall to what extent this was discuss
before, but this also makes me worry a little about the size of the data
people are looking to add to a webfinger document.  At least with links,
you can request just the links you care about with the "rel" query
parameter, but no such filtering mechanism exists for properties.  Plus I
have no idea how well supported the "rel" parameter is in webfinger servers
anyway (I know I don't support it on my personal site, but that's just me).

I know that nothing is stopping someone from throwing a megabyte worth of
data in a property string today, so this "problem" (as much as it really
is) already exists today.  But I worry that changing properties to accept
arbitrary JSON data may entice people to shove larger amounts of data in a
JRD than perhaps should be.  Gzip helps you to a degree, but I don't think
JWT sets, for example, compress much.

Ultimately, whether properties are strings or JSON objects, it's up to the
application to decide where they're going to look for what data, and
therefore what they instruct users to publish in their webfinger document.
 Perhaps what I'm suggesting is just that if new text does end up getting
written to support JSON properties, then perhaps a note to implementors
should be added to caution against adding too large of data (for some
definition of "large")?

-will


------ Original Message ------
> From: "Will Norris" <will@willnorris.com>
> To: webfinger@googlegroups.com
> Cc: "webfinger@ietf.org" <webfinger@ietf.org>
> Sent: 8/11/2014 11:39:19 PM
> Subject: Re: [webfinger] Redefining "properties"
>
>
> what are the actual use cases prompting this?  If folks are trying to
> store more complicated data, why is it not just a linked resource?
>
> Personally, as a client author, I've always hated it when APIs have
> polymorphic data types like this.
>
>
> On Mon, Aug 11, 2014 at 7:29 PM, 'Paul E. Jones' via WebFinger <
> webfinger@googlegroups.com> wrote:
>
>>  Folks,
>>
>> I have been asked by multiple people for different purposes to see if it
>> might be possible to redefine "properties" in the JSON Resource Descriptor.
>>
>> Per RFC 7033, "properties" is defined as an object that has zero or more
>> name/value pairs whose values are strings or null.  The suggestion is that
>> the values should be any valid JSON type.  Thus, a property might refer to
>> a string (as is does now) or it might refer to an object or array.
>>
>> This change would break any parsers strictly implement definition of
>> "properties".  So, there are two questions I want to present to those who
>> are interested:
>>
>> 1) Would you be agreeable to change the current definition of
>> "properties" to allow any value type?
>> 2) If not, would be agreeable to introducing something like "properties"
>> that essentially allows for the same and, if so, what should this new
>> object be named?
>>
>> Personally, as much as I don't like breaking backward-compatibility, I'm
>> favorable to redefining properties to accomodate what people want to do.
>> I'm willing to work on an RFC 7033bis and/or a new RFC to update the JRD
>> specification, if folks are agreeable to either (1) or (2).
>>
>> Paul
>>
>>
>> --
>>
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "WebFinger" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to webfinger+unsubscribe@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>  --
>
> ---
> You received this message because you are subscribed to the Google Groups
> "WebFinger" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to webfinger+unsubscribe@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>