Security is a very important part of every DBA’s role. If you are not clued up on security best practices or don’t secure your SQL Servers, you should be concerned as it could end up costing you your job!
I have worked in organisations where the painstaking task of managing SQL Server security was my responsibility and others where thankfully we have made use of Windows Authentication. This in my opinion is a much better approach as it reduces the administrative overhead weather the task be carried out by an IT Operations team or in most cases by you as DBA’s. There are many factors to consider when deciding whether to use SQL or Windows authentication and in some cases even both, the biggest win for me however is the administrative overhead as I mentioned before and I will show why below; Take the following example of a small development team comprising 9 developers as below; The developers are split into 3 teams as below; Development Team 1 comprises of the most experienced and trusted developers, Development Team 2 comprises of competent developers who have some experience but not as much as those in Development Team 1 and Development Team 3 comprises of new or junior developers who are still learning the ropes. There are 3 SQL Servers in the company as below; A Live SQL Server - LIVESQL1 A UAT SQL Server - UATSQL1 A Dev SQL Server – DEVSQL1 Each SQL Server has 3 databases as below; The company requires the developers to have the below access; DEVSQL1 – membership in the db_owner fixed database role for every user database. UATSQL1 – membership in the db_datareader and db_datawriter fixed database roles for every user database. LIVESQL1 – membership in the db_datareader fixed database role. DEVSQL1 – membership in the db_owner fixed database role for every user database. UATSQL1 – membership in the db_datareader and db_datawriter fixed database roles for every user database. DEVSQL1 – membership in the db_datareader and db_datawriter fixed database role for every user database. Now let’s consider what would be required for SQL Authentication; And for Windows Authentication;
We create a Global Security Group in Active Directory for each of the Development Teams as below; We then add each of the developers to their respective groups. Once this is done we would require; As you can see from these figures making use Windows Authentication means we have 65% less administration to deliver a security solution for our SQL Servers, based on this data we decide to go with Windows Authentication. Moving forward as part of the IT new user process for developers we inform the IT Operations team that they are to add new developers to the Development Team 3 Active Directory group. This means that they automatically have permissions on SQL server. Now consider the following scenario; over the next 6 months the company’s size explodes and the number of developers rises from 9 to 99. There are no new servers or databases required. Since we decided to go with Windows Authentication there is zero administrative overhead for us as DBA’s providing the Teams / Active Directory structure remain the same (which for the purpose of this post assume they have). But what if we would have gone with SQL Server authentication? Well let’s look at the figures, 90 additional users equate to an additional…. This is a lot of additional work which could be reduced by using scripts yes, but is still additional work. I am currently defining standards for my current employer and will be using these statistics as one reason of many reasons why we should use Windows authentication over SQL authentication! Chris