Security

Create a Whitelist for SQL Server

UPDATED – May 16, 2017 – Please review the updated code here. In my previous post, Configuring the Azure SQL Database Firewall, I discussed how you can configure the firewall rules to manage access to the SQL Server. Today, I wanted to demonstrate how you can accomplish the same thing with your on-premise SQL Servers by creating a whitelist. So let’s start off by defining “whitelist”. According to the American Heritage Dictionary, it is “a list of people or organizations that have been approved to receive special considerations”. In our example, that “special consideration” is access to the SQL Server only if...

Continue reading...

Grant Execute Permission on All Stored Procedures

Right out of the box, SQL Server makes it pretty easy to grant SELECT, INSERT, UPDATE, and DELETE to all user tables.  That’s accomplished by using the built-in db_datareader (SELECT) and db_datawriter (INSERT, UPDATE, and DELETE) database roles in every user database.  Any user you add to those database roles will be granted those permissions. But what if you want to grant EXECUTE permission to all of the user stored procedures.  Where’s the built-in database role for that?  Nowhere to be found.  Oh you can create a database role, add users to that role, and grant EXECUTE permission to that...

Continue reading...