Friday, April 6, 2012

Setup WebDAV with LDAP from scratch

Because of an issue we had at the office, I would like to have a local installation of a WebDAV. I know how this works: you install, remove, install, install... and software keeps dangling. So it should be running inside a VM Here's a summary of the steps taken, maybe one day I'll write this out to be a true blogpost :)
  1. First of all I set up a CentOS 6 machine inside VirtualBox, no biggie here. Oh, and make sure to install CentOS with Java support, we'll be using that.
  2. Then I had to install an LDAP server. I tried using OpenLDAP, but there has been some rework in how this should be configured and up till now ( april 2012 ) I couldn't find online documentation on how to set this up. Luckily I found the Apache Directory project: Apache DS is an easy to configure LDAP server. And well documented as well :D
  3. To test if the LDAP server is setup properly I used JXplorer. Use the deploy edition, because the .bin installer is not working properly ( as mentioned in this article).
  4. The only way I know how to get WebDAV running is by enabling it through the Apache HTTP server. It was by default installed, I only had to enable it through the menu System->Administration->Services. And yes, there it was... Running at http://localhost:80
  5. Now to set up WebDAV. For that, I used this all-in-one article at HowtoForge
  6. To test if setting up went ok select Places->Connect to Server. Settings:
    Server type : WebDAV (HTTP)
    Server : localhost
    Folder : webdav
    User name : test
  7. Now to use LDAP to authenticate users is actually quite easy, see this article.
  8. Maintaining users within LDAP appeared to be a bit more difficult than expected. Importing LDIF files with jXplorer as described here finally worked for me.