Problem

I have SQL Server databases with top secret, secret and unclassified data.  How can we establish custom SQL Server data classification schemes for implementing "need to know" access to data in specific tables?  Check out this tip to learn more.

Solution

With current regulations such as SOX, HIPAA, etc., protecting sensitive data is a must in the enterprise.  In this tip we will see how to implement Row Level Security (RLS) and Cell Level Security (CLS) with the help of SQL Server Label Security Toolkit which you can download from CodePlex http://sqlserverlst.codeplex.com/.

What is a security label in SQL Server?

A security label is a marking that describes the sensitivity of an item, in this case, information. It consists of a string containing defined security categories of the information available.

ID

Name

CreditCardNo

Classification

1 Ken Sánchez 1010101 SECRET
2 Terri Duffy 8498489 TOP SECRET
3 Rob Walters 4884556 UNCLASSIFIED

In order to access the information the users need to have a clearance defined.

User

Clearance

Alice TOP SECRET
Bob SECRET
David UNCLASSIFIED

So, in this case, assuming a hierarchical security scheme, if Alice performs a SELECT * FROM Table1 he will get all of the three records, because she has TOP SECRET clearance and that includes SECRET and UNCLASSIFIED clearances. And if Bob is the one who performs the previous query, he will get only the records 1 and 3.

How does the SQL Server Label Security toolkit work?

This toolkit consists of a framework composed by:

  • Metadata tables used to define the security labels.
  • Helper stored procedures and functions to manipulate the labels.
  • A view, vwVisibleLabels that contains the list of all the security labels present in the database to which the current logged user have access (I will expand this topic below).
  • A GUI to develop the security schema.

It is important to note that the approach used by this Toolkit makes the assumption that applications using the database will connect by using a specific identity for each end user. This identity could be either a Windows account or a SQL Server login. That's because the security labels are associated to database roles or Windows groups. On SQL Server 2012 you can use the Contained Database feature to create a user without a login.

posted @ 2016-04-12 10:35 牟向阳 阅读(420) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2014-11-10 12:49 牟向阳 阅读(179) 评论(0) 推荐(0) 编辑
摘要: 圖中藍車為本車。圖1:當車外後視鏡調到這個位置,鏡中能看到左後方的紅車,而看不到藍色的本車側翼。圖2:這個位置,能看到本車側翼,而左後方的紅車進入了視線盲區。圖3:車內後視鏡,能清晰看到正後方黃車和某個角度下的右後方綠車。圖4:盡量外展的位置,當綠車從車內後視鏡消失,立即出現在右外後視鏡中。圖5:... 阅读全文
posted @ 2014-11-10 12:44 牟向阳 阅读(260) 评论(0) 推荐(0) 编辑
摘要: 1. While it is hanging I take a memory dump of the process usingadplus -p <PID for the IExplore.exe process> -hang2. I open up the dump in windbg and set the symbol path.sympath SRV*c:\websymbols*http://msdl.microsoft.com/download/symbols .reload3. I load up sos.dll from the silverlight direct 阅读全文
posted @ 2012-04-12 16:27 牟向阳 阅读(270) 评论(2) 推荐(1) 编辑
摘要: Silverlight中实现同步调用Service,核心是用到了MS的Interlocked.Increment.Interlocked.Increment是做什么事情的?如果有两个Thread ,分别记作threadA,threadB。1:threadA将Value从存储空间取出,为0;2:threadB将Value从存储空间取出,为0;3:threadA将取出来的值和1作加法,并且将和放回Value的空间覆盖掉原值。加法结束,Value=1。4:threadB将取出来的值和1作加法,并且将和放回Value的空间覆盖掉原值。加法结束,Value=1。最后Value =1 ,而正确应该是2;这 阅读全文
posted @ 2011-09-14 10:56 牟向阳 阅读(1142) 评论(8) 推荐(3) 编辑
摘要: 项目开发中遇到一个要求,需要将ComboBox右侧中的小三角箭头给去掉,通过Blend工具“编辑ComboBox的模板副本”得知,这是一个名为"BtnArrow"的Path。但是在CS代码中,是无法引用到这个控件的。解决办法:重新定义一个类,继承自ComboBox,然后重写OnApplyTemplate方法,代码如下01using System.Windows;02using System.Windows.Controls;03using System.Windows.Shapes;0405namespace ContentTemplateTest06{07public c 阅读全文
posted @ 2011-09-07 09:49 牟向阳 阅读(361) 评论(0) 推荐(0) 编辑
摘要: WebClient或HttpRequest等Silverlight访问服务端的手段,仅提供异步方法,所以,了解Silverlight端的多线程技术,显得十分重要。1. 跨UI线程首先,我们要了解的是Dispatcher,Winform多线程编程时代,很多人肯定遇到过,当子线程访问UI线程的时候,MS处于规则考虑,会拒绝访问。那我们必须基于Control.Invoke、SynchronizationContext或BackgroudWorker来调用。现在,Silverlight时代,怎么办呢?这就不卖关子了,用 Dispatcher.BeginInvoke 就可以了。当然,要Dispatche 阅读全文
posted @ 2011-06-07 21:48 牟向阳 阅读(1108) 评论(1) 推荐(1) 编辑
摘要: 本计划整理一下,平时开发使用的一些Silverlight工具的集合。偶然间发现已经有大叔,已经帮忙整理好了。都是很实用的一些东东,Silverlight开发肯定用的找。大家有好的sl武器,也可以Share一下。来源:SmithStevenBlogAs we approach the launch of Silverlight 4 and today the 2010 Winter Olympics begin (which are streaming via Silverlight!) I thought I’d post about some Silverlight Tools you ma 阅读全文
posted @ 2011-05-11 13:58 牟向阳 阅读(338) 评论(1) 推荐(0) 编辑
摘要: 1. 需要Mapping的Xml结构<?xml version="1.0" encoding="utf-8"?><Requestes> <Request name="RequestA" formname="LanguageUI" serviceurl="http://MyComputer/LanguageService" httpmethod="POST" targetui="Settings->LanuageSetting&qu 阅读全文
posted @ 2011-05-06 16:55 牟向阳 阅读(1651) 评论(0) 推荐(0) 编辑
摘要: Emit 和 CodeDom 都是用来动态创建类型,并利用反射执行的东东~~~~ 这两个都是 .NET Framework 中比较有深度的内容。有关 CodeDom,雨痕已经写过好几篇了,此处不再详述。CodeDom 利用 C#/VB.NET 等编译引擎进行动态编译,而 Emit 则直接使用 IL,从编程方便的角度来说 CodeDom 更方便一点。当然 CodeDom 要花费一定的编译时间,而一旦载入则和 Emit 或静态编译程序集没有什么区别。Emit 被很多 AOP/ORM 组件所使用,除了 ILGenerator 外,和 CodeDom 的编程习惯很相似。接下来雨痕会写几篇 Emit 的 阅读全文
posted @ 2011-01-30 10:42 牟向阳 阅读(1482) 评论(1) 推荐(0) 编辑
点击右上角即可分享
微信分享提示