Groups | Blog | Home
all groups > sql server new users > october 2006 >

sql server new users : SQL Server Security


Vayse
10/9/2006 12:00:00 AM
Hi
I am in the process of writing some SQL based reports.
The will be around 3 groups of reports. The setup will be
Group 1 will be viewable by all staff.
Group 2 will be viewable by managers, and above. Some accounts staff may
also require access.
Group 3 will be only viewable by the board of directors
More than likely, the reports will be distributed as 3 separate
applications.

These reports will be used in my company only. I don't know much about SQL
security, so I'm looking for some advice.
I see two ways of doing this:
1) Set up 3 users in SQL Server - Group1User, Group2User, Group3User. When
the application launches, have the user enter a password for the
application.
The App then logs into SQL Server, using the GroupXUser logon.

2) Set up each user in SQL Server. While I can use a Windows group for the
Group 1 reports, I will need to specify individual users for the Group 2
reports.

So I'd like some advice about which method I should choose.

Thanks
Vayse

Hilary Cotter
10/9/2006 12:00:00 AM
You would probably want three different sql user accounts as it is easy to
detect the login on the application and use a different view to present the
data.

--
Hilary Cotter
Director of Text Mining and Database Strategy
RelevantNOISE.Com - Dedicated to mining blogs for business intelligence.

This posting is my own and doesn't necessarily represent RelevantNoise's
positions, strategies or opinions.

Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html

Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com



[quoted text, click to view]

Vayse
10/10/2006 5:01:01 PM
Thanks.
When I was checking the help on enabling mixed mode login, I noticed that
Microsoft recommends against it. It doesn't give a reason.
Have you any idea why this is?


[quoted text, click to view]

Arnie Rowland
10/11/2006 12:33:54 AM
It was highly discouraged in SQL Server 2000 since it is not very secure.

However, with SQL Server 2005, SQL Server security is much improved, and may
serve your needs if you don't have all SQL Server users in the AD.

--
Arnie Rowland, Ph.D.
Westwood Consulting, Inc

Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous


[quoted text, click to view]

Sue Hoegemeier
10/11/2006 11:34:09 AM
It's still highly discouraged in SQL Server 2005.
In terms of some of the specific reasons why it's less
secure, those are numerous.
If you use SQL logins, it means you start having passwords
floating around all over the place. Use a sql login for a
command line routine and you pass in a password. Use it for
an app connection, the app has a password out there
somewhere, etc.
In terms of auditing, you don't really know who SQL Login
User is. It's much easier to track windows logins and people
aren't as likely to give out there network login name and
password as they would be with SQL login in password.
You can login using sa when SQL authentication is enabled. A
lot of the hacks against SQL Server involved cracking tools
to break the sa password. I've seen corporate environments
where people who had no business having sa passwords managed
to get them, use them and cause production server downtime
from doing things they didn't know enough about to be doing.
SQL passwords can go across the network in clear text - if
you log in using Windows Authentication, no password is sent
across the network.
The list goes on - that's just a short list.

SQL Server 2005 has implemented some new security features
to mitigate the risks but it doesn't necessarily mean that
people will learn these features and also implement them. In
some cases - such as Password policies for SQL logins - they
may not be able to as this only works on Windows Server
2003.

-Sue

On Wed, 11 Oct 2006 00:33:54 -0700, "Arnie Rowland"
[quoted text, click to view]
Arnie Rowland
10/11/2006 11:41:20 AM
Agreed. I don't use or recommend SQL Logins for many, many reasons.

In the message above, note the use of 'improved' and 'may'.

--
Arnie Rowland, Ph.D.
Westwood Consulting, Inc

Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous


[quoted text, click to view]

Sue Hoegemeier
10/11/2006 1:08:56 PM
Okay but the question was:
[quoted text, click to view]
I didn't really see an answer to the posters question -
other than "2000 it was not very secure."
Mentioning that it has improved and may meet your needs
doesn't really address the risks that still exist, what the
issues are (which is what the poster asked) and doesn't
really leave one with the impression that it is still
recommended to use windows authentication. I wanted to make
sure the poster wasn't making any assumptions otherwise.
I would have made some bad assumptions if I didn't know a
little about SQL Server security.

-Sue

On Wed, 11 Oct 2006 11:41:20 -0700, "Arnie Rowland"
[quoted text, click to view]
Vayse
10/12/2006 12:00:00 AM
Thanks Sue and Arnie for the detailed answers.
I reckon I will create a windows groups for each group of reports.
Thanks
Vayse


[quoted text, click to view]

Vayse
10/12/2006 12:00:00 AM
One more question! :)
Is it possible to use someone elses Window login through code? I think I
read something about aliasing or somesuch. Don't want to go down that road
myself, but I would like to know if it is possible.
Thanks
Vayse



[quoted text, click to view]

Sue Hoegemeier
10/12/2006 2:31:32 PM
In 2005, my first guess would be that you read about using
the Execute As clause. Is this what you were thinking of:
http://msdn2.microsoft.com/en-us/library/ms188354.aspx

On 2000, there was setuser (which has been replaced by
executed as) but it worked differently, wasn't recommended
to be used, didn't support windows users - just SQL logins,
only used by sysadmins, and a lot of other differences.

-Sue

On Thu, 12 Oct 2006 10:52:49 +0100, "Vayse"
[quoted text, click to view]
AddThis Social Bookmark Button