Using Webfinger to Discover Well-Known ECIs


Summary

Webfinger provides a means for doing simple discovery of an event channel identifier (ECI) given a simple, better known account.

WebFinger

In last week's post on subscriptions in personal clouds, I talk about the possibility of using Webfinger for event channel discovery. The goal is to automatically retrieve a person's well-known ECI from some other identifier that they give you, hopefully one that's easier to remember and type in that a URL with a big long GUID in the middle.

This morning I decided I'd try to figure out exactly how Webfinger could work for this purpose. Turns out it's not very hard thanks to Evan Hammar's article on implementing Webfinger.

Webfinger relies on a new URI scheme, acct:, and the idea that a host can return an XRD document describing various meta-data resources about the person identified in the URI.

For example, for acct:phil@windley.org, we'd look in

http://windley.org/.well-known/host-meta

for a resource with the name lrdd:

<?xml version='1.0' encoding='UTF-8'?>
<XRD xmlns='http://docs.oasis-open.org/ns/xri/xrd-1.0'
     xmlns:hm='http://host-meta.net/xrd/1.0'>
 
    <hm:Host>windley.org</hm:Host>
 
    <Link rel='lrdd'
          template='http://windley.org/describe?uri={uri}'>
        <Title>Resource Descriptor</Title>
    </Link>
</XRD>

The lrdd resource says how to find information about a person via a service. In this case, it's the describe service running on the same host, windley.org. The resource is a template that the URI is plugged into.

Doing so, we get the following URL:

http://windley.org/describe?uri=acct:phil@windley.org

Performing an HTTP GET on that URL returns the XRD document for :

<XRD xmlns="http://docs.oasis-open.org/ns/xri/xrd-1.0">
  <Subject>acct:phil@windley.org</Subject>
  <Link rel="http://kynetx.org/rel/well-known-eci"
        href="http://cs.kobj.net/sky/event/71a72abc-f563-012f-1a09-00163ebcdddd"/>
</XRD>

This file identifies the well-known ECI using a URI at kynetx.org. Using a simple identifier, phil@windley.org, we were able to retrieve a well-known ECI for a personal cloud. There would likely also be other information in my Webfinger, like a link to my HCard, etc.

This is pretty easy and only took a little while to get set up. Of course if ECIs were in wide-spread use, Google and other "account" providers could easily allow people a place to store their well-known ECI and return it via Webfinger. This isn't the only way you could do it, of course. For example, the ECI could be in an NFC or QR code on a business card.