Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > asp application security

Reply
Thread Tools

asp application security

 
 
Bryan Harrington
Guest
Posts: n/a
 
      05-07-2004
A little background first.. I'm working from home.. no real team to bounce
ideas off of, so you guys are it.

I'm working on an app SQL2k / ASP Classic, the quick and dirty is there is a
"worklist" of items for users to fix items so that the bill can be payed,
and there are also a series of reports. All items are grouped into 1 of 12
categories. Users are members of one of those 12 groups (categories).

A users worklist can be "filtered" by an admin based on location, bill
amount, first letter of payee's last name etc. Individual report access is
also limited based on user rights.

So.. how to maintain user security. A couple of ideas..

When a user logs in.. put a bunch of stuff into session variables that I can
then access as needed.

Second idea is to put just the logged in userID into a session variable, and
then call an SP or a function to check security as needed.

Third idea is to load up an array on login, stuff it on the session, call a
function on the page(s) as needed to check for appropriate rights

Last.. stuff some security info into a user specific Application var, and
call that as needed.. and then kill it on logout

Thanks for reading.. any thoughts on which may work better? Or a better
solution perhaps?

Thanks!


 
Reply With Quote
 
 
 
 
Tim M
Guest
Posts: n/a
 
      05-09-2004
The way I'd do it is to put the user's ID in a session variable when they log in. You may also want to assign an access level (eg 1 for system admin, ... 3 normal user, .... 5 read only), as a session variable also. You'd probably want to relate userIDs to categories if they are one-one. Then create a page or function that defines business/accesss rules for each user. This function can then be called each time a transaction is requested. Depending on the transaction requested, the userID, and user access level the function would return true or false. If true the transaction is performed. If false it is denied

Its often hard to get users to logout. However, the server session timeout (normally about 20 minutes) will end the session and clear the session variables automatically.

Hope this helps.
 
Reply With Quote
 
 
 
 
Bullschmidt
Guest
Posts: n/a
 
      05-11-2004
Perhaps have a login page that asks the user for his username and
password. And whatever page that posts to (which could be the same page
for a self posting form) tests these fields against what is in the
database, sets the username and userlevel session variables accordingly,
and then redirects to the proper page - i.e. back to the login page if
the password is wrong (perhaps with a JavaScript popup saying wrong
username/password combination) or to the main menu page if the password
is correct:

Session("UserName") = objRS("UserName")
Session("UserLevel") = objRS("UserLevel")
Response.Redirect "mainmenu.asp"

Then you can use If Then's or Select Case on each page to control
whether a user is allowed to actually be there and whether particular
links of where a user can go actually show up.

If (Session("UserLevel") <> "Admin") And (Session("UserLevel") <>
"Regular") Then
Response.Redirect "login.asp"
End If

Best regards,
J. Paul Schmidt, Freelance ASP Web Consultant
http://www.Bullschmidt.com
ASP Design Tips, ASP Web Database Demo, Free ASP Bar Chart Tool...


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Going from anonymous security to Windows Security in an ASP.NET application Michael Randrup ASP .Net Security 3 03-27-2006 09:18 PM
Re: Calling a WS-Security web-service from ASP Application via ASP.NET or .NET Class using interop Patrick ASP .Net 2 10-01-2004 12:52 AM
Setting up ASP not ASP.NET security on Web Application Jeremy Smith ASP General 1 08-06-2004 01:22 AM
Design Issue: Separating Application Security Model from the Application (Custom or User) Controls Earl Teigrob ASP .Net 3 06-10-2004 01:56 AM
IT-Security, Security, e-security COMSOLIT Messmer Computer Support 0 09-05-2003 08:34 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57