I created a JDBC front end for the 2.1 authentication system which simply retrieves all neccesary information from a configurable JDBC database. Most of the SQL statements are configurable as well. This requires a future version of 2.1 where two methods in WikiDatabase are changed to protected instead of private. The jar file contains both source code and compiled classes.

That would be 2.1.89. Can you please check it's okay? --JanneJalkanen
Silly me, it needs also m_principals to be protected. --Killer

Setup instructions#

Place the jar file into WEB-INF/lib. Add the following lines to your jspwiki.properties (modified to your configuration, of course).
jspwiki.authenticator = net.killeri.jspwiki.JDBCWikiAuthenticator
jspwiki.authenticator.jdbcclass = org.postgresql.Driver
jspwiki.authenticator.jdbcurl = jdbc:postgresql:jspwiki?user=fuubar
jspwiki.authenticator.selectsql = select user_id from person where user_id=? and password=?
jspwiki.userdatabase = net.killeri.jspwiki.JDBCUserDatabase
jspwiki.userdatabase.jdbcclass = org.postgresql.Driver
jspwiki.userdatabase.jdbcurl = jdbc:postgresql:jspwiki?user=fuubar
jspwiki.authorizer = PageAuthorizer

For authorization you need to have a table "role" with fields "role_name" and "user_id" in your database. This too will be configurable in later versions.

Database administration#

The jar file includes a couple of plugins to help with the database administration, namely ChangePasswordPlugin, GroupAddPlugin, GroupConnectPlugin, GroupDisconnectPlugin, and UserAddPlugin. All of these require the WikiFormsPlugin fom Ebu.

Add new attachment

Only authorized users are allowed to upload new attachments.

List of attachments

Kind Attachment Name Size Version Date Modified Author Change note
jdbcauthenticator.jar 34.2 kB 2 02-Dec-2003 10:47 Killer
« This page (revision-20) was last changed on 10-Sep-2006 20:45 by JanneJalkanen