[jdev] Digest URIs for XMPP

Peter Saint-Andre stpeter at stpeter.im
Tue Apr 14 11:19:21 CDT 2009


On 4/14/09 6:08 AM, Jonathan Dickinson wrote:
> I am busy doing the SASL lib for my server/client (almost completely
> finished with DIGEST-MD5). I was just wondering what the common practice
> is for digest-uris with varying ports. Some people use them as follows:
> 
>  
> 
> Port 80:
> 
> http/www.foo.com
> 
> Port 8080:
> 
> http/www.foo.com
> 
>  
> 
> Where others:
> 
>  
> 
> Port 80:
> 
> http/www.foo.com
> 
> Port 8080:
> 
> http/www.foo.com:8080
> 
>  
> 
> So which one is in common use in the XMPP world?

Isn't this what SRV records are for?

> Also where the connect server is different I would assume the following
> would apply (I am just confirming what I have read):
> 
>  
> 
> xmpp/talk.google.com/google.com
> 
>  
> 
> Or even:
> 
>  
> 
> xmpp/talk.google.com/gmail.com

As you know from RFC 2831, the format is:

serv-type "/" host [ "/" serv-name ]

The serv-type is always xmpp for us.

The host is the machine you connect to (or discover via SRV).

The serv-name is the name used by the client to discover the machine.

In the case of Google Talk, you look up gmail.com (or googlemail.com or
whatever) and discover things like this:

$ dig +short -t SRV _xmpp-client._tcp.gmail.com
20 0 5222 talk4.l.google.com.
5 0 5222 talk.l.google.com.
20 0 5222 talk1.l.google.com.
20 0 5222 talk2.l.google.com.
20 0 5222 talk3.l.google.com.

So I think that the resulting digest-uri would be of this form:

xmpp/talk.l.google.com/gmail.com

But I freely admit that this might be subject to interpretation, as so
many things are when it comes to the DIGEST-MD5 SASL mechanism. :(

Peter

-- 
Peter Saint-Andre
https://stpeter.im/

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 6751 bytes
Desc: S/MIME Cryptographic Signature
URL: <https://www.jabber.org/jdev/attachments/20090414/8a53d1c3/attachment-0003.bin>


More information about the JDev mailing list