June 8, 2004 at 10:03 am
2) User enters username/password
3) User details checked against SQL Server 2000 "logon" table, which holds, for each user:
b. ASPPassword - the password the user enters into the logon page.
c. DBUserName - the username the ASP page supplies as part of the database connection string.
d. DBPassword - the password the ASP page supplies as part of the database connection string.
b. sUserName = DBUserName (from the logon table)
b. sPassword = DBPassword (from the logon table)
June 8, 2004 at 11:10 am
This will work as long as session vars don't kill you.
Asfar as user information, I don't see anything listed to help prevent access there?
We used to oly allow access through views, which joined each row by it's PK to a table that had the PK and the userid. Admin overhead, but worked well for security.
June 9, 2004 at 2:06 am
Asfar as user information, I don't see anything listed to help prevent access there?
What do you mean by this?
We used to oly allow access through views, which joined each row by it's PK to a table that had the PK and the userid. Admin overhead, but worked well for security.
So how do you do it now?
Do you think that I should do it differently?
BTW - Thanks for your quick response!
June 9, 2004 at 5:52 am
I created a very similar application not too long ago. To avoid excess administration I did not create database level logins, partly because some users logging into the application had privileges to add additional users to their extranet group. There was one login to the database used and all content was secured by lookup tables that contained access rights. There was actually no content stored on the file system as all sensitive data was stored as blob's or varchars with lookup tables to control additional levels of access and rights. Session variables were used sparingly, and the only information I kept in session was their name for some tailoring, their companyID for group rights and an admin variable for additional privileges. The app was further customized to allow for full administrative and CMS maintenance by marketing and by utilizing my security model, there was full exposure to all logins and associated content. This was especially beneficial considering our distributed administrative model.
Performance was excellent even when there was 100 + concurrent users.
Once the application was created, IT had little involvement with the day to day maintenance. Interestingly enough MS implemented a similar model of content and administrative rights with their new portal products.
June 9, 2004 at 7:52 am
I say used to because I don't work for that company any more. AFAIK, they still do it that way. I mentioned it because you say you want to use Views, but don't mention details. You oculd do:
create view companya_data
as select * from datatable where company = 'companya'
etc.
which works, but it lacks some flexibility that will come back to bite you.
We did the following:
Datatable
company data1 data2
--------- ------- --------
a sda adas
a asdasd asdsada
b asdsa asdsadas
c adsasd asdads
Then have a join table for security
User company
----- -----------
bob a
bob b
Sam c
Joe b
If you use a view that joins these on company
create myview as select a.*,b.user from datatable a inner join usertable b on a.company=b.company
then you always select from the view qualifying it with the current user, say Bob, "select * from myview where user = 'bob'", you will get company A and B data. Sam only sees company c data, Joe only B.
June 10, 2004 at 4:41 am
thanx - that's great advice. I think I'll do it you way!
June 10, 2004 at 10:35 am
just my 2 pennies,
you said you were using asp. Have you thought of asp.net? they have a very easy to implement Forms Authentication that allows your user once logged in to have an Authentication cookie. That means you do not have to chase around the data and pass it from page to page. Also, they have a method for moving your session variables to the sql server so that you can scale more easily if you need to.
tal mcmahon
June 10, 2004 at 10:38 am
yep - i am going to use (and learn at the same time) .net for subsequent extranet applications. the main reason for sticking with asp is that I'm going to cobble lots of it together from an existing intranet app.
Just me being lazy!!
Viewing 8 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply