ASp.NET MVC EF4 SQL表或字段级安全性 [英] ASp.NET MVC EF4 SQL Table or Field level security

查看:119
本文介绍了ASp.NET MVC EF4 SQL表或字段级安全性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个不太寻常的安全性要求,我在寻找的建议最佳实践,或者,至少不脆的方法。

I have an slightly unusual security requirement, and I'm looking for advice on best practice, or at-least non-brittle approaches.

场景:内网系统。关于一些相关实体的数据要被视为公开。这被称为系统的未发表的一部分。只有特定的用户可以访问这些数据。在某些阶段的用户进行选择从这个数据,标志着一些记录,并将它们发布到发布的一面。发布到公布的侧的数据是从未公开的侧面移除。该系统的用户的体然后可以在发布侧上的记录工作。

Scenario: Intranet system. Data about a number of related entities is to be considered as private. This is known as the unpublished part of the system. Only certain users can access this data. At some stage the users make a selection from this data, mark some records and publish them to the "published" side. The data published to the published side is removed from the unpublished side. The bulk of the systems users can then work on the records in the published side.

我知道这听起​​来像一个父记录一个布尔领域,如已发表或未发表下垂,但让我解释一下我们是如何在系统更换铲球这个问题 - 这是安全的,我们需要效仿的水平。它是一个平面文件数据库(Dataflex)在单独的表的未发表和公布的数据,在不同的服务器硬盘,备份到磁带分开,在不同的房间,与不同的人进行物理访问。网络权限确保用户发布的不能在未发表的数据得到的。该软件还管理权,但如果出了问题,还是一个程序员犯了错误,他们仍然无法访问错误的数据。系统管理者谁可能戳破这个数据有积极的审核安全检查。

I know this sounds like a bool field on a parent record, flagging as published or unpublished, but let me explain how the system we are replacing tackles the issue - this is the level of security we need to emulate. It is a flat file database (Dataflex) with the unpublished and published data in separate tables, on separate server drives, backed up to separate tapes, in different rooms, with physical access by different people. Network rights ensure that the published users cannot get at the unpublished data. The software also manages rights, but if that goes wrong, or a programmer makes a mistake, they still can't access the wrong data. Sys admins who could potentially broach this data have positive vetted security clearance.

所以,我在找的是如何实现与MVC,EF4,SQL实现这种架构的建议。在一个极端我建立两个系统有两个SQL数据库,不同的权利:可能与含有的web.config所以它实际上是相同的codeBase的内部的分歧。在标尺的另一端它与控制器方法表中的标志标记以拒绝访问。 (那是没有好,因为如果一个程序员弄乱说,搜索查询,并从错误类别返回数据,并使它走出大楼被忽视,其可能导致人的牺牲,狗和猫一起生活质量...癔病)

So what I am looking for is advice on how to achieve an architecture with MVC, EF4, SQL that achieves this. At one extreme I build two systems with two sql databases, different rights: potentially with the differences contained within web.config so its actually the same codebase. At the other end of the scale its the flag in the table with controller methods marked up to deny access. (Thats no good because if a programmer messes up say a search query and it returns data from the wrong category, and it makes it out of the building unnoticed, its likely to result in human sacrifice, dogs and cats living together... mass hysteria)

对不起,冗长的说明。关于如何访问此寻求最佳做法或其他建议。

Sorry for the lengthy description. Best practices or other advice on how to access this sought.

推荐答案

不是一个MVC / EF-明确的答案,但有一个旧的Technet纸(用于SQL Server 2005),回答了很多问题,可能是有用的:

Not an MVC/EF-specific answer but there's an older Technet paper (for SQL Server 2005) that answers a lot of the issues and may be useful:

实施行级别和单元级别的安全分类中的数据库使用SQL Server 2005

"Implementing Row- and Cell-Level Security in Classified Databases Using SQL Server 2005"

Technet上使用。同一篇论文也可以是<一个href=\"http://download.microsoft.com/download/4/7/a/47a548b9-249e-484c-abd7-29f31282b04d/RowCellLvlSecSQL.doc\"相对=nofollow>下载为Word文档。

Available on Technet. The same paper can also be downloaded as a Word document.

这篇关于ASp.NET MVC EF4 SQL表或字段级安全性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆