Hi,
We are developing a web application with .NET. I have read some articles
from microsoft, but I am still unclear about how to go about ensuring
security.
1) Do we have to have Database Roles mapped to Database user's to ensure
security?
* if we had one admin account to a specific database and then validated
users from application level security would it be a bad idea?
2) How can we do row level tracking?
i.e: Say we have Table A that can accessed from user A & User B. But User A
can access all records on that while user B can access some records. How do
we achieve that? We figured we need to maintain a Access Matrix table in the
DB.
For example, say like Table A row 3 can be accessed by emp id 1 &2 and
say like Table B row 4 can be accessed by emp id 1.
But this really increases complexity and might bring down performance and
maintainablity as such.
3) If we do role based (i.e: RoleA-> Can access TableA,TableB RoleB->can
access TableC,TableD and there is user1 with ROLEA and user2 with ROLEB) from
sql server how should we map this to the application. Should the application,
pass user name and password and assume that identity, then when a DB call
failed throw back a forrmatted exception to the user. But, then in this
instance application doesn't know pre hand that information. ( I Assume that
there is no way without an admin password applicatioin can query and get user
name/password from SQL server).
So how should we go about it?
Thanks in advance.