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.
-
Mohamed Aslam commented
it's possible only on stand alone MongoDB Installation. But in atlas there is no option to do this.
-
Wernfried commented
That's possible, did you check the documentation?
https://www.mongodb.com/docs/manual/reference/command/createUser/#authentication-restrictions