MongoDB数据库中关于roles权限的说明
在mongodb中通过逐一的权限来实现各种权限的,我个人的理解意思是账户有账户的权限,数据库有数据库的权限,各自分开又有连接的功能,所以在使用的时候需要各自配置好权限,这样在安全方面会比较好,就像主管有主管的权限,经理有经理的权限,员工有员工的权限是一样的,
那么目前我在学习mongodb数据库中理解到的权限为如下:(使用版本[V3.2],版本不同存在比较大的差异)
后期会慢慢翻译成中文,也锻炼一下自己的英文阅读能力。
Database User Roles(数据库用户角色权限)
| Role | Short Description |
|---|---|
| read |
Provides the ability to read data on all non-system collections and on the following system collections: system.indexes, system.js, and system.namespaces collections. For the specific privileges granted by the role, see read. |
| readWrite |
Provides all the privileges of the read role and the ability to modify data on all non-system collections and the system.js collection. For the specific privileges granted by the role, see readWrite. |
Database Administration Roles(数据库管理角色权限)
| Role | Short Description |
|---|---|
| dbAdmin |
Provides the ability to perform administrative tasks such as schema-related tasks, indexing, gathering statistics. This role does not grant privileges for user and role management. For the specific privileges granted by the role, see dbAdmin. |
| dbOwner | Provides the ability to perform any administrative action on the database. This role combines the privileges granted by the readWrite, dbAdmin and userAdmin roles. |
| userAdmin |
Provides the ability to create and modify roles and users on the current database. Since the userAdmin role allows users to grant any privilege to any user, including themselves, the role also indirectly provides superuser access to either the database or, if scoped to the admin database, the cluster. For the specific privileges granted by the role, see userAdmin. |
发表评论