Re: User Data Segregation



If done well, wrapping every call so that a session ID is required will do the job and will not cause much of a performance hit--it will be a small, exact-match kind of lookup on hot pages, so nothing too serious. As for the question of guarantees, there are none, at least in SQL Server. Some other DBMSs have row-level security built in, but I wonder if BOA or another financial services firm could win a lawsuit against Oracle if someone sees the wrong data? Probably not--so the only way to really know almost for sure is to:

A) Carefully design and implement the system in order to reduce the possibility of problems architecturally and from the outset

and

B) Test, test, test! Automated unit testing is your friend. Use it early and use it often... If something breaks, you want to find out about it ASAP.

It sounds like you're working on a Web app, so you can encapsulate everything in stored procedures. That's half the battle won right there -- a lot of problems with row-level security schemes come from ad hoc queries and the chance to malform them just right to see some data you're not supposed to. A properly designed stored procedure layer should render that kind of attack impossible.


--

Adam Machanic
SQL Server MVP

Author, "Expert SQL Server 2005 Development"
http://www.apress.com/book/bookDisplay.html?bID=10220



"Aaron" <aaronakin@xxxxxxxxx> wrote in message news:1182882380.027133.128570@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
My company has a web-based application that currently uses one SQL
Server login account to connect to a SQL Server 2005 database. We
have quite a few application-based security controls in place to
ensure that when a user logs into the site, they will only see there
own data and not someone else's, but we would like to beef up our
security.

I've been trying to find out the best way to segregate data..just in
case our application-based security controls failed for any reason.
Since we have hundreds of thousands of web-users who login through the
application, it doesn't seem logical to have a SQL login account for
each one of these users...nor does it seem logical to have views for
each user.

We've considered wrapping every SQL statement from the application in
an object that will pass in the session ID, user ID, etc for
verification, but we haven't worked out the logistics of this, and it
seems like this would cause a performance hit on the database.

I keep wondering how companies such as Bank of America handle data
segregation and ensure that when I login to my online banking account,
that I will NEVER see another customer's bank account info. Would
anyone mind sharing some suggestions please?


.



Relevant Pages

  • Re: Is there any way to prevent hacker trying to guess sa password?
    ... and port 1433 will not be open. ... If someone can crash SQL Server by connecting to port 1433, ... You don't need multiple security experts. ...
    (microsoft.public.sqlserver.security)
  • Re: SQL or Access DB
    ... As far as encryption goes though... ... with Sql Server you can use SQL DMO and encrypt your stored procedures ... installation - Security was absolutely critical and in most instances, ... > then we create a nice gui around this database and sell it to automotive ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Getting to the bottom of MSDE network connection problems ...
    ... Brilliant, Nick, especially the explanation for local network user being ... authenticated as GUEST in WinXP SP2. ... > on a desktop OS like XP (meaning that, you can not compare SQL Server ... > again and selected the security tab. ...
    (microsoft.public.sqlserver.msde)
  • [NT] SQL Extended Procedure Functions Contain Unchecked Buffers
    ... The following security advisory is sent to the securiteam mailing list, and can be found at the SecuriTeam web site: http://www.securiteam.com ... SQL Server 7.0 and 2000 provide extended stored procedures, ... Several of the Microsoft-provided extended stored procedures have been ... Exploiting the flaw could enable an attacker to either cause the SQL ...
    (Securiteam)
  • RE: Login failed for user (null).
    ... used at signon to authenticate in SQL Server. ... connect the remote SQL Server database), is there any other data accessing ... What's the security identity used to access the remote SQL Server, ... the worker process identity. ...
    (microsoft.public.dotnet.framework.aspnet.security)