#60 Configuration table

1.1 release
André Pestana

Create a Configuration table to store any configuration that jGuard can need. It's needed when you create a loginModule to verify if the password has expired for example. If the expiration time is parameterized it must be stored in any place to be easily used.

The most important is that it should be available in jGuard API also.

This table could be a "property" table like jg_credential:

CREATE TABLE jg_configuration (
id int(10) unsigned not null auto_increment,
property varchar(255) NOT NULL,
value varchar(255) NULL,
primary key (id));

*definition for MySQL


  • Charles Lescot
    Charles Lescot

    Logged In: YES
    Originator: NO

    an analog feature is already shipped in jGuard with an XML file backend entitled "jguardconfiguration.xml".

    here are few tips to implement this feature with a database backend:

    informations needed to be present are actually loaded as a Map of parameters in the XML file (with the AuthenticationHelper class).
    the work is to build this Map of parameters with a database backend.
    => AuthenticationHelper need to be refined to support multiple backends.
    an exemple can be viewed (used in webapp) in the net.sf.jguard.jee.listeners.ContextListener class (initAuthentication method).

    again, AuthenticationHelper is used to build an AuthenticationManager implementation(initAuthentication method) with a javax.security.auth.login.Configuration (from the JDK) subclass called net.sf.jguard.core.authentication.configuration.jGuardConfiguration which is the 'Authentication kernel' in JAAS, and with the Map of authentication parameters.

    hope it helps to implements this feature,