Getting Started

Building and Installing

  1. Build it using Maven.
  2. Copy jsm-1.0.1.jar into jboss lib/ext directory.
  3. Modify the jboss.jcml file to add the mbean configuration you need (See below).
  4. Set JBoss to use the custom security modules.
  5. Try it.

Send any comments to josem@talika.org.

LDAP Module Configuration

Edit jboss.jcml and add something like this:

     <mbean code="org.talika.jsm.LDAPSecurityModuleService" 
       name="DefaultDomain:service=LDAPSecurityModule">

     <attribute name="InstanceName">LDAPSecurity</attribute>
     <attribute name="Url">ldap://ldap.talika.org/</attribute>
     <attribute name="BindDN" />

     <attribute name="Password" />
     <attribute name="SearchBase">dc=talika, dc=org</attribute>
     </mbean>

An user in the LDAP tree shold see something like this:

      dn: uid=admin, dc=talika, dc=org
      objectclass: j2eeAccount
      uid: admin
      role: Manager
      role: Operator

Database Module Configuration

Edit jboss.jcml and add something like this:

      <mbean code="org.talika.jsm.DatabaseSecurityModuleService"
        name="DefaultDomain:service=DatabaseSecurityModule">
      <attribute name="InstanceName">DatabaseSecurity</attribute>
      <attribute name="DataSource">DefaultDS</attribute>
      </mbean>

You must have configured DefaultDS or the datasource you want to use.

At the database you should have 2 tables like:

      CREATE TABLE j2ee_users (
        username VARCHAR(256) PRIMARY KEY,
        password VARCHAR(256)
      );

      CREATE TABLE j2ee_roles (
        username VARCHAR(256),
        rolename VARCHAR(256),
        PRIMARY KEY (username, rolename)
      );