Installation

From Kasai documentation

You must perform the following steps before using Kasai in your application, note that you should integrate and/or adapt this procedure according to your environment.

After completion you may want to try out the bundled web administrative console, see Installing the administrative web application for details.

Contents

[edit] Software requirements

Kasai has been developed and tested with MySQL 4.0.x (or greater) and Sun Java 2 SDK 1.4.x (or greater). Note however that no MySQL or Sun's JVM specific functionality is used and therefore Kasai should work on most DBMS for which a JDBC driver is available and on any 1.4 compliant JVM. Please feel free to send us feedback if you deploy Kasai successfully on other environments.

[edit] Creating the database

Kasai needs a defined set of tables within a relational database, where it stores users, groups, permission, auditing and more information. This tables can be created within a specific database, created exclusively for Kasai tables, or more tipically within the database used by the application that uses Kasai. Using MySQL under a Unix environment, issue the following command to create Kasai tables:

$ mysql -p -u <user> <database> < mysql-kasai.sql

The mysql-kasai.sql script is provided with the binary distribution and is also available from CVS.

[edit] Adding Kasai to your CLASSPATH

Wether you're deploying a stand-alone application, or a web based system, if you use Kasai you must make sure that kasai-x.x.x.jar is in your classpath. Depending on the usage scenario you could perform one of the following actions:

  • Add kasai-x.x.x.jar to the WEB-INF/lib folder of your WAR distribution.
  • Add kasai-x.x.x.jar to the shared library folder of your web application server.
  • Add kasai-x.x.x.jar full path to the CLASSPATH environment variable.

[edit] Configuring Kasai

Kasai is configured through a Java properties file. By default this file is read from any folder in the classpath using the name org/manentia/kasai/Config.properties. Alternatively you can use another file containing at least the required Kasai parameters, a recommended configuration is to include Kasai's parameters in your application properties file, therefore minimizing your setup complexity.

The next table describes all available parameters, note that you can leave most of them with their default provided value.

Key Possible values/sample Description

[edit] Auditing

kasai.audit.enabled yes, no Sets whether transactions should be audited to the database or not

[edit] Kasai database

db.kasai.driver com.mysql.jdbc.Driver JDBC driver classname used to connect to the database
db.kasai.url jdbc:mysql://myserver/kasai Database connection URL
db.kasai.user root Database connection user name
db.kasai.password trustno1 Database connection password
db.kasai.engine mysql, sqlserver, pgsql Database type
db.kasai.maxActiveConnections 10 Max active connections to the database
db.kasai.maxIdleConnections 5 Max idle connections to the database
db.kasai.maxWait 40000 Max time (in milliseconds) to wait for a connection

[edit] Authentication

auth.service org.koala.kasai.services.RDBMSAuthService Fully qualified class name that implements the service used to authenticate users.
kasai.rdbms.driver com.mysql.jdbc.Driver JDBC driver classname used to connect to the user/password database (only applies if RDBMSAuthService is used)
kasai.rdbms.url jdbc:mysql://myserver/kasai Authentication database URL (only applies if RDBMSAuthService is used)
kasai.rdbms.user root Authentication database user name (only applies if RDBMSAuthService is used)
kasai.rdbms.password trustno1 Authentication database password (only applies if RDBMSAuthService is used)
kasai.rdbms.randomPassword.length 8 Length of randomly generated passwords (only applies if RDBMSAuthService is used)
kasai.rdbms.encryptorStrength cleartext, basic or strong Hashing algorithm used to store passwords, strong is highly recommended (only applies if RDBMSAuthService is used)
kasai.rdbms.table kasai_users Name of the table used to store users and passwords (only applies if RDBMSAuthService is used)
kasai.rdbms.usernameField id Table field used to store user names (only applies if RDBMSAuthService is used)
kasai.rdbms.passwordField password Table field used to store passwords (only applies if RDBMSAuthService is used)
kasai.win32.domain myDomain Domain name used for authentication (only applies if Win32AuthService is used)
kasai.win32.domainController myPDC Host name or address of the domain controller to use for authentication (only applies if Win32AuthService is used)

[edit] Authorization

kasai.group.all Everyone Name of the system-managed users group that contains all users.
kasai.default.role 1 Role assigned to a user when he/she creates a new object.

[edit] Logging

configure.log.file /var/log/kasai-log.properties Logging configuration file path (in log4j format)

[edit] Web administration

page.debug 1, 0 1=print stack trace error on page, 0=print only error message
lists.rowsPerPage 40 Maximum number of rows per page
lists.maxTotalRows 800 Maximum number of total rows returned to web page

[edit] Mail settings

mail.from security@mycompany.com Account from which to send emails
mail.replyTo security@mycompany.com Reply-to for system sent emails
mail.smtp.host mail.mycompany.com SMTP host name or address
mail.smtp.user jhondoe SMTP server username
mail.smtp.password trustno1 SMTP server password

[edit] Password validation

passwords.validators org.manentia.kasai.user.passwordvalidators.LengthPasswordValidator, ... Fully qualified class names of password validators that must be applied
lengthPasswordValidator.minLength 6 Minimum password lenght accepted (only applicable if LengthPasswordValidator is used)
differentCharactersPasswordValidator.minNumeric 2 Minimum quantity of numbers that each password must contain (only applicable if DifferentCharactersPasswordValidator is used)
differentCharactersPasswordValidator.minAlpha 2 Minimum quantity of letters that each password must contain (only applicable if DifferentCharactersPasswordValidator is used)
differentCharactersPasswordValidator.minOther 2 Minimum quantity of symbols that each password must contain (only applicable if DifferentCharactersPasswordValidator is used)
Personal tools
Navigation