mam-dev / cosmo

Cosmo Calendar Server implements the server side of the CalDAV protocol.
Apache License 2.0
79 stars 45 forks source link

/.well-known/caldav #49

Open f1-outsourcing opened 3 years ago

f1-outsourcing commented 3 years ago

Is there any example what the .well-known should return? I think it would be nice to have this in the server, but for now I would like to add it to the haproxy cfg

Currently auto detection of the apple calendar client fails with trying these urls.

Apr  7 11:45:11 xxxx haproxy[1183245]: xxxx:46078 [07/Apr/2021:09:45:11.328] caldav~ caldav/test2 0/0/1/2/3 404 571 - - ---- 19/1/0/0/0 0/0 "PROPFIND /.well-known/caldav HTTP/1.1"
Apr  7 11:45:11 xxxx haproxy[1183245]: xxxx:46078 [07/Apr/2021:09:45:11.371] caldav~ caldav/test2 0/0/0/1/1 404 571 - - ---- 19/1/0/0/0 0/0 "PROPFIND / HTTP/1.1"
Apr  7 11:45:11 xxxx haproxy[1183245]: xxxx:46078 [07/Apr/2021:09:45:11.377] caldav~ caldav/test2 0/0/0/0/1 404 571 - - ---- 19/1/0/0/0 0/0 "PROPFIND /caldav/v2 HTTP/1.1"
Apr  7 11:45:11 xxxx haproxy[1183245]: xxxx:46078 [07/Apr/2021:09:45:11.418] caldav~ caldav/test2 0/0/0/1/1 404 571 - - ---- 19/1/0/0/0 0/0 "PROPFIND /principals/users/test%40example.com/ HTTP/1.1"
Apr  7 11:45:11 xxxx haproxy[1183245]: xxxx:46078 [07/Apr/2021:09:45:11.424] caldav~ caldav/test2 0/0/0/0/1 404 571 - - ---- 19/1/0/0/0 0/0 "PROPFIND /principals/ HTTP/1.1"
Apr  7 11:45:11 xxxx haproxy[1183245]: xxxx:46078 [07/Apr/2021:09:45:11.465] caldav~ caldav/test2 0/0/0/1/1 404 571 - - ---- 19/1/0/0/0 0/0 "PROPFIND /dav/principals/ HTTP/1.1" 
danielgrigore commented 3 years ago

.well-known URI and service discovery are described in RFC 6764 Some info on the subject can be found here They are configuration related topics and some of them involve DNS records creation, that's why they are not part of the cosmo. Cheers,

f1-outsourcing commented 3 years ago

I already configured the dns srv / txt records, yet still this well-known is being queried, and the client does not auto detect settings.

_caldavs._tcp    SRV   0 1 443 cal.example.com.
_caldavs._tcp    TXT   "/cosmo/dav"

The sabre dav doc says you can redirect .well-known to the root of your caldav server. However when I redirect /.well-known/caldav to /cosmo/dav or /cosmo/dav/test@example.com or /cosmo/dav/test@example.com/calendar. The auto detection still fails.

danielgrigore commented 3 years ago

I think you should point /.well-known/caldav to /cosmo/dav/users/ for the auto-detection to work.

f1-outsourcing commented 3 years ago

Correction, It indeed gets me past the auto configuration, however it looks like this change breaks the whole functionality. I have now an explanation mark and the whole calendar is not working having error:

"the url https://cal.example.com/cosmo/dav/users/test@example.com encountered http error 404"

When going back to the advanced configuring specifying the whole url. I am having the error "No calendar home was specified for the account"

Thus I am able to create the account, during this process the account is successfully authorized against the server. But after that the calendar can't be used.

Can it be that (modern) apple calendar versions are not supported?