In Apache Geronimo, all login modules are in the package org.apache.geronimo.security.realm.providers. The following list shows the available login modules:

PropertiesFileLoginModule

The PropertiesFileLoginModule module keeps user and group databases in property file format.

class = org.apache.geronimo.security.realm.providers.PropertiesFileLoginModule;
Options:

These URIs are server-relative and resolved by the Geronimo components.

<gbean name="properties-login" class="org.apache.geronimo.security.jaas.LoginModuleGBean">
        <attribute name="loginModuleClass">org.apache.geronimo.security.realm.providers.PropertiesFileLoginModule</attribute>
        <attribute name="serverSide">true</attribute>
        <attribute name="options">
            usersURI=var/security/users.properties
            groupsURI=var/security/groups.properties
        </attribute>
        <attribute name="loginDomainName">geronimo-properties-realm</attribute>
</gbean>

Back to Top

SQLLoginModule

This login module authenticates a user against relational database.

class = org.apache.geronimo.security.realm.providers.SQLLoginModule
Options:

<gbean name="sql-login"
        class="org.apache.geronimo.security.jaas.LoginModuleGBean">
        <attribute name="loginModuleClass">org.apache.geronimo.security.realm.providers.SQLLoginModule</attribute>
        <attribute name="serverSide">true</attribute>
        <attribute name="options">
                dataSourceName=SystemDatasource
                dataSourceApplication=null
                userSelect=select user, password from user where user=?
                groupSelect=select user, group from groups where user=?
        </attribute>
</gbean>

Back to Top

LDAPLoginModule

This module keeps user and group information in the LDAP directory. See the Configuring LDAP article for the complete LDAP deployment working example.

Tip: The key to working with the LDAP module is: KNOW YOUR LDAP SCHEMA.

class = org.apache.geronimo.security.realm.providers.LDAPLoginModule
Options:

<gbean name="ldap-login"
        class="org.apache.geronimo.security.jaas.LoginModuleGBean">
        <attribute name="loginModuleClass">org.apache.geronimo.security.realm.providers.LDAPLoginModule</attribute>
        <attribute name="serverSide">true</attribute>
        <attribute name="options">
                initialContextFactory=com.sun.jndi.ldap.LdapCtxFactory
                connectionURL=ldap://localhost:1389
                connectionUsername=uid=admin,ou=system
                connectionPassword=secret
                connectionProtocol=
                authentication=simple
                userBase=ou=users,ou=system
                userSearchMatching=uid={0}
                userSearchSubtree=false
                roleBase=ou=groups,ou=system
                roleName=cn
                roleSearchMatching=(uniqueMember={0})
                roleSearchSubtree=false
                userRoleName=
        </attribute>
        <attribute name="loginDomainName">ldap-realm</attribute>
</gbean>

Back to Top