Discuss general web development related issues. For Opera bugs, use the Bug Report Wizard: https://bugs.opera.com/wizard/. For Opera feature requests and queries, use Desktop wish-list: http://my.opera.com/community/forums/forum.dml?id=24.
By jaredhanson
Wednesday, 17. June 2009, 18:28:21

Unite Proxy and UCP protocol
Hi! Thanks Opera for developing Unite. It is an interesting concept and I've been enjoying experimenting with it yesterday and today.
I've been investigating the communication channel between Opera and the Unite proxy servers. I see it is using a protocol termed UCP/1.0. The init sequence is a REGISTER command to register the user and device. This is followed by a CHALLENGE from the server with a nonce. Opera then replies with a RESPONSE to authenticate, with a hash that must contain credentials.
I'm curious as to how the RESPONSE hash is computed. Is there any information regarding this? What is the algorithm used, if I wanted to authenticate a non-Opera client with the Unite proxy?
Thanks!
Jared Hanson
By jonnyrein
Wednesday, 17. June 2009, 21:02:28

It is a MD5 hash of the shared secret (see webserver settings in opera:config) and the nonce, then converted to hex.
Regards,
Jonny
By jaredhanson
Wednesday, 17. June 2009, 21:45:33

That worked perfectly!
Jared
By jaredhanson
Thursday, 18. June 2009, 16:16:54

Is there any trick to RSVP'ing to INVITE messages? I'm successfully authenticating the communication channel. When I attempt to access my client through the HTTP gateway in a separate browser, however, my RSVPs are not accepted. For example:
S: INVITE 1156 UCP/1.0
S: Nonce: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
S: X-Forwarded-For: nnn.nnn.nnn.nnn
C: RSVP device.user.operaunite.com UCP/1.0
C: Id: 1156
C: Digest: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
S: UCP/1.0 400 Bad request
<server-close>
At this point, I'm expecting the HTTP request to be proxied to my UCP client. However, the 400 error is delivered and the connection is closed. I've checked and re-checked everything, and inspected the packet captures, and I can't see what I'm missing. I'm calculating the digest correctly using MD5(shared secret + invite nonce).
Is there some out-of-band communication that needs to happen before RSVPs are accepted? I've seen some HTTP requests to asd.opera.com, but nothing that looks essential. Any help is appreciated.
Thanks,
Jared Hanson
By joritter
Wednesday, 22. July 2009, 09:58:44

Good to see that the unite protocol is being analysed. Question to Opera: do you have any plans to open up the protocol description to encourage other "server devices" to engage in the Opera Unite community?
Thanks,
Jo