System
Hi I am running mongodb on ubuntu 20.14. Im running mongodb with systemctl
What I've done
I've tried to make it more secure by adding an admin user and enabled authentication. Ive restarted the service multiple times.
config file:
security:
authorization: enabled
How I created user:
use admin
db.createUser({
user: "username",
pwd: "123456",
roles:["root"]
})
Problem
I am still able to connect through mongodb compass without any auth??? Im able to do everything even tho I enabled the authentication? I am not able to login authenticated using these urls:
mongodb://username:password@localhost:27017/
mongodb://username:password@localhost:27017?authSource=admin
Im sure the config file is loading since authentication works in console and I can see the right config load in the mongod.log