Alfresco Subsystems – A Breath of Fresh Air

Posted by on January 19, 2010

One of my favorite new features of Alfresco 3.2 is the concept of subsystems. Alfresco defines a subsystem as:

A configurable module responsible for a sub-part of Alfresco functionality. Typically, a subsystem wraps an optional functional area such as IMAP binding, or one with several alternative implementations, such as authentication.

In essence it’s like having mini child servers, each with its own Spring application context which makes configurability a lot more intuitive.

My first encounter with Alfresco’s subsystems was due to an AWPr jira issue that someone raised saying that STAr doesn’t work with Alfresco 3.2 because they “changed” the way authentication components are chained. To be honest my first reaction was “Oh no! More re-factoring!”. But then when I looked into how the Authentication Subsystem works it was clear that this new direction is better and allows for easier extensibility.

Remember how painful it was to chaining multiple LDAPs? Now it’s as simple as adding the following to your global properties file:

authentication.chain=ldap1:ldap,ldap2:ldap

then you create the following file/folder structure:

$TOMCAT_HOME/shared/classes/alfresco/extension/subsystems/
Authentication/ldap/ldap1/ldap-authentication.properties

and

$TOMCAT_HOME/shared/classes/alfresco/extension/subsystems/
Authentication/ldap/ldap2/ldap-authentication.properties

So what about custom authentication components like STAr? Piece of cake. All that needs to be done is create the following file/folder structure:

$TOMCAT_HOME/shared/classes/alfresco/extension/subsystems/
Authentication/star/star-authentication-context.xml

star-authentication-context.xml would basically contain the definition of the authentication component and authentication service with very minor differences from what it looked like in Alfresco 3.1. I documented the exact syntax on STAr’s wiki page.

The final step would be to modify alfresco-global.properties to add STAr to the authentication chain like so:

authentication.chain=alfrescoNtlm1:alfrescoNtlm,star1:star

It seems though that Alfresco 3.2r2 has a bug where it doesn’t pick up authentication subsystem entries from the extension folder on the shared classpath. So I had to release a new version of STAr (1.2.0) where the -context.xml file is in the STAr AMP and ultimately ends up inside alfresco.war. When Alfresco fixes this bug then STAr 1.1.0 will be sufficient.

To learn more about Alfresco’s subsystems and how to configure authentication components visit the following links:

http://wiki.alfresco.com/wiki/Alfresco_Subsystems
http://wiki.alfresco.com/wiki/Alfresco_Authentication_Subsystems

Trackbacks

Trackbacks are closed.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>