mongodb 有数据库存取控制吗

2020-11-20 11:54:23 +08:00
 zxCoder

导师给了个很奇怪的毕设题目,在 mongodb 基础上实现数据库的存取控制,我寻思这不是 db 都有额基本功能吗?

自主存取控制( Discretionary Access Control 简称 DAC ):

强制存取控制( Mandatory Access Control 简称 MAC ):

707 次点击
所在节点    问与答
8 条回复
auxox
2020-11-20 12:49:45 +08:00
DAC 这块 mongo 是明确支持的。参见: https://docs.mongodb.com/manual/core/authorization/
有一点很好奇,这个题目的意思是在 mongo 的 codebase 上加额外的功能吗
zxCoder
2020-11-20 13:03:51 +08:00
@auxox 应该是可以加一个中间层的意思吧...老师一直强调 mongodb 不支持存取控制,听得我云里雾里,回来一查不太对劲
zxCoder
2020-11-20 13:11:45 +08:00
@auxox 是不是说 mongodb 的权限控制粒度只是到角色和文档,有没有像关系型数据库中对某些列或者是某些元祖的访问权限控制
zxCoder
2020-11-20 13:13:06 +08:00
Privileges
A privilege consists of a specified resource and the actions permitted on the resource.

A resource is a database, collection, set of collections, or the cluster. If the resource is the cluster, the affiliated actions affect the state of the system rather than a specific database or collection. For information on the resource documents, see Resource Document.

An action specifies the operation allowed on the resource. For available actions see Privilege Actions.
@auxox
EPr2hh6LADQWqRVH
2020-11-20 13:16:38 +08:00
毕设不得你自己实现么。。
你用人家功能算啥。。。

真 import 论文么。。。
auxox
2020-11-20 14:31:29 +08:00
@zxCoder mongo 权限控制粒度没有那么细,最小的粒度是集合,也就是 rdbms 中的表。话说 mysql 或者 pg 有针对特定记录进行访问控制的功能吗,如果支持的话,那对于记录数为千万级的表,这块怎么实现呢。。。
zxCoder
2020-11-20 19:07:49 +08:00
@avastms ...
zxCoder
2020-11-20 19:50:59 +08:00
@auxox 找老师问了一下 确实大致工作就是要实现更小的粒度的存取控制。。。。

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/727473

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX