authentication - Mongodb revoke acccess to connect test database -
i have ec2 instance mongodb 3.2.0 installed. have user admin access. can connect user , perform operation remotely. 1 can connect database test remote if knows ip mongo 11.11.11.11. although not able make operations, want restrict access user credentials can connect server.
first need create users , grant roles users, example:
use admin db.createuser( { user: "myuseradmin", pwd: "abc123", roles: [ { role: "useradminanydatabase", db: "admin" } ] } )
then need start server --auth parameter
mongod --auth
more information here
Comments
Post a Comment