SQL Server:如何隐式拥有所有访问权限,并显式拒绝某些访问权限?
我想拒绝特定用户对数据库中某些对象的某些访问;但任何没有明确拒绝的事情我都希望默认被授予。
通常,我让用户成为 db_owner 角色的成员,以便为他们提供所有访问权限(这是因为默认情况下,public 卷并不具有所有访问权限)。但是,如果我随后在特定表上明确拒绝该特定用户的选择权限,他们仍然拥有选择权限。
用户如何隐式拥有所有访问权限,除非显式拒绝?
i want to deny some access to some objects in a database for a particular user; but anything not specifically denied i want to, by default, be granted.
Normally i make a user a member of the db_owner
role, in order to give them all access (this is because the public
roll doesn't by default have all access). But if i then specifically deny select
permission, on a specific table, for that specific user, they still have select permission.
How can a user implicitly have all access, unless explicitly denied?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
让每个人都扮演一个不是所有者的角色,例如 db_datareader。我认为您的问题是试图拒绝对 db_owner 成员进行选择。对于管理员来说也是如此。
Put everyone in a role that is not an owner like db_datareader. I think your problem was trying to deny select on a db_owner member. Same goes for admins.
没关系,问题并不像我描述的那样。
db_owner
固定角色的成员select
访问表这是因为用户首先查看视图、存储过程或函数。显然,如果您为表添加别名,则可以绕过安全性。
SQL Server:如何隐式拥有所有访问,并明确拒绝一些?
Never mind, the issue is not as i described.
db_owner
fixed roleselect
access to a tableThis is because the user is first going through a view, stored procedure, or function. Apparently you're allowed to bypass security if you alias the table.
SQL Server: How to implicitly have all access, and explicitly deny some?