[foaf-protocols] Scala, OSGi implementation of foaf+ssl in Clerezza

Henry Story henry.story at gmail.com
Tue Jun 29 17:28:45 CEST 2010


   Reto implemented an version of foaf+ssl in the OSGi based, RDF powered, apache Clerezza Content Management system. 


To get it to work, do the following

1. check it out
   $ svn co http://svn.apache.org/repos/asf/incubator/clerezza/trunk/org.apache.clerezza.parent

2. compile it with mvn (>=2.2.1)

   $ mvn clean install -Dmaven.test.skip=true

   # -Dmaven.test.skip=true to skip the tests because some of them don't work
   # I commented out the uima module in the pom as at revision 958920 it did not work
   # add -o to avoid redownloading maven bundles if you allready have downloaded them the first time

3. create a key for the machine you are running this on, which you need to place in .keystore
   So if this is going to be run on localhost then you need the Distinguished name to be localhost

   $ keytool -keystore keystore -alias jetty -genkey -keyalg RSA -keysize 2048
   $ mv keystore ~/.keystore # of course if you already have one, then watch out here

4. start it
   $ cd org.apache.clerezza.platform.launcher.tdb/target
   $ java -Dorg.wymiwyg.jetty.httpservice.clientauth=want -Dorg.osgi.service.http.secure.enabled=true -jar org.apache.clerezza.platform.launcher.tdb-0.5-incubating-SNAPSHOT.jar
   # you will end up in a command line interface where you can send a number of commands such as
   -> help
   # don't cntr-Z (background) this on OSX, as for some reason the command line interface 
   # then no longer works

5. try it out

  - you should have an http server at http://localhost:8080/
  - you can try logging in with your (non RDFa backed) Web ID at https://localhost:8443/dashboard
6. build RDFa support

   use the OSGi enabled module I put together at http://github.com/bblfish/java-rdfa

   $ git clone git://github.com/bblfish/java-rdfa.git
   $ cd java-rdfa
7. install RDFa support

  In the clerezza shell type

  -> start mvn:net.rootdev/java-rdfa-core/0.5-SNAPSHOT
  -> start mvn:net.rootdev/java-rdfa-clerezza/0.5-SNAPSHOT

  It should work now with IDs created with http://webid.myxwiki.org/


  The RDFA parsers rely on nu.validator.htmlparser.common and some other packages which are not OSGi enabled yet. Reto is currently working on improving the access control framework to allow us to create much more flexible access control examples. The Scala code probably has bugs as it is still fresh.


 An interesting thing to note about this foaf+ssl implementation, is that it is written directly into the java ssl layer. This was Reto's idea, and it looks like it could be very helpful, but we still need to test it with more examples to see what the limitations may be.

  But in any case, Clerezza is a very interesting framework, and being a java programmer, I will try to use this to put together my own playground.



More information about the foaf-protocols mailing list