How to setup Authentication in OpenWonderland
Prerequisites
A running Project Wonderland server
• Binary Download [1]
• Built Source [2]
By default both binary version and source comes with a module called 'security-session-noauth', to set up authentication in wonderland server the first step is to replace that module with a authentication support one in this case 'security-session-auth'. The mechanism for doing this vary depending on if you are using binary build or building from source. In both cases you need to replace 'noauth' module with 'auth' module.
In Binary Download
First download a copy of 'security-session-auth' jar file. Now by using module management UI in Open Wonderland server in "http:// example.com:8080//wonderland-web-front/admin?pageURL=/wonderland-web-modules/editor" page remove the module named "security-session-noauth" and replace it by uploading "security-session-auth" module that you downloaded from Open Wonderland Module warehouse. As long as running the same binary version everything will work, but if you download a newer version of binary version you need to do everything above again. Now you can skip the configuration part.
In Source Build
In source build you need to disable the security-session-noauth module and add the security-session-auth module to the list of default modules list. You need to do this by editing build.xml files in the appropriate directories. This assumes you have a directory structure with "wonderland" and "wonderland-modules" as siblings:
<top-dir>
<top-dir>/wonderland
<top-dir>/wonderland-modules
<top-dir>/wonderland-modules/stable
<top-dir>/wonderland-modules/unstable
The first step is to disable security-session-noauth from building. We do this in <top-dir>/wonderland/modules/tools/build.xml, by commenting out the line as shown below:
<filelist dir="${current.dir}" id="all.projects">
<file name="darkstar/build.xml"/>
<file name="security-group/build.xml"/>
<file name="security-session-common/build.xml"/>
<file name="presence-manager/build.xml"/>
The next step is to add security-session-auth to the default packaged jars. We do this in <top-dir>/wonderland-modules/stable/build.xml, by adding the security-session-auth line below:
<target name="-modules-stable-dist-copy-selected" unless="modules.include.all">
<copy todir="dist">
<filelist dir=".">
<file name="orientationworld/dist/orientationworld.jar"/>
<file name="pdfviewer/dist/pdfviewer.jar"/>
<file name="telepointer/dist/telepointer.jar"/>
<file name="whiteboard/dist/whiteboard.jar"/>
<file name="image-viewer/dist/imageviewer.jar"/>
<file name="audiorecorder-module/dist/audiorecorder.jar"/>
<file name="stickynote/dist/stickynote.jar"/>
<file name="security-session-auth/dist/security-session-auth.jar"/>
Finally, before we rebuild we need to make sure there are no cached copies of security-session-noauth.jar hanging around. First delete security-session-noauth.jar file in directory ~/wonderland/modules/dist.
Ant
If you are using ant for compiling your source then from the top directory do the following:
% cd wonderland/modules/tools/security-session-noauth
% ant clean
NetBeans IDE
If you are using NetBenas IDE for developing then by using open project tool in NetBeans open the security-session-noauth module as a project and use clean tool for deleting cached copies of security-session-noauth module.