Alfresco custom JDBC authentication addon

 

What is Alfresco custom JDBC authenticator addon ?

Alfresco custom JDBC authenticator addon provides an out of the box authentication subsystem able to login against a custom table of users storaged in a relational table of a custom application.

It is designed for users integration between an Alfresco repository and a custom application. You can use it with any type of database (mysql, postgresql, oracle....) with its corresponding jdbc driver and it is fully customizable through authentication properties. You can also use CIFS with this subsystem if your password field is stored in MD4.

How to install it

The installation is tracked via an AMP package. Stop Alfresco, copy the AMP file in ${ALF_HOME}/amps and use ${ALF_HOME}/bin/apply_amps.sh script to install the AMP. Then, copy configuration files to the extension directory to customize and configure the authentication parameters. Once they are configured, restart your Alfresco instance.

How to configure it

In alfresco-global.properties, we can add the new subsystem in the authentication.chain of alfresco-global.properties file.

authentication.chain=alfrescoNtlm1:alfrescoNtlm,myldap:ldap,myjdbc:jdbc

Then we can customize the authentication subsystem with the help of the files

${EXT_ROOT}/subsystems/Authentication/jdbc/myjdbc/jdbc-authentication-context.xml
${EXT_ROOT}/subsystems/Authentication/jdbc/myjdbc/jdbc-authentication.properties

where ${EXT_ROOT} should be something similar to /opt/alfresco4/tomcat/shared/classes/alfresco/extension/

Custom JDBC properties

The custom properties of the addon are (for example):

jdbc.driver=org.gjt.mm.mysql.Driver
jdbc.username=root
jdbc.password=secret
jdbc.name=mydb
jdbc.url=jdbc:mysql://localhost:3306/mydb
jdbc.query=SELECT password FROM myusers WHERE id='{1}'

# Default administrators
jdbc.authentication.defaultAdministratorUserNames=zylk,mysql

# CIFS
# If jdbc.authentication.cifs.active = true set jdbc.authentication.password.type = md4
jdbc.authentication.cifs.active=true

# Password encryption type in DB plain|md5|md4
jdbc.authentication.password.type=md4


Notes

It is important to note that the other CIFS-able subsystems must be deactivated (only one of the subsystems can use CIFS - in fact the first one in the chain). In alfresco-global.properties

alfresco.authentication.authenticateCIFS=false
passthru.authentication.authenticateCIFS=false


Where to find more information

For more information about this addon, please fill zylk.net contact / order form

Links

00

More Blog Entries

0 Comments