我不是安全专家,在我的项目中曾讨论过我们是否应该使用实体框架。尽管我们似乎会使用它,但项目负责人坚持认为,出于安全考虑,我们仍然应该使用存储过程进行所有操作(包括简单的CRUD)。他说,如果我们使用存储过程,用户只需要执行存储过程的权限,而不需要创建/读取/更新/删除的权限。
正如我之前所说,我不是安全专家,所以我很想知道这是怎么回事。
我不是安全专家,在我的项目中曾讨论过我们是否应该使用实体框架。尽管我们似乎会使用它,但项目负责人坚持认为,出于安全考虑,我们仍然应该使用存储过程进行所有操作(包括简单的CRUD)。他说,如果我们使用存储过程,用户只需要执行存储过程的权限,而不需要创建/读取/更新/删除的权限。
正如我之前所说,我不是安全专家,所以我很想知道这是怎么回事。
这样做的目的是将权限和特权授予各个存储过程,然后这些存储过程可以访问表,而不是表本身。
通过这种方式,您可以限制所有表中的用户,并允许SP允许基于其他逻辑(SP级别的DB权限以及SP内的代码)进行语义访问。
这为整个安全框架在角色和权限方面提供了更精细的粒度。
例如,使用普通的DB权限,很容易限制用户可以查看的表,但不能限制用户在表中可以查看的行。
解决此问题的两种方法是限制对基础表的访问,然后在该表上创建一个受限视图并授予访问权限,或者您可以通过SP限制访问权限,该SP具有能够限制用户可以查看的行的逻辑。
这是真的。
存储过程提供了执行比标准表权限更好的安全性的能力(例如,只更新表的少数列)
但是
For developers its a nightmare. Even simplest query needs to be implemented as stored proc or view. So its not agile, rapid or sexy :)
I m trying to export some tables from SQL Server 2005 and then create those tables and populate them in Oracle. I have about 10 tables, varying from 4 columns up to 25. I m not using any constraints/...
In our database we have an SQL server account that has the correct roles to access some of the databases. We are now switching to windows authentication and I was wondering if we can create a NT user ...
I have been trying to execute a MS SQL Server stored procedure via JDBC today and have been unsuccessful thus far. The stored procedure has 1 input and 1 output parameter. With every combination I ...
Is it possible to use the sqlcmd command to dump table structure the way it can be done with mysqldump?
Hi I have the following SP, however when I use LINQ to SQL it generates 2 multiple recordsets. For my sanity I am trying to fathom out what it is in the stored procedure that is doing this and would ...
I want to create a table in MS SQL Server 2005 to record details of certain system operations. As you can see from the table design below, every column apart from Details is is non nullable. CREATE ...
I love the new DATE datatype in SQL Server 2008, but when I compare a DATE field to a DATETIME field on a linked server (SQL 2005, in this case), like this: DECLARE @MyDate DATE SET @MyDate = CONVERT(...
How to determine if a Transaction is active i.e. before issuing Begin Transaction I want to ensure that no previous transaction are open.. the platform is VB6, MS-SQL Server 2000 and ADO 2.8