Skip to Main Content

MongoByte MongoDB Logo

Welcome to the new MongoDB Feedback Portal!

{Improvement: "Your idea"}
We’ve upgraded our system to better capture and act on your feedback.
Your feedback is meaningful and helps us build better products.

Status Submitted
Categories Database
Created by Guest
Created on Mar 20, 2024

user authentication

Hy It would be extremely useful to be able to create users who can only connect to the database from specific networks or even specific IP addresses, similar to what is possible with MySQL. For example, using the following commands: CREATE USER 'user_name'@'10.214.3.0' IDENTIFIED BY 'password'; GRANT ALL PRIVILEGES ON shorturl.* TO 'user_name'@'10.214.3.0'; You can create a user who can access the database only from the network with the IP address 10.214.3.0. I would like to know if it is possible to achieve similar functionality in mongodb as well. This would be very useful for my purposes, as I want to limit users' access to the database to only the specific networks that I have authorized, so that different databases have customized access. Thank you.
  • Attach files
  • Guest
    May 10, 2024
    it's possible only on stand alone MongoDB Installation. But in atlas there is no option to do this.
  • Guest
    Apr 8, 2024
    That's possible, did you check the documentation? https://www.mongodb.com/docs/manual/reference/command/createUser/#authentication-restrictions