Session Management in a web application.

When creating a web application it is desirable to have only one time authentication. Once the user is authenticated he should be able to use the applications on the server. To achieve this functionality session management is used. The session tool creates a session and keeps it alive for a certain amount of time. It is similar to a UNIX log in session. Once a user logs into a unix machine they have rights to execute certain programs and view certain data. The session ends when they log out. Onle once does the user authenticate themselves. UNIX uses a program called login to manage the session. For web applications the ITLab uses a python session tool.

The Session Tool

Example code:
$session_id = `/usr/local/itlab/bin/session.py -f open -t 15`;
`echo $colleague_id | /usr/local/itlab/bin/session.py -f write -i $session_id -n colleague_id`;
`echo $username | /usr/local/itlab/bin/session.py -f write -i $session_id -n username`;
This block of perl code executes the session tool and saves the session id to a variable. It then stores information (colleague_id and username). This information can be retrieved later with the following code: