Using CardDAV

Bedework's CardDAV Implementation

Bedework's CardDav server is a standards-compliant CardDav server that stores* and serves out v4.0 vCards.  See http://tools.ietf.org/html/rfc6350. Bedework's CardDav server can be configured to use a variety of vCard data stores.   Out of the box, it looks for private address books in an HSQLDB database that is packaged in the Bedework distribution and looks for public address books (one for people and one for locations) from the directory server (ApacheDS) that is packaged with Bedework.  By default the server is available at http://mybedeworkserver.edu/ucarddav.   

As a standards-compliant server, it should work well with many of the address book clients available on PC's and phones, however because many of them are based on V3.0 vCards, it may not.

*depending on whether the source is r/w or r/o.

 

Working with the Quickstart

The Quickstart uses Bedework's directory server (buildt on Apache DS)  to serve public contacts -- both people and locations.   Private address books are stored in an HSQLDB database.  HSQLDB is the java-based database engine included in the quickstart.   Instructions for adding more public information are included below.
Three locations and three public people are preloaded into the quickstart and served out by Apache DS.   That data resides in <qs>/apacheds-1.5.3-fixed/bedework.org. Three of the preloaded Bedework users -- vbede, bfranklin, and mtwain -- have contacts stored in their address books.

Getting Bedework ready:

  1. Kill bedework, if you've been running it.
  2. cd <qs>
  3. svn update bedework
  4. svn update bedework-carddav
  5. make a copy of your apacheds directory in case your directory gets hosed later:

    cp -rp apacheds-1.5.3-fixed apacheds-1.5.3-fixed.REFERENCE (or whatever)
  6. review carddav settings in cal.options.xml
    • For example, <cardPathPrefixes>/public/people,loc_:/public/locations</cardPathPrefixes>. See note on "loc_" in the * Public Locations* section.
  7. build bedework:

    ./bw -quickstart deploy
  8. build carddav:

    ./bw -quickstart -carddav

    #(if needed) delete your carddav database to make sure that you're starting clean. (Bedework will recreate it when it starts):

    • cd <qs>/jboss-5.1.0.GA/server/default/data/hypersonic
    • delete or move to the side CardDb3p7*
  9. In one window, start apache directory services
    • cd <qs>
    • /bw -quickstart dirstart
  10. In other window, start bedework
    • cd <qs>
    • ./startjboss
  11. (if you deleted you database) Import the schema:
    • visit localhost:8080/jmx-console
    • Log in with username "admin" and password "bw" (if the login doesn't work, check the file <qs>/jboss-5.1.0.GA/default/server/conf/props/jmx-console-users.properties).
    • scroll all the way down and choose service=CardDumpres very near the bottom
    • set export to True
    • set create to True
    • (temporarily, pending fix) remove "carddumprestore" path component from SchemaOutFile
    • Apply Changes#* Move toward the bottom and clink on the Schema Invoke button.
    • Check the jboss window for "schema export complete".

Public Locations

We follow a convention of prefixing location calendar addresses with “loc_” to distinguish them from people. For example, here's the vcard for "Cafe de la Butte", one of the locations shipped with Bedework (http://localhost:8080/ucarddav/public/locations/CafeDeLaButte.vcf). Note the EMAIL attribute:

BEGIN:VCARD
VERSION:4.0
REV:20101012T010409Z
SOURCE:/ucarddav/public/locations//CafeDeLaButte.vcf
UID:/ucarddav/public/locations//CafeDeLaButte.vcf
KIND:location
NOTE:Cafe De La Butte\, 71 Rue Caulaincourt\, Paris\, France
EMAIL:loc_cafedelabutte@mysite.edu
CALADRURI:mailto:loc_cafedelabutte@mysite.edu
FN:CafeDeLaButte
END:VCARD

That email prefix can be changed in cal.options.xml inside the configuration directory.

Adding Public Locations

  1. Because public locations are served by the built-in LDAP server, prepare them for import by preparing an LDIF file (let's say locations.ldif), with entries that look like this:

    dn: cn=CafeDeLaButte,ou=locations,ou=public,dc=bedework,dc=org
    objectclass: top
    objectclass: calendarresource
    objectclass: schedapprovalinfo
    objectclass: calEntry
    objectclass: room
    kind: location
    uid: bw000001@mysite.edu
    calCalAdrURI: mailto:loc_cafedelabutte@mysite.edu
    mail: loc_cafedelabutte@mysite.edu
    cn: CafeDeLaButte
    ou: locations
    description: Cafe De La Butte
    autoschedule: TRUE
  2. (Download, Install and) Start up Apache Directory Studio and point it at the Bedework Directory Server
    • Add ldap connection
      • server: localhost:10389
      • user dn: uid=admin,ou=system password="secret"
  3. Locate ou=locations under ou=public, under dc=bedework, dc=org## Import locations.ldif by right-clicking on ou=locations and choosing import/ldif import and browsing to its location.   If there's a chance of duplicates, click Update existing entries.
  4. Test with http://localhost:8080/ucarddav/public/locations.

Adding Public People

Like with locations. public people need to be imported via an LDIF. So, if you're starting with a VCARD, this entry

BEGIN:VCARD
VERSION:4.0
EMAIL:tedison@mysite.edu
N:Thomas Alva Edison
CALADRURI:mailto:tedison@mysite.edu
FN:TEdison
WORK.TEL;TYPE=voice:222-222-2222
NICKNAME:Sparky
END:VCARD

needs to be turned into this entry:

dn: cn=TEdison,ou=people,ou=public,dc=bedework,dc=org
objectClass: organizationalPerson
objectClass: person
objectClass: inetOrgPerson
objectClass: calEntry
objectClass: top
cn: TEdison
sn: Thomas Alva Edison
calCalAdrURI: [mailto:tedison@mysite.edu]
displayName: Sparky
mail: tedison@mysite.edu
ou: people
telephoneNumber: 222-222-2222
uid: bwpp00002@mysite.edu

Then:

  1. (if it's not running) Start up Apache Directory Studio
  2. Locate ou=people under ou=public, under dc=bedework, dc=org
  3. Import locations.ldif by right-clicking on ou=locations and choosing import/ldif import and browsing to its location.   If there's a chance of duplicates, click Update existing entries.
  4. Test with http://localhost:8080/ucarddav/public/people

Importing vcard data into Bedework using the Bedework Address Book web client (for a single user’s address book)

The Bedework address book client allows personal calendar users to import vcard data directly into their personal address books.

  1. Log into the Bedework personal calendar.
  2. Select “Contacts” in the left menu to open the Bedework address book client.
  3. In the address book client menus, select Tools → Import
  4. In a text editor, open the vcard file you wish to import.
  5. Copy the text of the vcard data and paste it into the text box in the Bedework address book client.
  6. Click “Import”.

Bedework Enterprise Calendar Server, version 3.10