Hitachi

uCosminexus Application Server Security Management Guide


5.3.5 WebPasswordJDBCLoginModule

WebPasswordJDBCLoginModule is the login module used when the database is already used for user management.

It uses the entered user ID and password to retrieve the password from the user information stored in the database.

To use this module, specify the definition to connect to the database and the SQL used to retrieve entries (SELECT statement) in ua.conf (the integrated user management configuration file).

WebPasswordJDBCLoginModule reads this file, obtains the user ID from HttpServletRequest, uses JDBC to access to the database and search for the password, and then uses the password to perform password authentication. The following figure shows an overview of WebPasswordJDBCLoginModule.

Figure 5‒15: Overview of WebPasswordJDBCLoginModule

[Figure]

In addition, WebPasswordJDBCLoginModule references the JDBC driver classes in the login module. The available JDBC drivers and the procedures to set up the JDBC driver are as follows.

Organization of this subsection

(1) Available JDBC drivers

The following table lists the databases and JDBC drivers used by WebPasswordJDBCLoginModule.

Table 5‒7: Databases and JDBC drivers used by WebPasswordJDBCLoginModule

Database

JDBC driver

HiRDB#

HiRDB Type4 JDBC Driver

Oracle

Oracle 11g

Oracle JDBC Thin Driver

SQL Server

SQL Server JDBC Driver

#: Includes HiRDB Run Time

(2) Procedures to set up the JDBC driver

Set the JDBC driver class in ua.conf (the integrated user management configuration file). Store the JDBC driver in any directory, and then add that directory to the J2EE server class path. The setup procedures are as follows:

  1. Enter the following items in ua.conf (the integrated user management configuration file).

    • The JDBC driver class name that corresponds to the used JDBC driver

    • The database and the URL to connect to that database

    • Delegate database users and their passwords

    The setup examples for databases are as follows: Replace the bold letters with the appropriate ones depending on the database environment.

    HiRDB:

    com.cosminexus.admin.auth.jdbc.driver.0=JP.co.Hitachi.soft.HiRDB.JDBC.HiRDBDriver

    com.cosminexus.admin.auth.jdbc.conn.url.0=jdbc:hitachi:hirdb://DBID=22200,DBHOST=hostA

    com.cosminexus.admin.auth.jdbc.conn.user.0=system

    com.cosminexus.admin.auth.jdbc.conn.password.0=userpass

    Oracle:

    com.cosminexus.admin.auth.jdbc.driver.0=oracle.jdbc.OracleDriver

    com.cosminexus.admin.auth.jdbc.conn.url.0=jdbc:oracle:thin:@localhost:1521:orcl

    com.cosminexus.admin.auth.jdbc.conn.user.0=system

    com.cosminexus.admin.auth.jdbc.conn.password.0=userpass

    SQL Server:

    com.cosminexus.admin.auth.jdbc.driver.0=com.microsoft.sqlserver.jdbc.SQLServerDriver

    com.cosminexus.admin.auth.jdbc.conn.url.0=jdbc:sqlserver://localhost:1433;DatabaseName=sqlserver

    com.cosminexus.admin.auth.jdbc.conn.user.0=system

    com.cosminexus.admin.auth.jdbc.conn.password.0=userpass

  2. Store the JDBC driver JAR file in any directory of the machine running the J2EE server.

  3. Enter the path of the JAR file stored in Step 2 in usrconf.cfg (the option definition file) of the J2EE server.

    The setup example is as follows:

    add.class.path=directory stored in Step 2/JAR file name

    Note that the JAR file name depends on the database to be connected.

(3) Notes