Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#134 PathResolver and auto-discovery

open
Ben Fortuna
Connector (3)
5
2011-08-18
2011-08-18
Pascal Robert
No

Hi Ben,

I was looking at adding support for MobileMe in PathResolver, but I found out that the username in the principals and calendar URL is not the same as your MobileMe username. For example, instead of "someuser@me.com", the url to the principals looks like this:

/principals/users/1.20722xxx/

After some reverse engineering, I found that iCal find the principal and calendar-home-set like this:

- It does a PROPFIND on https://cal.me.com/ to find the principal-collection-set (right now, it returns /principals/).
- It does another PROPFIND on https://cal.me.com/principals to again find the principal-collection-set property, it returns /principals/users/x.xxxxxxx/
- It does a PROPFIND on https://cal.me.com/principals/users/x.xxxxxxx/ to find the calendar-home-set property (it returns /calendars/users/x.xxxxxxx/)

So I think we need to find a way to get it to work with services that does what MobileMe does. And also, according to this draft, discovery can also be done by DNS:

http://tools.ietf.org/html/draft-daboo-srv-caldav-10

I was thinking of adding a "GenericPathResolver" where we can set the principal and calendar path, and adding methods to do the discovery. So if someone would call:

private static class GenericPathResolver extends PathResolver {

public String getPrincipalPath(String username) {
...
}

getPrincipalPath would call a method that would do the two PROPFIND that is needed to find the principal-collection-set

What do you think of this?

Discussion

  • Ben Fortuna
    Ben Fortuna
    2011-08-20

    Hi Pascal,

    I do recall Cyrus talking about using SRV records to discover principal homes, so if there is an RFC for this it would be good to support it. If we can do it with the PathResolver model then it would seem like the best way, so all sounds good to me. :)

    regards,
    ben