IntroductionWe need to figure out the best way to use DNS to do the initial discovery of the domain's XRD file, given the domain name. SRV records provide for a hostname and port, but no path component. TXT records are the favorite catch-all, but it's not strictly what TXT records are for. A TXT record for discovery on example.com might look like: example.com. 300 IN TXT "v=xrd1 url=http://meta.example.com/site/my-xrd.xml"
|
DNS-SD gives a standardised way to add path and other info in TXT records associated with SRV ones:
http://tools.ietf.org/html/draft-cheshire-dnsext-dns-sd-05
and there is a registry of service types here: http://www.dns-sd.org/ServiceTypes.html
DDDS uses NAPTR records to convert one naming system to another (usually URI), and is the mechanism used by ENUM to map E.164 numbers to URIs.
Given that the goal of webfinger is to map an email address to the URI of its XRD document, it seems appropriate to use DDDS in this context. It could be something like:
# Lookup the domain name for NAPTR records of service field "EA2XRD" # The regexp field of the records provides the transformation from the original email address (in the form of mailto: URI) into the XRD URI.
Example:
$ORIGIN example.org. NAPTR 10 10 "u" "EA2XRD" "!^mailto:([^@]+)@.*$!https://example.org/getxrd?email=\1!" . NAPTR 10 20 "u" "EA2XRD" "!^mailto:([^@]+)@.*$!http://example.org/getxrd?email=\1!" .DDDS is specified in rfc3401 to rfc3403, the latter covering NAPTR: http://tools.ietf.org/html/rfc3403
Why not defining a new DNS Resource Record (RR) type? That's the solution recommended by RFC 5507 "Design Choices When Expanding the DNS".
The draft-reichinger-enum-foaf draft and the PHOAF prototype could be of interest.
please don't define a new DNS RRtype, the rollout cycle for that is about 10 years.
i'm in favour of scribbling into TXT, though it doesn't have to be anything as complex as DDDS. the only weakness of EAUT is the need to fetch against the http://domain.com/ directly.
I like the original proposal -- indicate the appropriate URL without the regex bit.
Then you can continue with the XRDS discovery.
I'm a fan of DNS-SD. It looks like it fits the bill:
openid.tcp.domain.com. 300 IN TXT "xrds=http://meta.example.com/site/my-xrd.xml"
or maybe xrds.tcp.domain.com. 300 IN TXT "url=http://meta.example.com/site/my-xrd.xml"
Having used a lot of systems there have their DNS controlled from an external webapp, SRV records are not idea, but if they are implemented at all, they are not well implemented, which would make depending on them problematic.
+1 to use TXT instead of SRV records, simply due to support. There are too many service providers IMHO that have broken or non-existent support for SRV records. Had much frustration with this myself with XMPP federation.
See XEP-156 (http://xmpp.org/extensions/xep-0156.html) for an example of a deployed protocol using TXT for something similar, albeit without templates.