The Jakarta Project The Jakarta Slide Project


User's Guide

Administrator's Guide

Programmer's Corner

Creating Users

There exists a non-standard mechanism to add users to the system using the WebDAV protocol. This cannot be used on another WebDAV server only with the Slide implementation. I am going to do this by using the tool DAV Explorer avaliable at I believe this depends upon you having the Slide Realm as the default authentication mechanism for Slide. This is the default if you have installed the Tomcat bundle.

Adding a user
  1. Connecting

    Using Dav Explorer connect to the WebDAV server. You need to connect to the directory '/slide' as this contains the configuration hirerchy. Thus if you are running the Slide server on the same machine as the client ( Dav Explorer ) you connect to, and use the default admin username and password as 'root, 'root'.

  2. Adding the User

    Under the directory /slide you will find a directory 'users' in which there are already directories for the preconfigured users

    Create a collection under /slide/users with the name of the collection set to the name of the user.'guest' 'john' 'john2' and 'root'. To create another user, in the file menu of DAV Explorer is 'create collection'

    Use this to create a collection under the 'users' directory with the name of the collection set to the username. In this example I am going to create a user with the username 'test'.

    Thus, under the 'users' collection, you should see the new collection 'test'.

    Creating a collection in this directory creates a user within slide.

  3. Setting the password.

    The next step is to set the password for this user.

    Using DAV Explorer select the new collection you have created, in this instance 'test' and open the 'View/Modify Properties' window. From this window you should be able to edit the properties associated with the collection.

    Using the 'Add' button, add a property as follows :

    Tag : password

    Namespace :

    Value: <password>

    For this example I am going to set the password to 'testpassword'. Make sure then to save and check the property is set correctly. They should now appear in the property sheet for the collection.

    The user is now created, but before we can test the logon, we need to give the user access to the system by assigning a role.

  4. Assigning a role.

    You give access to the new user to the directories of slide by adding the user to the list of users allowed in the role. That is you can take the role xml from Domain.xml and add your user in the same format, and save it with property name 'group-member-set' with namespace 'DAV:'

    If you look inside the file Domain.xml, which in the bundled slide is under the slide directory, you will find an XML string defining which users are added to role 'user'.


    <objectnode classname="org.apache.slide.structure.SubjectNode" uri="/roles/user">
    <property name="group-member-set"><![CDATA[<D:href xmlns:D='DAV:'>/users/john</D:href><D:href xmlns:D='DAV:'>/users/john2</D:href><D:href xmlns:D='DAV:'>/users/root</D:href>]]></property>

    We need to take this xml form of the property 'group-member-set', add our user to it and set it as a property of the collection 'user'. In this example I am going to add the new user 'test' to the role 'user'. To do this we open the collection /slide/roles and under there we should find the collection 'user' which corresponds to the role 'user'

    Again in the same way as above, open the properties sheet for this collection, and then add a property as follows :
    Name : group-member-set

    <D:href xmlns:D='DAV:'>/users/test</D:href><D:href xmlns:D='DAV:'>/users/john</D:href><D:href xmlns:D='DAV:'>/users/john2</D:href><D:href xmlns:D='DAV:'>/users/root</D:href>]]>

    The part I have added is '<D:href xmlns:D='DAV:'>/users/test</D:href>' which is highlighted above. It seems a little complicated, and is.

    Check carefully before you save away as when you open the property sheet again, you will not be able to see this value again. Note, that this operation is not cumulative, so if you want to add another user you will need to insert the other users you added and your new user to the original string from Domain.xml. I just save the last value in another property in the 'user' collection.

  5. Testing the logon.

    All should be now correct to test the logon. So close or open another DAV Explorer, this time connecting to and enter the new user details.


Copyright © 1999-2004, Apache Software Foundation