Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

When setting up security on SQL Server 2005 / 2008. What is the more secure option?

  • Windows Authentication Mode Only
  • Mixed Authentication

Does it matter if the server will be accessed by many desktop clients (thick clients) or if a handful of web servers will be accessing it?

Edit

And why is it more secure? Using Windows Authentication does mean we can avoid putting the connection string in the configuration file which is a plus.

Windows Authentication also allows us to control who gets access based on their NT credentials, which I would think is ideal when your clients connect directly to the server.

One thing I always wonder however, is how useful NT authentication is when all clients go through a proxy such as web service.

share|improve this question
    
ow useful NT authentication is when all clients go through a proxy such as web service. Very useful because you can use application pool impersonation for that web service and only grant the account that app pool runs under exec permissions to stored procs using the SSPI connection string shown below –  CPU_BUSY May 1 '09 at 4:24

4 Answers 4

up vote 7 down vote accepted

Windows authentication is considered more secure. Here's why:

  • You can use Kerberos authentication. The Kerberos protocol has a timestamp which prevents replay attacks. It also allows the client to verify the identity of the server using a trusted 3rd party (in Active Directory's implementation, this is the DC).
  • It allows for a single security source: Active Directory. Therefore, once you shutdown an account in Active Directory, it is disabled everywhere.
  • In SQL Server versions prior to SQL Server 2005, the login packet was not automatically encrypted. The way the password was passed on the network was easily decrypted since we're talking about high and low order bit flipping and an XOR operation.
  • There is the fact that you don't have to put the password in the connection string, but there are other ways around this. For instance, encrypting username/password and storing it in the registry, and then building the connection string at runtime.
  • Logins to the SQL Server will be tracked in the Security event log, along with other Windows logins, if such audit settings are turned on (and they should be). That means if you have log parsing/aggregation software for your servers, you don't have to parse out the application event log or the SQL Server logfile necessarily.

With respect to where you have a single account from a web service, you still have all the same advantages that I've listed above.

share|improve this answer

Windows Authentication is more secure primarily because the username and password are not passed in the connection string. Data Source=myServerAddress;Initial Catalog=myDataBase;Integrated Security=SSPI;

As opposed to Data Source=myServerAddress;Initial Catalog=myDataBase;User Id=myUsername;Password=myPassword;

share|improve this answer

More secure is Windows Authentication Mode Only assuming you have good network security in general.

Could you give a little more detail on your current setup and needs?

share|improve this answer

Basically, Windows authentication is the recommended authentication. It is secure by theory, that is if you have a good network security already in place.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.