28.06.2013 Views

Papers in PDF format

Papers in PDF format

Papers in PDF format

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Every time a user tries to access a Web page <strong>in</strong> a secure database application, that user should be<br />

authenticated. The secure loop is a method to verify the user at every such access.<br />

In the follow<strong>in</strong>g discussion, we assume that the connection between the client and the server is secured us<strong>in</strong>g<br />

some protocol like Secure-HTTP (S-HTTP) [Rescoria 1996]. Discussion of the purpose and implementation of<br />

such security measures can be found <strong>in</strong> [Netscape 1996b].<br />

3.1 Necessary Database Tables<br />

The secure loop requires a mechanism to ma<strong>in</strong>ta<strong>in</strong> the list of authorized users and a set of special values,<br />

called “tickets,” used to associate a user with a specific set of screens they can access at a given time. Our<br />

implementation uses two relational database tables for this purpose: AuthUsers and Ticket.<br />

The purpose of the table AuthUsers is to hold the list of authorized users, their passwords, and other<br />

<strong>in</strong><strong>format</strong>ion that could be useful to the application adm<strong>in</strong>istrators. The purpose of the table Ticket is to hold<br />

the set of tickets that are valid for a specific user. It has at least three columns: Username, TicketValue, and<br />

TimeStamp. Username uniquely associates a set of ticket values with a user. The tickets held <strong>in</strong> TicketValue<br />

are random numbers generated at every Web access (see [Description of the Security Loop]). Ticket creation<br />

times are kept <strong>in</strong> the column TimeStamp so that they can become <strong>in</strong>valid after a specific amount of time.<br />

3.2 Description of the Security Loop<br />

[Fig. 2] displays the general <strong>in</strong>teraction between the user, the Web server, and the scripts that process form<br />

data. The boxes <strong>in</strong> the shaded area represent actions that are done by all CGI scripts with<strong>in</strong> the secure loop and<br />

can therefore be encapsulated <strong>in</strong> a library common to all of these scripts.<br />

3.2.1 Initial Authorization<br />

In our implementation, every user is given a password grant<strong>in</strong>g them access to the database. This password is<br />

encrypted and recorded <strong>in</strong>to the AuthUsers table. When start<strong>in</strong>g a database session, the first form the user<br />

encounters is a log<strong>in</strong> screen. When the log<strong>in</strong> form is completed, the encrypted password is compared with the<br />

AuthUsers table for that username. If the passwords match, the user is granted access to the application, a<br />

random ticket is generated, and the user enters the secure loop. Otherwise, an error message is displayed.<br />

3.2.2 Inside the Secure Loop<br />

Every CGI script <strong>in</strong> the secure loop uses the follow<strong>in</strong>g procedure:<br />

1. Check Ticket <strong>in</strong> Database: The script parses the command l<strong>in</strong>e extract<strong>in</strong>g the username and ticket. It then<br />

executes a database query to ensure that the ticket is valid for the given username. If the ticket is valid,<br />

then the user is authorized to cont<strong>in</strong>ue. Otherwise, an appropriate error message is given.<br />

2. Process Form Data (if applicable): This is where the process<strong>in</strong>g of the form data can be done safely. This<br />

could <strong>in</strong>volve execut<strong>in</strong>g a query, updat<strong>in</strong>g tables <strong>in</strong> the database, or the like.<br />

3. Generate Dest<strong>in</strong>ation Ticket: A random ticket is generated, entered <strong>in</strong>to the database and appended with the<br />

username to any outgo<strong>in</strong>g l<strong>in</strong>k of the page created <strong>in</strong> step 4. S<strong>in</strong>ce the ticket is random and the l<strong>in</strong>k<br />

between client and server is secured, only the client and server know this ticket.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!