Provisiong framework

Posted & filed under CLAN, eLearning, Minerva, Sakai, Siva, Software Engineering, Web Services.

With the expected influx of new applications to build our emerging Web2.0 structure, more and more demans will be placed on the existing structural provisioning framework. We’re planning trials of Elgg and Sakai, linked via Shibbleth but the current Just In Time Provisioning (JITP) model doesn’t fit with how tutors use these types of applications. So I’ve published my vision of the next generation provisioning framework for UHI. It utilises SOA, JBI and BPEL among other things.

You can read the document on our Confluence.

Siva2 takes shape

Posted & filed under Siva.

I see Siva2 as being composed of 3 parts:

I can see the Control engine being somehow tied in with Guanxi as only certain users will be allowed to control it. In fact, you don’t want any of the frontend engines to be visible outside UHI, so Guanxi will probably control access to all of them. Of course, the access policies will determine your level of access to each function in each engine.

The Grungwise stuff will have to sit on a Windows machine until Novell come out with the new Java enabled Postoffices but it will be behind a web service, so it can be controlled from the Unix engines. Might even bung Guanxi onto it to control access to the services it offers for Grungewise accounts.

Siva2 is now a Struts application, which saves a lot of time working out the flow, as Struts is superb for keeping you within the MVC framework.

For persistence, Hibernate will probably be bolted on to the backend to save state.

Also, web services for status/control stuff, although this is probably not a priority as the whole shebang is on the web, accessible via any browser but protected by Guanxi.

Struts PlugIn

Posted & filed under Siva.

Siva2 is progressing. I’ve implemented a Struts front end, where a Bootstrap PlugIn initialises things and stores a controller for JSPs to use. Got some funny behaviour from the PlugIn though, which a quick trip into log4j land shed some light on.

Consider the following PlugIn from struts-config.xml:

<plug-in className=”org.Siva.Core.Bootstrap”>
  <set-property property=”logFile” value=”/WWW/siva/WEB-INF/logs/bootstrap.log” />
  <set-property property=”configFile” value=”/WEB-INF/config/siva.xml” />
</plug-in>

Now, there are two bean type methods to be called on the Bootstrap class by struts:

setLogFile(String)
setConfigFile(String)

now, I know I should just set the logfile in the config file but I’m doing this to illustrate the order of calling the PlugIn methods.

It seems that struts will call the methods in the Bootstrap.class in the following order:

i.e. in the reverse order in which they appear in struts-config.xml and where init() of course is the standard PlugIn::init()

So, if you plan on logging from the bean setter methods, you’ll have to do some jiggery pokery ordering in struts-config.xml but that’s a bad idea. Best to let the setters do their work and do all config/initialisation in init

LDAP funnies

Posted & filed under Siva.

Seems that the userPassword attribute in Novell NDS is case sensitive. Adding, for example, “firstname”, NDS transforms this to “firstName” when the account is created but setting the password with “userpassword” fails with the error:

NDS error: no such entry (-601)

Although the account does get created, it’s not authenticable as you just get the error:

16 : No such attribute

as userPassword hasn’t been set correctly. Seems that NDS doesn’t transform “userpassword” to “userPassword”

LDAP authentication

Posted & filed under Siva.

I’ve been playing around with LDAP authentication inside the Bodington VLE, which we use as CLAN. Sometimes it can seem to take ages to let you in. So, I made 3 enhancements to the code, one which was staring me in the face all the time and the other two a bit less obvious to the un-coffeed and pizza-less :)

So, hopefully, these little changes will make a big difference, especially at times of high network load, when the traffic to the server can be kept to a minimum

ActiveDirectory woes

Posted & filed under Siva.

Siva can handle creating users and, if AD is set up correctly, their home directories. It all works nicely. However, AD states that you can’t set a user’s password at creation time, you have to go back in and modify it. Also, it’s not as easy as Novell, where you can just connect using plain text and set the password. Well, you can set the password at creation time on Novell eDirectory, so you don’t have to worry about going back in to change it.
In AD, you have to connect over SSL, using a root certificate issued by the server and the password must be quoted and Base64 encoded into the bargain. That’s some amount of security considering it’s Microsoft!
Normally this wouldn’t be a problem but we’re talking about Microsoft here and there’s a bug that stops this dead in it’s tracks:
JNDI fails to work for AD
The same code that works on Novell, to connect and bind, fails on AD. Sheesh, what does a man have to do get open source to talk to Microsoft products?
You can see what’s happening in the dump:

Thread-2, WRITE: SSLv2 client hello message, length = 98
Thread-2, received EOFException: error
Thread-2, handling exception: javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake
Thread-2, SEND TLSv1 ALERT: fatal, description = handshake_failure
Thread-2, WRITE: TLSv1 Alert, length = 2
Thread-2, called closeSocket()
main, handling exception: javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake
Thread-1, called close()
Thread-1, called closeInternal(true)

AD gets a hello message during a handshake and it blows up.
I don’t hold out much hope for the fix that Microsoft recommond on the AD side as one of the admins has tried it apparently and it’s still not working.

XML Schemas Produced

Posted & filed under Siva.

Most of the LDAP and Novell funtionality of SivaUtils is controlled by XML. I’ve now created schema documents for all the XML documents that LDAP and Novell accept. You can see them here
Had to upgrade to Xerces 2.6.2 to get the JAXP 1.2 validation features.

Welcome to the Siva weblog

Posted & filed under Siva.

Welcome to the Siva weblog

Just started the Siva weblog.
Over the past month I’ve being converting the first iteration to a Java toolkit. The first version was exploratory, involving much running about and coding while my backside was in flames!
Took a load of research to find out what was supported in the way of remote programmatic account maintenance on Novell systems such as NDS and Groupwise.
Most CNA/CNE folk you speak to only know about the API gateway on groupwise and Console1 on NDS so it’s a hoot trying shoehorn LDAP and NDAP into the system, not to mention COM. A veritable soup of interesting technologies and in the case of COM, completely undocumented! Loads of strong coffee, a copy of dumpbin.exe and a Novell header file. Luvvly Jubbly!
Anyway, there’s now a sourceforge site, ready and waiting for the code and javadocs.
Almost finished the docs and I’m just turfing out some remnants of v1.0 which are going to be replaced by configurable XML/XSLT for the account definitions.
Next job is to think long and hard about the extension interfaces – how best to allow folk to contribute and add their own handler classes to interface with exotic systems we’ve never heard of.
The Guanxi project will make use of Siva to interface with Attribute Stores in the Shibboleth protocol and in fact, Guanxi will be adding shibboleth extensions to Siva.