xDAV and shared namespaces

Anatoli me at anatoli.ws
Sun Mar 25 05:34:30 EDT 2018


Hi Ken,

Below goes the telemetry for the relevant part. What I see here is that 
Cyrus correctly answers to the "principal?" question and then the iOS 
asks for calendars of the principal (telemetry included in the attached 
file) and there Cyrus only returns the personal calendars, but IMO the 
shared folder should be somehow taken into account, either responding 
differently to the "principal?" question or including the shared 
calendar when queried for available calendars (IMO the best solution (no 
need to create separate accounts on the phone with different URLs).

Please let me know if you need additional details.

Regards,
Anatoli


---------- t3 at domain.com Sun Mar 25 06:05:36 2018

<1521968736<*PROPFIND* */dav/calendars/shared/* HTTP/1.1
Accept: */*
Content-type: text/xml
Connection: keep-alive
Content-length: 181
Host: mail.domain.com
User-agent: iOS/11.2.6 (15D100) accountsd/1.0
Prefer: return=minimal
Depth: 0
Brief: t
Accept-language: en-us
Authorization: Basic ...
Accept-encoding: br, gzip, deflate

<1521968736<<?xml version="1.0" encoding="UTF-8"?>
<A:propfind xmlns:A="DAV:">
   <A:prop>
     <A:current-user-principal/>
     <A:principal-URL/>
     <A:resourcetype/>
   </A:prop>
</A:propfind>


 >1521968736>HTTP/1.1 207 Multi-Status
Date: Sun, 25 Mar 2018 09:05:36 GMT
Strict-Transport-Security: max-age=600
Vary: Accept-Encoding, Brief, Prefer
Preference-Applied: return=minimal
Content-Type: application/xml; charset=utf-8
Content-Length: 546

<?xml version="1.0" encoding="utf-8"?>
<A:multistatus xmlns:A="DAV:" xmlns:C="urn:ietf:params:xml:ns:caldav">
   <A:response>
     <A:href>*/dav/calendars/shared/*</A:href>
     <A:propstat>
       <A:prop>
         <A:current-user-principal>
           <A:href>*/dav/principals/user/t3 at domain.com/*</A:href>
         </A:current-user-principal>
         <A:resourcetype>
           <A:collection/>
           <C:calendar/>
         </A:resourcetype>
       </A:prop>
       <A:status>HTTP/1.1 200 OK</A:status>
     </A:propstat>
   </A:response>
</A:multistatus>

<1521968736<OPTIONS /dav/principals/user/t3%40domain.com/ HTTP/1.1
Host: mail.domain.com
Connection: keep-alive
Accept: */*
User-Agent: iOS/11.2.6 (15D100) accountsd/1.0
Accept-Language: en-us
Content-Length: 0
Accept-Encoding: br, gzip, deflate

 >1521968736>HTTP/1.1 200 OK
Date: Sun, 25 Mar 2018 09:05:36 GMT
Strict-Transport-Security: max-age=600
Cache-Control: no-cache
Link: </dav/principals/.server-info>; rel="server-info"; 
token="80769c2c66d340ecd178710db26d56b9c4699e3e"
DAV: 1, 2, 3, access-control, extended-mkcol, resource-sharing
DAV: calendar-access, calendar-auto-schedule
DAV: calendar-query-extended, calendar-availability, 
calendar-managed-attachments
DAV: calendarserver-sharing, inbox-availability
DAV: addressbook
Allow: OPTIONS, GET, HEAD
Allow: PROPFIND, REPORT, COPY
Content-Length: 0


*From:* Ken Murchison
*Sent:* Monday, March 19, 2018 09:24
*To:* Info-cyrus
*Subject:* Re: xDAV and shared namespaces

Can you capture telemetry for the PROPFIND and OPTIONS requests on the 
shared calendar?


On 03/19/2018 02:55 AM, Anatoli wrote:
> Hi Ken,
>
> Basically, the shared calendar is working fine in Thunderbird, where I 
> can specify the exact URL. But I can't make it work on iPhone as it 
> only takes the server and later resolves the exact URL via 
> /.well-known/caldav which points to the personal calendar for the same 
> user. Though, if I specify on iPhone the exact URL in the settings, it 
> queries it:
>
> Mar 19 03:27:42 l https[18199]: [10.1.1.100] with "iOS/11.2.6 (15D100) 
> dataaccessd/1.0"; "PROPFIND /dav/calendars/shared/ HTTP/1.1" (depth=0) 
> => "HTTP/1.1 401 Unauthorized" (error=Must authenticate to access the 
> specified target)
> Mar 19 03:27:42 l https[18199]: login: [10.1.1.100] t2 at xxx.com 
> Basic+TLS User logged in 
> SESSIONID=<xxx.com-18199-1521440862-1-11826509860795088158>
> Mar 19 03:27:42 l https[18199]: [10.1.1.100] as "t2 at xxx.com" with 
> "iOS/11.2.6 (15D100) dataaccessd/1.0"; "PROPFIND 
> /dav/calendars/shared/ HTTP/1.1" (type=prop; depth=0) => "HTTP/1.1 207 
> Multi-Status"
> Mar 19 03:27:42 l https[18199]: login: [10.1.1.100] t2 at xxx.com 
> Basic+TLS User logged in 
> SESSIONID=<xxx.com-18199-1521440862-1-11826509860795088158>
> Mar 19 03:27:42 l https[18199]: [10.1.1.100] as "t2 at xxx.com" with 
> "iOS/11.2.6 (15D100) dataaccessd/1.0"; "OPTIONS /dav/calendars/shared/ 
> HTTP/1.1" => "HTTP/1.1 200 OK"
>
> But finally, iPhone Calendar app doesn't show events from the shared 
> calendar and in the Accounts the URL resets to the naked domain (i.e. 
> without the /dav/calendars/shared/ part). What could be done to make 
> it work?
>
> Thanks,
> Anatoli
>
> *From:* Ken Murchison
> *Sent:* Tuesday, March 13, 2018 14:09
> *To:* Info-cyrus
> *Subject:* Re: xDAV and shared namespaces
>
>
>
> On 03/13/2018 12:50 PM, Anatoli wrote:
>> Ken,
>>
>> Thanks a lot! After creating the shared folder under the root 
>> hierarchy (with imtest -a admin and the command you provided), 
>> setting the corresponding ACLs for the users that have to have access 
>> to the folder (with cyradm sam) and creating a new connection in each 
>> WebDAV client for https://domain.com/dav/drive/shared/, everything 
>> worked fine!
>>
>> I'll try to test the same with CalDAV / CardDAV and report it here.
>
> Its entirely possible that the URL parsing code for CalDAV and CardDAV 
> will not resolve to a shared folder.  Let me know.
>
>
>
>>
>> Regards,
>> Anatoli
>>
>> *From:* Ken Murchison
>> *Sent:* Tuesday, March 13, 2018 12:55
>> *To:* Info-cyrus
>> *Subject:* Re: xDAV and shared namespaces
>>
>>
>>
>> On 03/13/2018 11:48 AM, Anatoli wrote:
>>> Hi Ken,
>>>
>>> Thanks for your quick reply. Yes, I'm willing to test it and if 
>>> needed I can also apply patches (I build Cyrus from sources).
>>>
>>> > x CREATE shared (TYPE COLLECTION)
>>>
>>> What does this command is supposed to do and under what user should 
>>> I execute it (I mean imtest -a <user>)? I tried to run it under 
>>> admin user (it creates a "shared" folder at the root hierarchy) and 
>>> under a normal user that already has a shared folder (in this case 
>>> the folder is created under the user hierarchy), but in both cases 
>>> the folder stays empty (with only cyrus.header and cyrus.index 
>>> inside) and is not visible under a WebDAV client. Am I missing 
>>> something?
>>
>> Definitely do this as an admin (e.g. 'cyrus') that DOES NOT have 
>> their own user hierarchy.
>>
>> Its been so long since I wrote and played with the WebDAV module that 
>> I forgot how it works.  Try:
>>
>> x CREATE #drive/shared (TYPE COLLECTION)
>>
>> Use whatever you have set for the davdriveprefix option and the 
>> proper hierarchy ('.' if you have disabled unixhierarchysep)
>>
>>
>>>
>>> Regards,
>>> Anatoli
>>>
>>> *From:* Ken Murchison
>>> *Sent:* Tuesday, March 13, 2018 12:18
>>> *To:* Info-cyrus
>>> *Subject:* Re: xDAV and shared namespaces
>>>
>>> xDAV hasn't had much development or testing in the shared namespace 
>>> and there isn't any tooling to create such mailboxes.
>>>
>>> If you wanted to do some testing, you'd have to create the mailboxes 
>>> by hand and set the mailbox type accordingly.  To do so, you can 
>>> connect to the server as an admin using imtest and enter the 
>>> following command:
>>>
>>> x CREATE shared (TYPE COLLECTION)
>>>
>>> to create a WebDAV collection.  Or set the TYPE to CALENDAR or 
>>> ADDRESSBOOK
>>>
>>>
>>> On 03/13/2018 11:08 AM, Anatoli wrote:
>>>> Hi All,
>>>>
>>>> I'm experimenting with xDav (CalDAV, CardDAV and WebDAV) in Cyrus 
>>>> 3.0.5. All xDAV services in user namespaces work as expected, but I 
>>>> can't figure out how to setup them for shared namespaces.
>>>>
>>>> The most important service for me to setup for shared namespaces is 
>>>> WebDAV. I'd like to have a shared folder accessible to multiple 
>>>> users based on their ACLs. I know how to setup a shared folder for 
>>>> IMAP:
>>>>
>>>> cyradm> cm shared1 at domain.com
>>>> cyradm> sam shared1 at domain.com user1 at domain.com write
>>>>
>>>> In the mail client I see the shared1 folder under "shared folders". 
>>>> But I can't see it in a WebDAV client. At the server the shared1 
>>>> folder doesn't have the autocreated xDAV structure as it normally 
>>>> autocreates for individual users, and I don't know how to create it 
>>>> manually.
>>>>
>>>> Does anybody know how to configure WebDAV shared folders? I'm also 
>>>> interested in creating shared calendars (CalDAV) and addressbooks 
>>>> (CardDAV), but I suppose they are managed the same way as WebDAV.
>>>>
>>>> Thanks in advance,
>>>> Anatoli
>>>>
>>>>
>>>> ----
>>>> Cyrus Home Page:http://www.cyrusimap.org/
>>>> List Archives/Info:http://lists.andrew.cmu.edu/pipermail/info-cyrus/
>>>> To Unsubscribe:
>>>> https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus
>>>
>>> -- 
>>> Ken Murchison
>>> Cyrus Development Team
>>> FastMail US LLC
>>>
>>>
>>> ----
>>> Cyrus Home Page:http://www.cyrusimap.org/
>>> List Archives/Info:http://lists.andrew.cmu.edu/pipermail/info-cyrus/
>>> To Unsubscribe:
>>> https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus
>>>
>>>
>>>
>>> ----
>>> Cyrus Home Page:http://www.cyrusimap.org/
>>> List Archives/Info:http://lists.andrew.cmu.edu/pipermail/info-cyrus/
>>> To Unsubscribe:
>>> https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus
>>
>> -- 
>> Ken Murchison
>> Cyrus Development Team
>> FastMail US LLC
>>
>>
>> ----
>> Cyrus Home Page:http://www.cyrusimap.org/
>> List Archives/Info:http://lists.andrew.cmu.edu/pipermail/info-cyrus/
>> To Unsubscribe:
>> https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus
>>
>>
>>
>> ----
>> Cyrus Home Page:http://www.cyrusimap.org/
>> List Archives/Info:http://lists.andrew.cmu.edu/pipermail/info-cyrus/
>> To Unsubscribe:
>> https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus
>
> -- 
> Ken Murchison
> Cyrus Development Team
> FastMail US LLC
>
>
> ----
> Cyrus Home Page:http://www.cyrusimap.org/
> List Archives/Info:http://lists.andrew.cmu.edu/pipermail/info-cyrus/
> To Unsubscribe:
> https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus
>
>
>
> ----
> Cyrus Home Page:http://www.cyrusimap.org/
> List Archives/Info:http://lists.andrew.cmu.edu/pipermail/info-cyrus/
> To Unsubscribe:
> https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus

-- 
Ken Murchison
Cyrus Development Team
FastMail US LLC



----
Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
To Unsubscribe:
https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.andrew.cmu.edu/pipermail/info-cyrus/attachments/20180325/650d50f9/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: telemetry.log
Type: text/x-log
Size: 34564 bytes
Desc: not available
URL: <http://lists.andrew.cmu.edu/pipermail/info-cyrus/attachments/20180325/650d50f9/attachment-0001.bin>


More information about the Info-cyrus mailing list