Security Reference安全参考
The following lists the security related methods available in 以下列出了mongosh as well as additional security reference material.mongosh中可用的安全相关方法以及其他安全参考资料。
Security Methods in mongoshmongosh中的安全方法
mongoshUser Management and Authentication Methods用户管理和身份验证方法
| db.auth() | |
| db.changeUserPassword() | |
| db.createUser() | |
| db.dropUser() | |
| db.dropAllUsers() | |
| db.getUser() | |
| db.getUsers() | |
| db.grantRolesToUser() | |
| db.removeUser() | |
| db.revokeRolesFromUser() | |
| db.updateUser() | |
| passwordPrompt() | mongoshuser authentication/management methods.mongosh用户身份验证/管理方法中直接指定密码。 | 
Role Management Methods角色管理方法
| db.createRole() | |
| db.dropRole() | |
| db.dropAllRoles() | |
| db.getRole() | |
| db.getRoles() | |
| db.grantPrivilegesToRole() | |
| db.revokePrivilegesFromRole() | |
| db.grantRolesToRole() | |
| db.revokeRolesFromRole() | |
| db.updateRole() | 
Security Reference Documentation安全参考文件
- system.roles- Collection集合
- Describes the content of the collection that stores user-defined roles.描述存储用户定义角色的集合的内容。
- system.users- Collection集合
- Describes the content of the collection that stores users' credentials and role assignments.描述存储用户凭据和角色分配的集合的内容。
- Resource Document资源文档
- Describes the resource document for roles.描述角色的资源文档。
- Privilege Actions权限操作
- List of the actions available for privileges.可用于权限的操作列表。