Loomio
Thu 14 Aug 2014 12:42AM

Implement RFC7033 (webfinger)

MM Mike Macgirvin Public Seen by 268

I'm building some more federation tools that involve Diaspora and the fact that it runs an outdated webfinger service is increasingly turning into an issue. Most of the world has started to move towards RFC7033 since it was standardised last year - basically a JSON-based webfinger that allows you to lookup information for a single "pod" with one fetch.

Currently, if given a webbie (D* handle) the discovery process looks like:

  • try RFC7033
  • if that fails, fall back on https: host-meta webfinger
  • if that fails, try again using the http port
  • if you get something parse it.
  • This provides hardly any information except for a personal XRD template. Fill it in and then fetch the personal XRD file.
  • We can now discover it's Diaspora.
  • Since it's Diaspora we need to fetch the hcard and parse it for all the extra goodies like name and profile photo and visibility
  • If this were a statusnet connection we would need to also fetch/parse the atom feed to see if there's a pubsubhubbub server defined.
  • if all that fails, check if it's an email address

Anyway as you can see this starts to add up to a mountain of HTTP requests and invoking different parsers with different rules just to look up one person. Ideally it would be nice to get it all in one or at most two slurps of JSON. Then we can react in close to real time rather than queue the request in the background and report something like "And nobody was found".

It's OK to keep the old facility as it will take time for everybody to migrate and make use of the new one. It just makes the whole discovery process much simpler and less resource intensive.

This also doesn't really impact the "federation protocol" which I know is an open issue. No matter what D* does - if it supports any kind of user@host addressing going forward you're going to need webfinger. The new version is much more efficient than the old one in a number of ways and is almost trivial to implement.

ST

Sean Tilley Thu 14 Aug 2014 1:55AM

First off: Mike, I'm glad to see you participating in these discussions. It's always great to see active members of other decentralized projects make suggestions based on their experience.

I'm personally all for this, especially if the implementation isn't hard to implement, and it brings greater improvements to the way we currently use Webfinger.

DU

Rich Thu 14 Aug 2014 5:24AM

and is almost trivial to implement

This could be the deciding factor.

Good call though Mike, this would get my vote!

JH

Jonne Haß Thu 14 Aug 2014 8:42AM

I don't think anyone would reject a backwards compatible implementation for this. So any contributions are welcome.

JR

Jason Robinson Thu 14 Aug 2014 6:05PM

Sounds good - would you be able to/interested to write the code @mikemacgirvin or shall we raise an issue and promote this to our community devs?

I guess at first would be just to start using RFC7033 as the first option - and then work on improving things like person lookups.

MM

Mike Macgirvin Tue 19 Aug 2014 5:05AM

I'm thinking a D* dev who knows the code base could do it much more efficiently than I; as I'm pretty well bogged down in redmatrix features and haven't really looked at the D* tree in about 3 years.

The person lookups are part of the new webfinger protocol. Some projects can do one fetch and be done. Redmatrix was a bit more difficult as we provide information in a person lookup for which there isn't any clean representation defined in the RFC (directory services, arrays of locations of nomadic identity clones, etc.). So we did it with two fetches. The RFC7033 fetch tells us the site has zot as an available protocol, and provides a pointer to the zot-info (JSON) packet for the channel/pod requested. Retrieving this provides 100% of the information we need to communicate with and link this channel/pod into the network.

GNUsocial is doing what I consider a good job at migration - it's really just a mirror of the older XRD information, converted to JSON. We would still have to parse the hcard and feed (both XML) in that case but we've already saved two fetches because all the info from the old "personal XRD" is supplied with the first fetch.

MV

Michael Vogel Tue 26 Aug 2014 2:26PM

I never looked at webfinger, but the old standard sounds like some complicated stuff. So it would be great to simplify this.

@mikemacgirvin Hopefully you will implement it in red in a modular way so that we can integrate it into friendica with low effort.

And hopefully some day we will have a common protocol for the federation between different networks as well ...

FS

Florian Staudacher Tue 26 Aug 2014 4:42PM

I'd love to see this implemented in the federation gem so we can have that "for free" when we migrate to it

It shouldn't be very hard to implement. Internally the gem stores XRD documents as Ruby hash/arrays, so all we'd need is a to_json method for that data.

MM

Mike Macgirvin Wed 27 Aug 2014 8:49AM

@michaelvogel - fabrixxm has looked at rfc7033 for friendica - and you can steal a lot of what I've already done for red. Basically move the old xml/html stuff out of the xrd and vcard and into a json array. And see my latest post on D* about federation. We're making huge strides.

A

Poll Created Fri 30 Jan 2015 11:18PM

Implement RFC7033 (webfinger) Closed Mon 2 Mar 2015 11:06PM

Outcome
by aj Tue 25 Apr 2017 5:15AM

Jonne was right. No controversy here. :)

first time using this loomio feature, not sure i'm doing right :) suggesting we raise the following thread to a feature proposal

https://www.loomio.org/d/gfBaSiAE/implement-rfc7033-webfinger

Results

Results Option % of points Voters
Agree 100.0% 10 ST JL A A R Y S L SR DU
Abstain 0.0% 0  
Disagree 0.0% 0  
Block 0.0% 0  
Undecided 0% 135 JL BK FS MS TS AA S CB HF BO JH DM GC JH JR F M EG G AX

10 of 145 people have participated (6%)

S

spudboy
Agree
Sat 31 Jan 2015 10:38PM

Seems simple enough

Load More