Master of Computer Science - University of Grenoble


Aspect-Oriented Programming / AspectJ

Contact : Sara Bouchenak, Sara.Bouchenak@imag.fr


TP 4: Authentication

1. Objective

Design and implement application user authentication with AOP/AspectJ.

2. Software environment

If not already installed, install the following software:

If not already defined, define the following environment variables:

Examples for defining such variables are given in the file named env-tcsh for Unix/tcsh (run: source env-tcsh), and in the file named env-win.bat for Windows (run: env-win.bat).

3. Original banking application

Download the application code.

The banking application is available in TP4/Basic/:

Configure the database:

Compile and run the application:

4. Hand-coded security of banking application

As an example, TP4/Authentication_HandCoded/ contains a "hand-coded" version of the banking application extended with security and authentication features using the JAAS Java library.

More details on JAAS are given in http://java.sun.com/products/jaas/ and http://java.sun.com/security/jaas/doc/api.html.

The hand-coded version of the application is organized as follows:

Compile and run the application:

5. Description of work

Implement user authentication using AspectJ in the TP4/Authentication_Aspects/ directory, by writing an aspect in TP4/Authentication_Aspects/aspects/authentication/AuthAspect.java

5. Combine logging and security aspects

Combine the Logging aspect implemented in TP2 and Security aspect implemented in TP4, and automatically include both to the banking application.

Do not modify the aspects' code, neither the application code.