Security Reference for Self-Managed Deployments
MongoDB 5.0 is end of life as of October 2024. This version of the documentation is no longer
supported. To upgrade your 5.0 deployment, see the MongoDB 6.0 upgrade procedures.
The following lists the security related methods available in
mongosh
as well as additional
security reference material.
Security Methods in mongosh
User Management and Authentication Methods
Name | Description |
---|---|
Authenticates a user to a database. | |
Changes an existing user's password. | |
Creates a new user. | |
Removes a single user. | |
Deletes all users associated with a database. | |
Returns information about the specified user. | |
Returns information about all users associated with a database. | |
Grants a role and its privileges to a user. | |
Deprecated. Removes a user from a database. | |
Removes a role from a user. | |
Updates user data. | |
Prompts for the password as an alternative to specifying passwords
directly in various mongosh user
authentication/management methods. |
Role Management Methods
Name | Description |
---|---|
Creates a role and specifies its privileges. | |
Deletes a user-defined role. | |
Deletes all user-defined roles associated with a database. | |
Returns information for the specified role. | |
Returns information for all the user-defined roles in a database. | |
Assigns privileges to a user-defined role. | |
Removes the specified privileges from a user-defined role. | |
Specifies roles from which a user-defined role inherits privileges. | |
Removes inherited roles from a role. | |
Updates a user-defined role. |
Security Reference Documentation
system.roles
Collection in Self-Managed Deployments- Describes the content of the collection that stores user-defined roles.
system.users
Collection in Self-Managed Deployments- Describes the content of the collection that stores users' credentials and role assignments.
- Resource Document on Self-Managed Deployments
- Describes the resource document for roles.
- Privilege Actions for Self-Managed Deployments
- List of the actions available for privileges.