[CalendarServer-users] Locations & resources in LDAP in version 3.2?

Morgen Sagen sagen at apple.com
Thu Aug 30 08:49:13 PDT 2012


On Aug 28, 2012, at 2:54 AM, tobiasbp <tobiasbp at gmail.com> wrote:

> On Thu, Aug 23, 2012 at 6:24 PM, tobiasbp <tobiasbp at gmail.com> wrote:
>>> My guess is your caldavd plist settings for LDAP don't match your LDAP server settings.  See this page for an example DirectoryService plist section:
> 
> Correct. I had not set up fullName. I have now, and I can look up
> locations and resources from my iCal clients.
> 
> I can not however set autoSchedule to true for my locations and resources.
> 
> I have set up mu resourceSchema like this:
> <key>resourceSchema</key>
>        <dict>
>          <key>resourceInfoAttr</key>
>          <string></string>
>          <key>autoScheduleAttr</key>
>          <string>employeeType</string>
>          <key>autoScheduleEnabledValue</key>
>          <string>yes</string>
>          <key>proxyAttr</key>
>          <string>uid</string>
>          <key>readOnlyProxyAttr</key>
>          <string>uid</string>
>        </dict>
> 
> Comments in ldapdirectory.py led me to believe i HAVE to have
> something in proxAttr and readOnlyProxy. Proxies are not a
> functionality I need, so I just put in uid.

No, you actually shouldn't need to put in any values within resourceSchema; just leave all those strings blank.

You see, there are two ways to tell calendar server about location/resource auto-schedule and proxy information...

A) augments.xml
B) the external directory service (LDAP, OpenDirectory, etc)

The "resourceSchema" section is for configuring (B), but I think you just want to use (A).

Unless you've explicitly set the "AugmentService" key in your caldavd.plist, you should have an augments.xml file in your data directory.  That file contains settings which augment what you have in LDAP; for example, whether a principal is enabled for calendaring and/or addressbooks, and the auto-schedule flag.  There should be a "Default" entry in augments.xml which applies to any principal that doesn't have a specific matching entry.  You can also add type-specific entries, so if you want all locations and resources to be auto-scheduled, you should add this to your augments.xml:

  <record>
    <uid>Location-Default</uid>
    <enable>true</enable>
    <enable-calendar>true</enable-calendar>
    <enable-addressbook>true</enable-addressbook>
    <auto-schedule>true</auto-schedule>
  </record>
  <record>
    <uid>Resource-Default</uid>
    <enable>true</enable>
    <enable-calendar>true</enable-calendar>
    <enable-addressbook>true</enable-addressbook>
    <auto-schedule>true</auto-schedule>
  </record>

Now, the typical deployment on an OS X Server nowadays is to have users/groups come from the directory service, while locations/resources come from resources.xml.  Locations/resources are added/removed/edited via either the OS X Server UI, or with the calendarserver_manage_principals command line utility which is included in the open-source project.  If you want to go that route, you configure your caldavd.plist DirectoryService to handle users/groups, and configure the ResourceService to handle locations/resources.  However, if you want to continue keeping locations/resources in your LDAP, then adding the Location-Default and Resource-Default entries into augments.xml should work.

~morgen

> 
> Looking at my resources/locations with
> calendarserver_manage_principals, auto-schedule is always false even
> though I have employeeType=yes for the entity in the LDAP database?
> 
> I have watched the traffic with tcpdump, and I can see that
> employeeType=yes is being returned from LDAP.
> 
> I have trued to hard code autoSchedule = True in ldapdirectory.py, but
> I still get auto-schedule = false with
> calendarserver_manage_principals when I look up the resource/location.
> 
> Any pointers to a good place in the code to force auto-schedule = true
> for all resources/locations?
> 
> Regards,
> Tobias
> _______________________________________________
> calendarserver-users mailing list
> calendarserver-users at lists.macosforge.org
> http://lists.macosforge.org/mailman/listinfo/calendarserver-users



More information about the calendarserver-users mailing list